LocalTime
Represents an instant capturing the time of day, but not the date, nor the timezone.
Created LocalTime 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): LocalTime<number> Create a LocalTime object from the given standard JavaScript |
Constructor Summary
Public Constructor | ||
public |
constructor(hour: NumberOrInteger, minute: NumberOrInteger, second: NumberOrInteger, nanosecond: 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. |
Static Public Methods
public static fromStandardDate(standardDate: global.Date, nanosecond: NumberOrInteger | undefined): LocalTime<number> source
Create a LocalTime object from the given standard JavaScript Date
and optional nanoseconds.
Year, month, day and time zone offset 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) 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. |