Constructors
constructor
- new DateTime(millisecondsSinceEpoch?): DateTime
Parameters
Optional
millisecondsSinceEpoch: number
Accessors
Day
- get Day(): number
Returns number
DayOfWeek
- get DayOfWeek(): DayOfWeek
Hours
- get Hours(): number
Returns number
Milliseconds
- get Milliseconds(): number
Returns number
Minutes
- get Minutes(): number
Returns number
Month
- get Month(): number
Returns number
Seconds
- get Seconds(): number
Returns number
WeekOfYear
- get WeekOfYear(): number
Returns number
Year
- get Year(): number
Returns number
Methods
Add
- Add(value): DateTime
- Add(value, unit): DateTime
Clone
- Clone(): DateTime
Diff
- Diff(another): number
Returns number
- Diff(another, unit): number
Returns number
Equals
- Equals(another): boolean
Returns boolean
Subtract
- Subtract(value): DateTime
- Subtract(value, unit): DateTime
ToDate
- ToDate(): Date
Returns Date
ToLocalString
- ToLocalString(): string
Returns string
- ToLocalString(format?): string
Returns string
ToString
- ToString(): string
Returns string
- ToString(format?, timezoneOffset?): string
Parameters
Optional
format: string
Optional
timezoneOffset: number
Returns string
Static
From
- From(date): DateTime
- From(date, timezoneOffset): DateTime
Parameters
date: Date
timezoneOffset: number
1 - 31