Skip to content

Releases: ijt/go-anytime

Handle "dec-2031" and "2031-dec"

17 Jan 22:00
@ijt ijt
3183858
Compare
Choose a tag to compare
Merge pull request #65 from ijt/issue/64/dec-2031

Issue/64/dec 2031

Fix directionality of MMM-DD dates

13 Jan 04:43
@ijt ijt
4f5e32e
Compare
Choose a tag to compare

For example, for now=time.Date(2022, 11, 1, 0, 0, 0, 0, time.UTC), and direction=future, we get time.Date(2023, 3, 24, 0, 0, 0, 0, time.UTC).

Handle dates like mar-24

12 Jan 23:40
@ijt ijt
f823b1c
Compare
Choose a tag to compare
Merge pull request #61 from ijt/issue/60/mar-24

Issue/60/mar 24

Handle ranges with dashes such as 2016/08/01 - 2016/08/31

08 Jan 23:24
@ijt ijt
f2ba7b5
Compare
Choose a tag to compare

End explicit ranges at the start of the second implicit range

04 Jan 21:18
@ijt ijt
5e4e873
Compare
Choose a tag to compare

This seems more intuitive than ending at the end of the second range as it was doing before.

Check for sane range on day of month

04 Jan 18:14
@ijt ijt
559d295
Compare
Choose a tag to compare

This release adds a check for days of month being between 1 and 31.

Handle "1st", "2nd", "3rd", "4th" etc. days of month

04 Jan 04:43
@ijt ijt
e534ef9
Compare
Choose a tag to compare

Bug fix for issue 48

04 Jan 03:37
@ijt ijt
0a43b7b
Compare
Choose a tag to compare

This release fixes a bug that led to "oct nov" being parsed as a single date.

V2 with a hand-written parser and 106x speed increase on a benchmark

03 Jan 19:29
@ijt ijt
6d57390
Compare
Choose a tag to compare

Here are some notable changes in this release:

  • no external dependencies
  • parsing is hand-written for clarity, flexibility and speed
  • 106x speed increase over v1, as measured by the Jabberwocky fragment benchmark
  • 100% test coverage
  • fuzz tests
  • mostly dropped support for parsing times for now (except RFC3339), focussing on high-speed natural date parsing
  • faithful whitespace preservation in ReplaceAllRangesByFunc
  • provision of the exact original string fragment giving rise to the range in the user-provided func passed to ReplaceAllRangesByFunc, so callers can opt out of replacing anything they want by just returning the original fragment

Performance boost by reducing regex compiles

03 Dec 14:48
@ijt ijt
19b9076
Compare
Choose a tag to compare

This version uses a new version of ijt/goparsify that reduces the amount of time spent compiling regular expressions, resulting in a 9.5x speed increase reported by the benchmark.