ECMAScript: Date
Modules
es.date.to-string
, ES5 features with fixes: es.date.now
, es.date.to-iso-string
, es.date.to-json
and es.date.to-primitive
.
Annex B methods. Modules es.date.get-year
, es.date.set-year
and es.date.to-gmt-string
.
class Date {
getYear(): int;
setYear(year: int): number;
toGMTString(): string;
toISOString(): string;
toJSON(): string;
toString(): string;
@@toPrimitive(hint: 'default' | 'number' | 'string'): string | number;
static now(): number;
}
CommonJS entry points
core-js/es|stable|actual|full/date
core-js/es|stable|actual|full/date/to-string
core-js(-pure)/es|stable|actual|full/date/now
core-js(-pure)/es|stable|actual|full/date/get-year
core-js(-pure)/es|stable|actual|full/date/set-year
core-js(-pure)/es|stable|actual|full/date/to-gmt-string
core-js(-pure)/es|stable|actual|full/date/to-iso-string
core-js(-pure)/es|stable|actual|full/date/to-json
core-js(-pure)/es|stable|actual|full/date/to-primitive
Example
new Date(NaN).toString(); // => 'Invalid Date'