mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +03:00
11 lines
434 B
TypeScript
11 lines
434 B
TypeScript
// @target: es2022
|
|
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#using_timezonename
|
|
const timezoneNames = ['short', 'long', 'shortOffset', 'longOffset', 'shortGeneric', 'longGeneric'] as const;
|
|
for (const zoneName of timezoneNames) {
|
|
var formatter = new Intl.DateTimeFormat('en-US', {
|
|
timeZone: 'America/Los_Angeles',
|
|
timeZoneName: zoneName,
|
|
});
|
|
}
|