Duration

A Duration value represents a duration.

Input format

A Duration value is specified as a string in H:MM:SS format. The number of hours can be any integer, and the number of minutes and the number of seconds can be any integer between 0 and 59 (inclusive), zero-padded to a length of 2 characters. A duration can be negative by prepending a minus sign (-) to the duration value. The following examples are all valid:

0:00:00
25:15:05
-0:13:37

These durations represent a duration of 0, 90 905, and -817 seconds, respectively.

Output format

In JSON output, Duration values are encoded in exactly the same way as in the input: strings in H:MM:SS format, with an optional minux sign (-) prepended, for example:

[
   "0:00:00",
   "25:15:05",
   "-0:13:37"
]