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 from format #4412

Closed
jvitoroc opened this issue Jan 24, 2018 · 1 comment
Closed

Duration from format #4412

jvitoroc opened this issue Jan 24, 2018 · 1 comment

Comments

@jvitoroc
Copy link

jvitoroc commented Jan 24, 2018

Is there something like this in momentjs?
moment.duration("00:20:32,836", "HH:mm:ss,SSS").seconds();
It would work like: https://momentjs.com/docs/#/parsing/string-format/
I want to parse .srt files

@marwahaha
Copy link
Member

Short version: If you need something flexible, use a plugin, like the one here:
http://momentjs.com/docs/#/plugins/duration-format/

Long discussion here:
#1048

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

2 participants