Creates a new IntlDate
in local time and specified locale (default is system locale).
Note: The allowed values for month
start at 1, which is different from legacy Date
Optional
obj: DateLikeThe date value (default is current local time)
The options for this date
Optional
Readonly
localeGet the this date's current day of the month.
Returns the weekday as a number between 1 and 7, inclusive, where Monday is 1 and Sunday is 7.
Get the this date's current hour.
Get the this date's current millisecond.
Get the this date's current minute.
Get the this date's month as a number from 1 to 12, inclusive.
Get the this date's current second.
Get the date's year.
Returns a localized string representation of this date, according to the given format string. Format codes use the same specification as moment.
new IntlDate().format('MM/DD/YYYY') // '10/31/2022'
The format string to use
Returns an object containing year, month, day-of-month, hours, minutes, seconds, milliseconds.
An object like {year, month, date, hours, minutes, seconds, ms}
Alias of getTime
Static
UTCStatic
maxStatic
minStatic
nowStatic
unixGenerated using TypeDoc
Creates a date tied to a given locale (default system locale) which can be formatted in that locale's language using the native Intl Apis directly or using a formatting string.
See
Intl Apis