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

Improve date handling and time zone support #1446

Merged
merged 1 commit into from Mar 5, 2023

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Feb 19, 2023

Change JsDate to be based on long and helper flags. This follows JS semantics better and milliseconds maps to integral number. Tracking invalid dates with flag info about being NaN or Infinity. Also allows to stamp value as .NET DateTime MinValue/MaxValue.

MakeDate/MakeDay/MakeTime still play with doubles as it's required by the spec and can be arithmetic with very large numbers.

Added new hook in options GetUtcOffset which allows to plugin a strategy for getting better time zone database than available for example in Windows by default.

fixes #787

@lahma lahma force-pushed the new-internal-structure-for-date branch 4 times, most recently from 94b2ccf to f5bf6d1 Compare February 23, 2023 18:07
@lahma lahma force-pushed the new-internal-structure-for-date branch 2 times, most recently from ddd26bc to 165452b Compare March 5, 2023 13:20
@lahma lahma changed the title Change JsDate to be based on long and helper flags Improve date handling and time zone support Mar 5, 2023
@lahma lahma force-pushed the new-internal-structure-for-date branch from 165452b to 7c5ac28 Compare March 5, 2023 13:33
@lahma lahma merged commit 4142d93 into sebastienros:main Mar 5, 2023
@lahma lahma deleted the new-internal-structure-for-date branch March 5, 2023 13:42
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.

Issue with date value parsing in different time-zones
1 participant