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

fix: add America/St_Johns handling to tzOffset #7

Merged
merged 2 commits into from
Sep 21, 2024
Merged

fix: add America/St_Johns handling to tzOffset #7

merged 2 commits into from
Sep 21, 2024

Conversation

allohamora
Copy link
Contributor

This PR fixes incorrect America/St_Johns handling in tzOffset and refactors some code.

Before:
image

After:
image

allohamora and others added 2 commits September 19, 2024 19:10
- Made tests less specific
- Added tests for positive fractional time zones
- The trick with assigning NaN cut few bytes from the function 219 B -> 214 B
@kossnocorp
Copy link
Member

@allohamora thank you so much for the bugfix. 9 years working on the library, and I never heard that there's a negative fractional time zone 🫠

I added more tests, made them less specific, and cut a few bytes with the default NaN value trick.

I will ship a new release as soon as possible.

Copy link
Member

@kossnocorp kossnocorp left a comment

Choose a reason for hiding this comment

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

🙏 thank you

@kossnocorp kossnocorp merged commit c01f4fd into date-fns:main Sep 21, 2024
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