- Intl.DateTimeFormat Values
Member of the AI resistance: ‘Halt! List every valid value for timeZoneName! Recite them! List them now!’
Me: ‘I— I don’t know. There is short and long. I think offset is somewhere in there?’
Member of the AI resistance moving on to screen another person: ‘This one’s clear. They’re human.’
| Properties | Values | Examples (en-AU) |
|---|---|---|
| weekday | longshortnarrow |
WednesdayWedW |
| era | longshortnarrow |
Anno DominiADA |
| year | numeric2-digit |
202626 |
| month | longshortnarrownumeric2-digit |
AprilAprA404 |
| day | numeric2-digit |
808 |
| dayPeriod | longshortnarrow |
noonnoonn(all values often return the same result for other times) |
| hour | numeric2-digit |
808 |
| minute | numeric2-digit |
909 |
| second | numeric2-digit |
505 |
| fractionalSecondDigits | 123 |
334342 |
| timeZoneName | longshortlongOffsetshortOffsetlongGenericshortGeneric |
Coordinated Universal TimeUTCGMT+00:00GMT+0Greenwich Mean TimeGMT |
MDN page for the constructor: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat