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 locale-aware representation of hours in Date class #171

Closed
wants to merge 1 commit into from

Conversation

kuzmas
Copy link

@kuzmas kuzmas commented Mar 13, 2023

This change fixes Date.toLocaleString() when the hour value is 11 or 12.

Example:

var dt = new Date('2023-03-10T11:23:05.123+13:00');
console.log(dt.toLocaleString());
dt = new Date('2023-03-10T12:23:05.123+13:00');
console.log(dt.toLocaleString());

Expected output:

03/10/2023, 11:23:05 AM
03/10/2023, 12:23:05 PM

Actual output:

03/10/2023, -1:23:05 AM
03/10/2023, 00:23:05 PM

@bellard
Copy link
Owner

bellard commented Jan 8, 2024

good catch

@bellard bellard closed this Jan 8, 2024
GerHobbelt pushed a commit to GerHobbelt/quickjs that referenced this pull request Jun 21, 2024
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.12 to 5.0.13.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.13/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.13/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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