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
No way to get a localised time including seconds #1450
Comments
May I ask why you need seconds? I haven't come across a good reason to have them in humanly readable timestamps. Also adding them to all formats doesn't seem feasible. Once we get cldr support it will be possible. |
We show a grid of events, of which multiple may appear in a minute. We also |
I assume you're using also multiple languages (otherwise you can just explode the token). In this case you can just do something like: m.lang('fr') // put the right language here
m._lang._longDateFormat.LT += ':ss' on initialization, and you'd have a modified LT token (but you won't have the old Of course you'd need an array of mappings, because adding Its kind of ugly, but much better than patching the code. Also we might add support for adding additional tokens, check #1454 (comment) |
We want without too.. so we need 2 time formats (i patch the regex to allow I don't like patching code but its currently our only workable solution. |
Closing this. We're not making structural changes to the locale data anymore. With CLDR this would be possible. |
We mantain a patched version of moment with a new time identifier LTT which is the time in seconds.
Is there any wish to support more localised formats like this? Or allow more general localised formats so that I only need to patch the language file to get this to work?
The text was updated successfully, but these errors were encountered: