Date
Represents an instant capturing the date, but not the time, nor the timezone.
Created Date objects are frozen with Object.freeze()
in constructor and thus immutable.
Static Method Summary
Static Public Methods | ||
public static |
fromStandardDate(standardDate: global.Date): Date Create a Date object from the given standard JavaScript |
Constructor Summary
Public Constructor | ||
public |
constructor(year: NumberOrInteger, month: NumberOrInteger, day: NumberOrInteger) |
Member Summary
Public Members | ||
public |
day: NumberOrInteger The day. |
|
public |
month: NumberOrInteger The month. |
|
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): Date source
Create a Date object from the given standard JavaScript Date
.
Hour, minute, second, millisecond 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. |
Public Constructors
public constructor(year: NumberOrInteger, month: NumberOrInteger, day: 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. |
Public Members
Public Methods
public toStandardDate(): StandardDate source
Convert date to standard JavaScript Date
.
The time component of the returned Date
is set to midnight
and the time zone is set to UTC.
Return:
StandardDate | Standard JavaScript |