LocalDateTime
Represents an instant capturing the date and the time, but not the timezone.
Created LocalDateTime 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): LocalDateTime Create a LocalDateTime object from the given standard JavaScript |
Constructor Summary
Public Constructor | ||
public |
constructor(year: NumberOrInteger, month: NumberOrInteger, day: NumberOrInteger, hour: NumberOrInteger, minute: NumberOrInteger, second: NumberOrInteger, nanosecond: NumberOrInteger) |
Member Summary
Public Members | ||
public |
day: NumberOrInteger The day. |
|
public |
hour: NumberOrInteger The hour. |
|
public |
minute: NumberOrInteger The minute. |
|
public |
month: NumberOrInteger The month. |
|
public |
nanosecond: NumberOrInteger The nanosecond. |
|
public |
second: NumberOrInteger The second. |
|
public |
year: NumberOrInteger The year. |
Method Summary
Public Methods | ||
public |
toStandardDate(): StandardDate Convert date to standard JavaScript |
Static Public Methods
public static fromStandardDate(standardDate: global.Date, nanosecond: NumberOrInteger | undefined): LocalDateTime source
Create a LocalDateTime object from the given standard JavaScript Date
and optional nanoseconds.
Time zone offset component of the given date is 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(year: NumberOrInteger, month: NumberOrInteger, day: NumberOrInteger, hour: NumberOrInteger, minute: NumberOrInteger, second: NumberOrInteger, nanosecond: NumberOrInteger) source
Params:
Name | Type | Attribute | Description |
year | NumberOrInteger | The year for the new local date. |
|
month | NumberOrInteger | The month for the new local date. |
|
day | NumberOrInteger | The day for the new local date. |
|
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. |
Public Members
Public Methods
public toStandardDate(): StandardDate source
Convert date to standard JavaScript Date
.
Return:
StandardDate | Standard JavaScript |