parse-human-relative-time icon indicating copy to clipboard operation
parse-human-relative-time copied to clipboard

parse "last month"

Open binarykitchen opened this issue 3 years ago • 3 comments

Similar to "last week" (the other ticket), how can we parse "last month" best?

To point at the beginning and end of last month somehow.

binarykitchen avatar Feb 25 '22 00:02 binarykitchen

We'll have to extend the grammar, the Luxon implementation and the date-fns implementation.

derhuerst avatar Mar 15 '22 20:03 derhuerst

@derhuerst looks like there is already support for last month but it seems broken, always resulting into an invalid date upon the last step setMonth: https://github.com/derhuerst/parse-human-relative-time/blob/master/grammar.js#L269

binarykitchen avatar Apr 11 '22 23:04 binarykitchen