Class: Duration

Duration(nanosecondsnullable, millisecondsnullable, secondsnullable, minutesnullable, hoursnullable, daysnullable)

A duration of a specified amount of time. A duration can not be negative, throwing an error if any of the provided values are less than 0.

Constructor

new Duration(nanosecondsnullable, millisecondsnullable, secondsnullable, minutesnullable, hoursnullable, daysnullable)

Parameters:
Name Type Attributes Description
nanoseconds number <nullable>
a number of nanoseconds in addition to all other values
milliseconds number <nullable>
a number of milliseconds in addition to all other values
seconds number <nullable>
a number of seconds in addition to all other values
minutes number <nullable>
a number of minutes in addition to all other values
hours number <nullable>
a number of hours in addition to all other values
days number <nullable>
a number of days in addition to all other values
Source:

Classes

Duration

Methods

inMs() → {number}

Source:
Returns:
a total number of ms of this Duration value amounts as an integer
Type
number

value() → {DurationValue}

Source:
Returns:
a value provided to the `Duration` constructor
Type
DurationValue