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

Incorrect months for Japanese #549

Open
andrewplummer opened this issue Aug 6, 2019 · 4 comments

Comments

@andrewplummer
Copy link

commented Aug 6, 2019

Doing this:

import { Info } from 'luxon';
Info.months('short', { locale: 'ja-JP' });

I would expect a result of ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"] , however the result is ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"].

new Intl.DateTimeFormat('ja-JP', { month: 'short'}).formatToParts() produces two array entries... Luxon appears to be leaving off the literal part.

Environment is Chrome for OSX 76.0.3809.87

@andrewplummer

This comment has been minimized.

Copy link
Author

commented Aug 6, 2019

Same seems to be true for long and other formats as well.

@andrewplummer

This comment has been minimized.

Copy link
Author

commented Aug 6, 2019

Noticing a similar issue with times... compare:

DateTime.fromJSDate(new Date()).setLocale('ja-JP').toLocaleString(DateTime.TIME_SIMPLE)

with

new Intl.DateTimeFormat('ja-JP', {hour:'numeric', minutes:'2-digit'}).format(new Date())

Interestingly Intl is leaving the minutes off but in any case I would expect them to match up.

@icambron

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

Yes, I think this is a bug. It looks like what's happening is that Luxon is still telling Intl to use the Latin numbering system, whereas it should be letting Intl decide that on its own. I'll have to trace through it.

@icambron icambron added the issue: bug label Aug 15, 2019

@andrewplummer

This comment has been minimized.

Copy link
Author

commented Aug 16, 2019

Awesome! Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.