Reference

Duration

From
Input Five numbers representing days (a), hours (b), minutes (c), seconds (d), and milliseconds (e).
Output A duration instance created from the specified components.

Signature

Example

From Days
Input A number representing the number of days.
Output A duration instance representing the specified number of days.

Signature

Example

From Hours
Input A number representing the number of hours.
Output A duration instance representing the specified number of hours.

Signature

Example

From Minutes
Input A number representing the number of minutes.
Output A duration instance representing the specified number of minutes.

Signature

Example

From Seconds
Input A number representing the number of seconds.
Output A duration instance representing the specified number of seconds.

Signature

Example

From Milliseconds
Input A number representing the number of milliseconds.
Output A duration instance representing the specified number of milliseconds.

Signature

Example

Days
Input A duration instance.
Output The days component of the duration.

Signature

Example

Hours
Input A duration instance.
Output The hours component of the duration (0-23).

Signature

Example

Minutes
Input A duration instance.
Output The minutes component of the duration (0-59).

Signature

Example

Seconds
Input A duration instance.
Output The seconds component of the duration (0-59).

Signature

Example

Milliseconds
Input A duration instance.
Output The milliseconds component of the duration (0-999).

Signature

Example

To Days
Input A duration instance.
Output The total duration converted to days.

Signature

Example

To Hours
Input A duration instance.
Output The total duration converted to hours.

Signature

Example

To Minutes
Input A duration instance.
Output The total duration converted to minutes.

Signature

Example

To Seconds
Input A duration instance.
Output The total duration converted to seconds.

Signature

Example

To Milliseconds
Input A duration instance.
Output The total duration converted to milliseconds.

Signature

Example

Format
Input A duration and a format pattern string.
Output The duration formatted according to the pattern.

Signature

Example

Compare
Input Two duration instances.
Output 1 if the first duration is longer, -1 if shorter, 0 if equal.

Signature

Example