Time
Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date.
Created Time objects are frozen with Object.freeze()
in constructor and thus immutable.
Static Method Summary
Static Public Methods | ||
public static |
fromStandardDate(standardDate: global.Date, nanosecond: NumberOrInteger | undefined): Time<number> Create a Time object from the given standard JavaScript |
Constructor Summary
Public Constructor | ||
public |
constructor(hour: NumberOrInteger, minute: NumberOrInteger, second: NumberOrInteger, nanosecond: NumberOrInteger, timeZoneOffsetSeconds: NumberOrInteger) |
Member Summary
Public Members | ||
public |
hour: NumberOrInteger The hour. |
|
public |
minute: NumberOrInteger The minute. |
|
public |
nanosecond: NumberOrInteger The nanosecond. |
|
public |
second: NumberOrInteger The second. |
|
public |
timeZoneOffsetSeconds: NumberOrInteger The time zone offset in seconds. |
Static Public Methods
public static fromStandardDate(standardDate: global.Date, nanosecond: NumberOrInteger | undefined): Time<number> source
Create a Time object from the given standard JavaScript Date
and optional nanoseconds.
Year, month and day components of the given date are ignored.
Params:
Name | Type | Attribute | Description |
standardDate | global.Date | The standard JavaScript date to convert. |
|
nanosecond | NumberOrInteger | undefined | The optional amount of nanoseconds. |
Public Constructors
public constructor(hour: NumberOrInteger, minute: NumberOrInteger, second: NumberOrInteger, nanosecond: NumberOrInteger, timeZoneOffsetSeconds: NumberOrInteger) source
Params:
Name | Type | Attribute | Description |
hour | NumberOrInteger | The hour for the new local time. |
|
minute | NumberOrInteger | The minute for the new local time. |
|
second | NumberOrInteger | The second for the new local time. |
|
nanosecond | NumberOrInteger | The nanosecond for the new local time. |
|
timeZoneOffsetSeconds | NumberOrInteger | The time zone offset in seconds. Value represents the difference, in seconds, from UTC to local time.
This is different from standard JavaScript |