8000 Bugfix: Calculation of next date when date is start of year by fhasse95 · Pull Request #1 · pixyzehn/custom-repeat-date · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bugfix: Calculation of next date when date is start of year #1

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

Merged
8000 merged 1 commit into from
Dec 11, 2024

Conversation

fhasse95
Copy link
Contributor

Hi @pixyzehn,

first of all, thank you for all your hard work on this library! It's really great and I've enjoyed using it in my projects.

However, while working with the library, I came across a small bug: When using a date like January 1st for the yearly recurrence, the calculation would incorrectly skip a year. After investigating, I found that the problem was caused by a missing .addingTimeInterval(-1) adjustment.

This pull request resolves this issue by ensuring that the recurrence logic handles this case as expected. In addition, I've added some unit tests to verify the fix and prevent regressions in the future.

Thank you for considering this fix!

Best regards,
Fabian

@pixyzehn
Copy link
Owner

@fhasse95 Thank you so much for fixing the bug and adding the tests! Looks great! I'll include it in v0.2.4.

@pixyzehn pixyzehn merged commit 4fe0244 into pixyzehn:main Dec 11, 2024
1 check passed
@pixyzehn
Copy link
Owner

Just released 0.2.4. Thank you again for your contribution!

@fhasse95 fhasse95 deleted the Start-Of-Year-Next-Date-Bugfix branch December 11, 2024 06:28
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.

2 participants
0