We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When setting the locale to en-GB the date is parsed 4 hours before expected:
en-GB
const stringDate = "05/22/2000"; const gb = Sugar.Date.create(stringDate, { fromUTC: true, locale: "en-GB" }); const us = Sugar.Date.create(stringDate, { fromUTC: true, locale: "en-US" }); console.log(gb.toISOString()); // Output: 2000-05-21T20:00:00.000Z console.log(us.toISOString()); // Output: 2000-05-22T00:00:00.000Z
We expect both console.log to be the identical (2000-05-22T00:00:00.000Z).
2000-05-22T00:00:00.000Z
Is this the expected behaviour? If that's the case, do you know why setting locale to en-GB is changing the parsed date?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When setting the locale to
en-GB
the date is parsed 4 hours before expected:We expect both console.log to be the identical (
2000-05-22T00:00:00.000Z
).Is this the expected behaviour? If that's the case, do you know why setting locale to
en-GB
is changing the parsed date?The text was updated successfully, but these errors were encountered: