wanasit / chrono

A natural language date parser in Javascript
MIT License
4.57k stars 341 forks source link

Ability to restrict dates to the past would be useful #173

Open bcowgill opened 7 years ago

bcowgill commented 7 years ago

We have an application where only dates in the past are allowed to be used. Would be good if there was a flag on parse/parseDate that would not return any future dates.

CCob commented 7 years ago

I second this. I have the same need were days of the week are given for events within the last 7 days, but depending on how close the day is to reference date it can be in the future which is not desirable for the application.

wanasit commented 7 years ago

This is related to #211 but opposite. Will a custom refiner works for your use case?

CCob commented 7 years ago

If you had a refiner that worked in the opposite way, this would satisfy my use case certainly.

mikekreeki commented 2 years ago

This would be great 👍