Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bias ExactMonthDate towards future dates #29

Open
crockeo opened this issue Dec 27, 2021 · 1 comment
Open

bias ExactMonthDate towards future dates #29

crockeo opened this issue Dec 27, 2021 · 1 comment

Comments

@crockeo
Copy link

crockeo commented Dec 27, 2021

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 ExactMonthDate parses, e.g. January 4th as 2021-01-04 instead of 2022-01-04?
  • If not, would it be possible to bias ExactMonthDate the 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 😁) which I could turn over to a pull request if y'all are interested.

Thanks!

@olebedev
Copy link
Owner

olebedev commented Jan 5, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants