API Reference
Classes
Duration
- Implements: ILiftable
Represents a length of time.
Static Functions
Name | Description |
---|---|
| Create a Duration representing an amount of days. |
| Create a Duration representing an amount of hours. |
| Create a Duration representing an amount of milliseconds. |
| Create a Duration representing an amount of minutes. |
| Create a Duration representing an amount of months. |
| Create a Duration representing an amount of seconds. |
| Create a Duration representing an amount of years. |
fromDays
duration.fromDays(amount: num);
Create a Duration representing an amount of days.
amount
Required
- Type: num
the amount of Days the Duration
will represent.
fromHours
duration.fromHours(amount: num);
Create a Duration representing an amount of hours.
amount
Required
- Type: num
the amount of Hours the Duration
will represent.
fromMilliseconds
duration.fromMilliseconds(amount: num);
Create a Duration representing an amount of milliseconds.
amount
Required
- Type: num
the amount of Milliseconds the Duration
will represent.
fromMinutes
duration.fromMinutes(amount: num);
Create a Duration representing an amount of minutes.
amount
Required
- Type: num
the amount of Minutes the Duration
will represent.
fromMonths
duration.fromMonths(amount: num);
Create a Duration representing an amount of months.
amount
Required
- Type: num
the amount of Months the Duration
will represent.
fromSeconds
duration.fromSeconds(amount: num);
Create a Duration representing an amount of seconds.
amount
Required
- Type: num
the amount of Seconds the Duration
will represent.
fromYears
duration.fromYears(amount: num);
Create a Duration representing an amount of years.
amount
Required
- Type: num
the amount of Years the Duration
will represent.
Properties
Name | Type | Description |
---|---|---|
| num | Return the total number of days in this Duration. |
| num | Return the total number of hours in this Duration. |
| num | Return the total number of milliseconds in this Duration. |
| num | Return the total number of minutes in this Duration. |
| num | Return the total number of months in this Duration. |
| num | Return the total number of seconds in this Duration. |
| num | Return the total number of years in this Duration. |
days
Required
days: num;
- Type: num
Return the total number of days in this Duration.
hours
Required
hours: num;
- Type: num
Return the total number of hours in this Duration.
milliseconds
Required
milliseconds: num;
- Type: num
Return the total number of milliseconds in this Duration.
minutes
Required
minutes: num;
- Type: num
Return the total number of minutes in this Duration.
months
Required
months: num;
- Type: num
Return the total number of months in this Duration.
seconds
Required
seconds: num;
- Type: num
Return the total number of seconds in this Duration.
years
Required
years: num;
- Type: num
Return the total number of years in this Duration.