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

Feature request/Discussion: "Multiple Locale Support" like moment.js #317

Closed
GarreauArthur opened this issue Aug 29, 2018 · 2 comments
Closed

Comments

@GarreauArthur
Copy link

Hello 😄
Are you considering adding something similar to the "Multiple Local support" of moment.js ?

moment.locale();         // en
moment().format('LT');   // 2:19 PM
moment().format('LTS');  // 2:19:56 PM
moment().format('L');    // 08/29/2018
moment().format('l');    // 8/29/2018
moment().format('LL');   // August 29, 2018
moment().format('ll');   // Aug 29, 2018
moment().format('LLL');  // August 29, 2018 2:19 PM
moment().format('lll');  // Aug 29, 2018 2:19 PM
moment().format('LLLL'); // Wednesday, August 29, 2018 2:19 PM

The idea is to keep the same tokens (LT, LTS, L...) and output different strings according to the language. My company needs this feature, so I am going to work on it, any advice/suggestions are welcome.

@prantlf
Copy link
Contributor

prantlf commented Sep 3, 2018

Yes, formatting tokens, which can be configured differently in different locales would be nice. Instead of modifying the main Day.js object, I added this functionality as a plugin called LocalisableFormat. I sent PR #305 with it.

@iamkun
Copy link
Owner

iamkun commented Feb 2, 2019

#305

@iamkun iamkun closed this as completed Feb 2, 2019
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

No branches or pull requests

3 participants