moment.duration().toJSON();
When serializing a duration object to JSON, it will be represented as an ISO8601 string.
JSON.stringify({
postDuration : moment.duration(5, 'm')
}); // '{"postDuration":"PT5M"}'
When serializing a duration object to JSON, it will be represented as an ISO8601 string.
JSON.stringify({
postDuration : moment.duration(5, 'm')
}); // '{"postDuration":"PT5M"}'
From here you can search these documents. Enter your search terms below.
| Keys | Action |
|---|---|
| ? | Open this help |
| ← | Previous page |
| → | Next page |
| s | Search |