ijt / go-anytime

Parse natural and standardized dates/times and ranges in Go without knowing the format in advance
MIT License
23 stars 2 forks source link

Parse date description like "last week friday" #69

Open oschrenk opened 9 months ago

oschrenk commented 9 months ago

Prerequisites

Description

This would be a neat addition.

Feature request:

"last week friday" should return the last week friday.

parsed_, err := anytime.Parse("last week friday", time.Now())
parsedRange, _ := anytime.ParseRange("last week friday", time.Now())
[...]
0001-01-01 00:00:00 +0000 UTC
{time: 0001-01-01 00:00:00 +0000 UTC, duration: 0s}
Invalid argument running parser: left unparsed: friday⏎
"

Steps to Reproduce

-