You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
formalize grammar of relative time strings and use nom to parse them
BREAKING CHANGES: this commit introduced two breaking changes:
- Keyword `ago` semantic change (to be consistent with GNU date)
The `ago` keyword now applies to individual date-time
displacement (the one that immediately precedes it) and can
be specified multiple times. For example, "1 day ago 2 days ago"
gives a combined effect of "3 days ago", and "1 day 2 days ago"
gives a combined effect of "1 day ago".
In previous implementation, `ago` can only be specified once at
the end of the relative time string, and it applies to all
date-time displacements as a whole. So "1 day ago 2 days ago"
is invalid and "1 day 2 days ago" gives a global effect of
"3 days ago".
- Relative time strings like "lastweek" or "nextmonth" are now
invalid, and space(s) are required in between the shift and the
time unit.
0 commit comments