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

Ability to parse an ISO Duration string #861

Closed
redben opened this issue Jun 21, 2013 · 3 comments
Closed

Ability to parse an ISO Duration string #861

redben opened this issue Jun 21, 2013 · 3 comments

Comments

@redben
Copy link

redben commented Jun 21, 2013

Hi,
It would be nice if moment supported ISO duration format, like :
moment.duration("PT16H40M");

@mattjohnsonpint
Copy link
Contributor

+1.

Also, you should be able to format a duration this way, or using other format specifiers such as:

moment.duration(3.25, 'minutes').format('mm:ss')

Probably duration#format without parameters would format as an ISO duration.

@ichernev
Copy link
Contributor

We'd accept a pull request for parsing ISO duration tokens. About printing with a format -- that's been requested multiple times: #463, #704.

ichernev added a commit to ichernev/moment that referenced this issue Jul 21, 2013
ichernev added a commit to ichernev/moment that referenced this issue Jul 21, 2013
bollwyvl pushed a commit to bollwyvl/moment that referenced this issue Sep 17, 2013
@icambron
Copy link
Member

icambron commented Oct 3, 2013

Closed by #1113

@icambron icambron closed this as completed Oct 3, 2013
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

4 participants