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

Add Intl.DateTimeFormat support for all languages and calendars #5788

Closed
hashemisa opened this issue May 23, 2020 · 4 comments
Closed

Add Intl.DateTimeFormat support for all languages and calendars #5788

hashemisa opened this issue May 23, 2020 · 4 comments
Labels
cli related to cli/ dir suggestion suggestions for new features (yet to be agreed)

Comments

@hashemisa
Copy link

Currently only the Gregorian calendar is available!

new Intl.DateTimeFormat([locales[, options]])

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat

@alisabzevari
Copy link

This should be solved by #1968.

@kishiguro
Copy link

kishiguro commented May 24, 2020

Yes, Deno with ICU version works as expected.

$ ~/rust/deno/target/debug master* deno
Deno 1.0.2
exit using ctrl+d or close()
> const date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
undefined
> console.log(new Intl.DateTimeFormat('en-US').format(date));
12/20/2012
undefined
> console.log(new Intl.DateTimeFormat('en-GB').format(date));
20/12/2012
undefined
> console.log(new Intl.DateTimeFormat(['ban', 'id']).format(date));
20/12/2012
undefined

@bartlomieju bartlomieju added cli related to cli/ dir suggestion suggestions for new features (yet to be agreed) labels May 26, 2020
@hashemisa
Copy link
Author

Node.js supports this possibility

@ry
Copy link
Member

ry commented Jun 15, 2020

duplicate of #1968

@ry ry closed this as completed Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli related to cli/ dir suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

5 participants