Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
title version signature
As ISO 8601 String

Returns duration in string as specified by ISO 8601 standard.

moment.duration(1, 'd').toISOString() // "P1D"

Format PnYnMnDTnHnMnS description:

Unit Meaning
P _P_ stands for period. Placed at the start of the duration representation.
Y Year
M Month
D Day
T Designator that precedes the time components.
H Hour
M Minute
S Second