Skip to content

Conversation

seflue
Copy link
Contributor

@seflue seflue commented Jun 5, 2024

Fixes #747.

@seflue
Copy link
Contributor Author

seflue commented Jun 5, 2024

@kristijanhusak I fixed also all the type warnings, for which I'll create a second PR when this one is merged.

Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good catch, I wasn't aware of the issue.
Lets just change few things around and it's good to go.

- handle 30d month after 31d month correctly
- handle February correctly including leap years
Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@kristijanhusak kristijanhusak merged commit 1fbc263 into nvim-orgmode:master Jun 5, 2024
@seflue seflue deleted the fix_date branch June 10, 2024 19:37
SlayerOfTheBad pushed a commit to SlayerOfTheBad/orgmode that referenced this pull request Aug 16, 2024
* test(date): expose bug with test

* fix(date): handle end of month correctly

- handle 30d month after 31d month correctly
- handle February correctly including leap years

---------

Co-authored-by: Sebastian Flügge <[email protected]>
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

Successfully merging this pull request may close these issues.

Date arithmetic does calculate correctly +/- 1 month

2 participants