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 #23

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.

var dt = new Date('2023-03-10 11:23:05.123 +13:00 Pacific/Auckland');
console.log(dt.toLocaleString());
dt = new Date('2023-03-10 12:23:05.123 +13:00 Pacific/Auckland');
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

@koush
Copy link
Owner

koush commented Mar 13, 2023

Please submit fixes upstream. This project is for the debugger only.

@koush koush closed this Mar 13, 2023
@kuzmas
Copy link
Author

kuzmas commented Mar 13, 2023

This project is for the debugger only.

That's true. My apologies.

Please submit fixes upstream.

Will do!

@kuzmas
Copy link
Author

kuzmas commented Mar 13, 2023

For reference: bellard/quickjs#171

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