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

Switch to LDML? #294

Closed
timrwood opened this issue Apr 30, 2012 · 7 comments
Closed

Switch to LDML? #294

timrwood opened this issue Apr 30, 2012 · 7 comments

Comments

@timrwood
Copy link
Member

Relevant spreadsheet

Also, see #61

@timrwood
Copy link
Member Author

The affected tokens would be as follows.

D    = d    // day of month
DD   = dd   // day of month
DDD  = D    // day of year
DDDD = DDD  // day of year
d    = e    // day of week number
ddd  = eee  // day of week name
dddd = eeee // day of week name

Personally, I think this is a bad idea, but thought it should be brought up in the 2.0.0 breaking changes discussion.

@rockymeza
Copy link
Contributor

Have you had any other feedback regarding LDML? Despite liking Unicode and standards very much, I'm happy with the tokens as they are. That being said, I don't use them very often; I use the manipulation methods more often.

@timrwood
Copy link
Member Author

timrwood commented May 1, 2012

My opinion is that this would be a bad change.

I think the tokens are well enough documented, and I doubt there is a large audience that is familiar enough with LDML that switching to moment's tokens would be cumbersome.

The only other feedback was on #61, and a few scattered issues about strftime tokens, but while we are discussing backwards incompatible changes, I thought this should come up for discussion.

@rockymeza
Copy link
Contributor

I think it's decided that we should not switch tokens. Close this?

@timrwood
Copy link
Member Author

Sounds good

@joshuaali
Copy link

Looking at the source code, overriding moment.fn.format isn't enough. Is there an easy way to make moment.js accept the LDML format without actually touching moment.js?

Would you consider adding a flag to switch between the current behaviour and the LDML-compatible behaviour?

@timrwood
Copy link
Member Author

Other people have created wrapper methods for translating tokens to strftime and php formatting tokens. You could do something similar.

https://github.com/benjaminoakes/moment-strftime
https://github.com/niwibe/moment-tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants