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

Duration format meta-overview #1698

Closed
ichernev opened this issue Jun 5, 2014 · 4 comments
Closed

Duration format meta-overview #1698

ichernev opened this issue Jun 5, 2014 · 4 comments

Comments

@ichernev
Copy link
Contributor

ichernev commented Jun 5, 2014

Duration format has been requested multiple times.
#1436, #1048 https://github.com/jsmreese/moment-duration-format #892 #463

The main problem is localization. Almost any hack/api can be made to work on English, but proper translation can be impossible (even cldr doesn't provide joining information -- how do you concatenate 2 hours and 5 minutes for example).

On the other hand something that just lets you format (without locale) should be fairly straight forward (check this #1048 (comment)).

The plugin listed above seems to do that, it has some weird issues and not a whole lot of stars/forks, so I'm not sure if its worth reimplementing/merging into moment. We might make it an official plugin (like timezone), because as #463 there are a lot of +1 for it.

@icambron @Oire what do you think?

@icambron
Copy link
Member

icambron commented Jul 2, 2014

Yeah, we should probably support something, since it's a big whole in the duration functionality. I think we should build something along the lines of what Matt and I discussed in #1048. If it's nice and small, merge it. If not, make it an official plugin. I'm hoping it can be done in the former.

@Menelion
Copy link

Menelion commented Jul 2, 2014

Well, I don't see a big problem with l10n here. If it's localizable somehow, I'll do my best to implement this for as many languages as I can (and of course, I hope, our translators will help me in doing this).

@ichernev
Copy link
Contributor Author

ichernev commented Jul 2, 2014

cldr had a document on multi-language parsing, I can not find it right now, but it was complicated, and involves cldr data. So in the bright future when we do support cldr for translation (as plugin) we might build a (real) parsing tool around that, but not sooner than that.

If we just make it explicit that you're using the Date object, it would be much clearer what is going on. Adding a few standard formats (like ISO and rfc2822) and being able to try them all should be good for the stricter users. Not to mention the parsing flags should say whether you hit Date parser on the way.

@maggiepint
Copy link
Member

I don't think this needs to exist along with #1048 - we really had three issues open for the same thing. Closing unless someone really wants to reopen it.

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

5 participants