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

Support for fractional durations / time notation with milliseconds #21

Open
ghost opened this issue Oct 17, 2022 · 1 comment · May be fixed by #25
Open

Support for fractional durations / time notation with milliseconds #21

ghost opened this issue Oct 17, 2022 · 1 comment · May be fixed by #25

Comments

@ghost
Copy link

ghost commented Oct 17, 2022

numeral-js supports formatting a number of seconds in HH:MM:SS format (by typing 00:00:00). Unfortunately it seems that 00:00:00.[000] does not produce a format with milliseconds. When times are short (or can vary from few seconds to minutes), this could be nice to have.

I think it'd be rather simple to implement in the same style as the existing code - it just checks for the existence of : to determine whether to format as time - so there could just be a switch for . (possibly count zeros after for precision) to determine whether to format fractional seconds.

@NikanV
Copy link

NikanV commented Jun 27, 2023

Hi, i added this feature and made a pr for it.
Hope it can be a help to you, also don't forget to inform me if there was a problem with it.

@NikanV NikanV linked a pull request Jun 27, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant