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: date localestring format error #68

Merged
merged 1 commit into from May 5, 2023
Merged

fix: date localestring format error #68

merged 1 commit into from May 5, 2023

Conversation

Pcrab
Copy link
Contributor

@Pcrab Pcrab commented May 4, 2023

Since node v18.13.0, ICU is updated to 72.1, which changes the behavior of 'en-CA' toLocaleString.

Its output could be formatted to YYYY-MM-DD HH:mm:ss, but now it becomes MM/DD/YYYY HH:mm:ss, which is no longer a valid ISO 8601 representation.

The Date.prototype.toJSON or Date.prototype.toISOString is guaranteed to produce ISO 8601 format string, so we can use these methods instead.

@coveralls
Copy link

Coverage Status

Coverage: 93.514%. Remained the same when pulling b6c0d76 on Pcrab:fix-test into 511ba4f on hexojs:master.

@stevenjoezhang
Copy link
Member

Thanks!

@stevenjoezhang stevenjoezhang merged commit 315226e into hexojs:master May 5, 2023
11 checks passed
@Pcrab Pcrab deleted the fix-test branch May 7, 2023 09:39
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.

None yet

3 participants