when
when copied to clipboard
bias ExactMonthDate towards future dates
Hi! I picked up when in a quick project to file tasks into notion, and it's been great so far! I'm glad I don't have to rewrite all of this natural time parsing myself. Being the end of the year, I've been trying to schedule tasks for next January when I go back to work, and was surprised when they were parsed as January of 2021 instead of 2022.
I was wondering:
- Is it intentional that
ExactMonthDateparses, e.g.January 4thas2021-01-04instead of2022-01-04? - If not, would it be possible to bias
ExactMonthDatethe next occurrence of the date? This is a breaking change to the library, so I understand if it's not acceptable to upstream.
I do have a working approach (that isn't particularly well thought out :grin:) which I could turn over to a pull request if y'all are interested.
Thanks!
Hi @crockeo,
that's great to see you found it useful for your project!
Yeah, the issue you describe is not easy to solve in general because it requires more knowledge about the context of using the library. As you mentioned it does not default behaviour so we would probably want to leave defaults as they are but nothing blocks us to implement it as an option, for example, you can create a rule that picks up the next occurrence of the date.
Thank would be really nice to have it a rule-level option! Happy to review a PR!