@formatjs/intl-datetimeformat 6.11.3 → 6.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE.md +1 -1
  2. package/lib/index.js +1 -4
  3. package/lib/polyfill-force.js +10 -12
  4. package/lib/polyfill.js +12 -14
  5. package/lib/should-polyfill.js +4 -8
  6. package/lib/src/abstract/BasicFormatMatcher.js +26 -30
  7. package/lib/src/abstract/BestFitFormatMatcher.js +19 -24
  8. package/lib/src/abstract/DateTimeStyleFormat.js +5 -9
  9. package/lib/src/abstract/FormatDateTime.js +3 -7
  10. package/lib/src/abstract/FormatDateTimePattern.js +7 -11
  11. package/lib/src/abstract/FormatDateTimeRange.js +3 -7
  12. package/lib/src/abstract/FormatDateTimeRangeToParts.js +3 -7
  13. package/lib/src/abstract/FormatDateTimeToParts.js +5 -9
  14. package/lib/src/abstract/InitializeDateTimeFormat.d.ts +1 -1
  15. package/lib/src/abstract/InitializeDateTimeFormat.js +43 -43
  16. package/lib/src/abstract/PartitionDateTimePattern.js +5 -9
  17. package/lib/src/abstract/PartitionDateTimeRangePattern.js +16 -20
  18. package/lib/src/abstract/ToDateTimeOptions.js +3 -7
  19. package/lib/src/abstract/ToLocalTime.js +12 -16
  20. package/lib/src/abstract/skeleton.js +15 -22
  21. package/lib/src/abstract/utils.js +9 -12
  22. package/lib/src/core.d.ts +1 -1
  23. package/lib/src/core.js +106 -109
  24. package/lib/src/data/all-tz.js +1 -3
  25. package/lib/src/data/links.js +1 -3
  26. package/lib/src/get_internal_slots.js +1 -4
  27. package/lib/src/packer.js +5 -10
  28. package/lib/src/to_locale_string.js +8 -14
  29. package/lib/src/types.js +1 -2
  30. package/lib/supported-locales.generated.js +1 -4
  31. package/lib/test262-main.js +3 -6
  32. package/package.json +4 -4
  33. package/polyfill.iife.js +6340 -9452
  34. package/src/abstract/InitializeDateTimeFormat.d.ts +1 -1
  35. package/src/abstract/InitializeDateTimeFormat.js +11 -7
  36. package/src/abstract/skeleton.js +1 -1
  37. package/src/core.d.ts +1 -1
  38. package/src/core.js +9 -9
package/lib/src/core.js CHANGED
@@ -1,20 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateTimeFormat = void 0;
4
- var tslib_1 = require("tslib");
5
- var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
6
- var get_internal_slots_1 = tslib_1.__importDefault(require("./get_internal_slots"));
7
- var links_1 = tslib_1.__importDefault(require("./data/links"));
8
- var packer_1 = require("./packer");
9
- var FormatDateTime_1 = require("./abstract/FormatDateTime");
10
- var InitializeDateTimeFormat_1 = require("./abstract/InitializeDateTimeFormat");
11
- var utils_1 = require("./abstract/utils");
12
- var FormatDateTimeToParts_1 = require("./abstract/FormatDateTimeToParts");
13
- var FormatDateTimeRangeToParts_1 = require("./abstract/FormatDateTimeRangeToParts");
14
- var FormatDateTimeRange_1 = require("./abstract/FormatDateTimeRange");
15
- var skeleton_1 = require("./abstract/skeleton");
16
- var UPPERCASED_LINKS = Object.keys(links_1.default).reduce(function (all, l) {
17
- all[l.toUpperCase()] = links_1.default[l];
1
+ import { __assign, __rest } from "tslib";
2
+ import { CanonicalizeLocaleList, CanonicalizeTimeZoneName, IsValidTimeZoneName, OrdinaryHasInstance, SupportedLocales, ToNumber, defineProperty, invariant, } from '@formatjs/ecma402-abstract';
3
+ import { FormatDateTime } from './abstract/FormatDateTime';
4
+ import { FormatDateTimeRange } from './abstract/FormatDateTimeRange';
5
+ import { FormatDateTimeRangeToParts } from './abstract/FormatDateTimeRangeToParts';
6
+ import { FormatDateTimeToParts } from './abstract/FormatDateTimeToParts';
7
+ import { InitializeDateTimeFormat } from './abstract/InitializeDateTimeFormat';
8
+ import { parseDateTimeSkeleton } from './abstract/skeleton';
9
+ import { DATE_TIME_PROPS } from './abstract/utils';
10
+ import links from './data/links';
11
+ import getInternalSlots from './get_internal_slots';
12
+ import { unpack } from './packer';
13
+ var UPPERCASED_LINKS = Object.keys(links).reduce(function (all, l) {
14
+ all[l.toUpperCase()] = links[l];
18
15
  return all;
19
16
  }, {});
20
17
  var RESOLVED_OPTIONS_KEYS = [
@@ -40,10 +37,10 @@ var formatDescriptor = {
40
37
  configurable: true,
41
38
  get: function () {
42
39
  if (typeof this !== 'object' ||
43
- !(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.DateTimeFormat, this)) {
40
+ !OrdinaryHasInstance(DateTimeFormat, this)) {
44
41
  throw TypeError('Intl.DateTimeFormat format property accessor called on incompatible receiver');
45
42
  }
46
- var internalSlots = (0, get_internal_slots_1.default)(this);
43
+ var internalSlots = getInternalSlots(this);
47
44
  // eslint-disable-next-line @typescript-eslint/no-this-alias
48
45
  var dtf = this;
49
46
  var boundFormat = internalSlots.boundFormat;
@@ -57,11 +54,11 @@ var formatDescriptor = {
57
54
  else {
58
55
  x = Number(date);
59
56
  }
60
- return (0, FormatDateTime_1.FormatDateTime)(dtf, x, {
61
- getInternalSlots: get_internal_slots_1.default,
62
- localeData: exports.DateTimeFormat.localeData,
63
- tzData: exports.DateTimeFormat.tzData,
64
- getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
57
+ return FormatDateTime(dtf, x, {
58
+ getInternalSlots: getInternalSlots,
59
+ localeData: DateTimeFormat.localeData,
60
+ tzData: DateTimeFormat.tzData,
61
+ getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
65
62
  });
66
63
  };
67
64
  try {
@@ -95,41 +92,41 @@ catch (e) {
95
92
  // In older browser (e.g Chrome 36 like polyfill.io)
96
93
  // TypeError: Cannot redefine property: name
97
94
  }
98
- exports.DateTimeFormat = function (locales, options) {
95
+ export var DateTimeFormat = function (locales, options) {
99
96
  // Cannot use `new.target` bc of IE11 & TS transpiles it to something else
100
- if (!this || !(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.DateTimeFormat, this)) {
101
- return new exports.DateTimeFormat(locales, options);
97
+ if (!this || !OrdinaryHasInstance(DateTimeFormat, this)) {
98
+ return new DateTimeFormat(locales, options);
102
99
  }
103
- (0, InitializeDateTimeFormat_1.InitializeDateTimeFormat)(this, locales, options, {
104
- tzData: exports.DateTimeFormat.tzData,
100
+ InitializeDateTimeFormat(this, locales, options, {
101
+ tzData: DateTimeFormat.tzData,
105
102
  uppercaseLinks: UPPERCASED_LINKS,
106
- availableLocales: exports.DateTimeFormat.availableLocales,
107
- relevantExtensionKeys: exports.DateTimeFormat.relevantExtensionKeys,
108
- getDefaultLocale: exports.DateTimeFormat.getDefaultLocale,
109
- getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
110
- getInternalSlots: get_internal_slots_1.default,
111
- localeData: exports.DateTimeFormat.localeData,
103
+ availableLocales: DateTimeFormat.availableLocales,
104
+ relevantExtensionKeys: DateTimeFormat.relevantExtensionKeys,
105
+ getDefaultLocale: DateTimeFormat.getDefaultLocale,
106
+ getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
107
+ getInternalSlots: getInternalSlots,
108
+ localeData: DateTimeFormat.localeData,
112
109
  });
113
110
  /** IMPL START */
114
- var internalSlots = (0, get_internal_slots_1.default)(this);
111
+ var internalSlots = getInternalSlots(this);
115
112
  var dataLocale = internalSlots.dataLocale;
116
- var dataLocaleData = exports.DateTimeFormat.localeData[dataLocale];
117
- (0, ecma402_abstract_1.invariant)(dataLocaleData !== undefined, "Cannot load locale-dependent data for ".concat(dataLocale, "."));
113
+ var dataLocaleData = DateTimeFormat.localeData[dataLocale];
114
+ invariant(dataLocaleData !== undefined, "Cannot load locale-dependent data for ".concat(dataLocale, "."));
118
115
  /** IMPL END */
119
116
  };
120
117
  // Static properties
121
- (0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat, 'supportedLocalesOf', {
118
+ defineProperty(DateTimeFormat, 'supportedLocalesOf', {
122
119
  value: function supportedLocalesOf(locales, options) {
123
- return (0, ecma402_abstract_1.SupportedLocales)(exports.DateTimeFormat.availableLocales, (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales), options);
120
+ return SupportedLocales(DateTimeFormat.availableLocales, CanonicalizeLocaleList(locales), options);
124
121
  },
125
122
  });
126
- (0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat.prototype, 'resolvedOptions', {
123
+ defineProperty(DateTimeFormat.prototype, 'resolvedOptions', {
127
124
  value: function resolvedOptions() {
128
125
  if (typeof this !== 'object' ||
129
- !(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.DateTimeFormat, this)) {
126
+ !OrdinaryHasInstance(DateTimeFormat, this)) {
130
127
  throw TypeError('Method Intl.DateTimeFormat.prototype.resolvedOptions called on incompatible receiver');
131
128
  }
132
- var internalSlots = (0, get_internal_slots_1.default)(this);
129
+ var internalSlots = getInternalSlots(this);
133
130
  var ro = {};
134
131
  for (var _i = 0, RESOLVED_OPTIONS_KEYS_1 = RESOLVED_OPTIONS_KEYS; _i < RESOLVED_OPTIONS_KEYS_1.length; _i++) {
135
132
  var key = RESOLVED_OPTIONS_KEYS_1[_i];
@@ -144,7 +141,7 @@ exports.DateTimeFormat = function (locales, options) {
144
141
  ro.hour12 = hour12;
145
142
  }
146
143
  }
147
- if (utils_1.DATE_TIME_PROPS.indexOf(key) > -1) {
144
+ if (DATE_TIME_PROPS.indexOf(key) > -1) {
148
145
  if (internalSlots.dateStyle !== undefined ||
149
146
  internalSlots.timeStyle !== undefined) {
150
147
  value = undefined;
@@ -157,23 +154,23 @@ exports.DateTimeFormat = function (locales, options) {
157
154
  return ro;
158
155
  },
159
156
  });
160
- (0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat.prototype, 'formatToParts', {
157
+ defineProperty(DateTimeFormat.prototype, 'formatToParts', {
161
158
  value: function formatToParts(date) {
162
159
  if (date === undefined) {
163
160
  date = Date.now();
164
161
  }
165
162
  else {
166
- date = (0, ecma402_abstract_1.ToNumber)(date);
163
+ date = ToNumber(date);
167
164
  }
168
- return (0, FormatDateTimeToParts_1.FormatDateTimeToParts)(this, date, {
169
- getInternalSlots: get_internal_slots_1.default,
170
- localeData: exports.DateTimeFormat.localeData,
171
- tzData: exports.DateTimeFormat.tzData,
172
- getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
165
+ return FormatDateTimeToParts(this, date, {
166
+ getInternalSlots: getInternalSlots,
167
+ localeData: DateTimeFormat.localeData,
168
+ tzData: DateTimeFormat.tzData,
169
+ getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
173
170
  });
174
171
  },
175
172
  });
176
- (0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat.prototype, 'formatRangeToParts', {
173
+ defineProperty(DateTimeFormat.prototype, 'formatRangeToParts', {
177
174
  value: function formatRangeToParts(startDate, endDate) {
178
175
  var dtf = this;
179
176
  if (typeof dtf !== 'object') {
@@ -182,17 +179,17 @@ exports.DateTimeFormat = function (locales, options) {
182
179
  if (startDate === undefined || endDate === undefined) {
183
180
  throw new TypeError('startDate/endDate cannot be undefined');
184
181
  }
185
- var x = (0, ecma402_abstract_1.ToNumber)(startDate);
186
- var y = (0, ecma402_abstract_1.ToNumber)(endDate);
187
- return (0, FormatDateTimeRangeToParts_1.FormatDateTimeRangeToParts)(dtf, x, y, {
188
- getInternalSlots: get_internal_slots_1.default,
189
- localeData: exports.DateTimeFormat.localeData,
190
- tzData: exports.DateTimeFormat.tzData,
191
- getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
182
+ var x = ToNumber(startDate);
183
+ var y = ToNumber(endDate);
184
+ return FormatDateTimeRangeToParts(dtf, x, y, {
185
+ getInternalSlots: getInternalSlots,
186
+ localeData: DateTimeFormat.localeData,
187
+ tzData: DateTimeFormat.tzData,
188
+ getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
192
189
  });
193
190
  },
194
191
  });
195
- (0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat.prototype, 'formatRange', {
192
+ defineProperty(DateTimeFormat.prototype, 'formatRange', {
196
193
  value: function formatRange(startDate, endDate) {
197
194
  var dtf = this;
198
195
  if (typeof dtf !== 'object') {
@@ -201,65 +198,65 @@ exports.DateTimeFormat = function (locales, options) {
201
198
  if (startDate === undefined || endDate === undefined) {
202
199
  throw new TypeError('startDate/endDate cannot be undefined');
203
200
  }
204
- var x = (0, ecma402_abstract_1.ToNumber)(startDate);
205
- var y = (0, ecma402_abstract_1.ToNumber)(endDate);
206
- return (0, FormatDateTimeRange_1.FormatDateTimeRange)(dtf, x, y, {
207
- getInternalSlots: get_internal_slots_1.default,
208
- localeData: exports.DateTimeFormat.localeData,
209
- tzData: exports.DateTimeFormat.tzData,
210
- getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
201
+ var x = ToNumber(startDate);
202
+ var y = ToNumber(endDate);
203
+ return FormatDateTimeRange(dtf, x, y, {
204
+ getInternalSlots: getInternalSlots,
205
+ localeData: DateTimeFormat.localeData,
206
+ tzData: DateTimeFormat.tzData,
207
+ getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
211
208
  });
212
209
  },
213
210
  });
214
211
  var DEFAULT_TIMEZONE = 'UTC';
215
- exports.DateTimeFormat.__setDefaultTimeZone = function (timeZone) {
212
+ DateTimeFormat.__setDefaultTimeZone = function (timeZone) {
216
213
  if (timeZone !== undefined) {
217
214
  timeZone = String(timeZone);
218
- if (!(0, ecma402_abstract_1.IsValidTimeZoneName)(timeZone, {
219
- tzData: exports.DateTimeFormat.tzData,
215
+ if (!IsValidTimeZoneName(timeZone, {
216
+ zoneNamesFromData: Object.keys(DateTimeFormat.tzData),
220
217
  uppercaseLinks: UPPERCASED_LINKS,
221
218
  })) {
222
219
  throw new RangeError('Invalid timeZoneName');
223
220
  }
224
- timeZone = (0, ecma402_abstract_1.CanonicalizeTimeZoneName)(timeZone, {
225
- tzData: exports.DateTimeFormat.tzData,
221
+ timeZone = CanonicalizeTimeZoneName(timeZone, {
222
+ zoneNames: Object.keys(DateTimeFormat.tzData),
226
223
  uppercaseLinks: UPPERCASED_LINKS,
227
224
  });
228
225
  }
229
226
  else {
230
227
  timeZone = DEFAULT_TIMEZONE;
231
228
  }
232
- exports.DateTimeFormat.__defaultTimeZone = timeZone;
229
+ DateTimeFormat.__defaultTimeZone = timeZone;
233
230
  };
234
- exports.DateTimeFormat.relevantExtensionKeys = ['nu', 'ca', 'hc'];
235
- exports.DateTimeFormat.__defaultTimeZone = DEFAULT_TIMEZONE;
236
- exports.DateTimeFormat.getDefaultTimeZone = function () { return exports.DateTimeFormat.__defaultTimeZone; };
237
- exports.DateTimeFormat.__addLocaleData = function __addLocaleData() {
231
+ DateTimeFormat.relevantExtensionKeys = ['nu', 'ca', 'hc'];
232
+ DateTimeFormat.__defaultTimeZone = DEFAULT_TIMEZONE;
233
+ DateTimeFormat.getDefaultTimeZone = function () { return DateTimeFormat.__defaultTimeZone; };
234
+ DateTimeFormat.__addLocaleData = function __addLocaleData() {
238
235
  var data = [];
239
236
  for (var _i = 0; _i < arguments.length; _i++) {
240
237
  data[_i] = arguments[_i];
241
238
  }
242
239
  var _loop_1 = function (d, locale) {
243
- var dateFormat = d.dateFormat, timeFormat = d.timeFormat, dateTimeFormat = d.dateTimeFormat, formats = d.formats, intervalFormats = d.intervalFormats, rawData = tslib_1.__rest(d, ["dateFormat", "timeFormat", "dateTimeFormat", "formats", "intervalFormats"]);
244
- var processedData = tslib_1.__assign(tslib_1.__assign({}, rawData), { dateFormat: {
245
- full: (0, skeleton_1.parseDateTimeSkeleton)(dateFormat.full),
246
- long: (0, skeleton_1.parseDateTimeSkeleton)(dateFormat.long),
247
- medium: (0, skeleton_1.parseDateTimeSkeleton)(dateFormat.medium),
248
- short: (0, skeleton_1.parseDateTimeSkeleton)(dateFormat.short),
240
+ var dateFormat = d.dateFormat, timeFormat = d.timeFormat, dateTimeFormat = d.dateTimeFormat, formats = d.formats, intervalFormats = d.intervalFormats, rawData = __rest(d, ["dateFormat", "timeFormat", "dateTimeFormat", "formats", "intervalFormats"]);
241
+ var processedData = __assign(__assign({}, rawData), { dateFormat: {
242
+ full: parseDateTimeSkeleton(dateFormat.full),
243
+ long: parseDateTimeSkeleton(dateFormat.long),
244
+ medium: parseDateTimeSkeleton(dateFormat.medium),
245
+ short: parseDateTimeSkeleton(dateFormat.short),
249
246
  }, timeFormat: {
250
- full: (0, skeleton_1.parseDateTimeSkeleton)(timeFormat.full),
251
- long: (0, skeleton_1.parseDateTimeSkeleton)(timeFormat.long),
252
- medium: (0, skeleton_1.parseDateTimeSkeleton)(timeFormat.medium),
253
- short: (0, skeleton_1.parseDateTimeSkeleton)(timeFormat.short),
247
+ full: parseDateTimeSkeleton(timeFormat.full),
248
+ long: parseDateTimeSkeleton(timeFormat.long),
249
+ medium: parseDateTimeSkeleton(timeFormat.medium),
250
+ short: parseDateTimeSkeleton(timeFormat.short),
254
251
  }, dateTimeFormat: {
255
- full: (0, skeleton_1.parseDateTimeSkeleton)(dateTimeFormat.full).pattern,
256
- long: (0, skeleton_1.parseDateTimeSkeleton)(dateTimeFormat.long).pattern,
257
- medium: (0, skeleton_1.parseDateTimeSkeleton)(dateTimeFormat.medium).pattern,
258
- short: (0, skeleton_1.parseDateTimeSkeleton)(dateTimeFormat.short).pattern,
252
+ full: parseDateTimeSkeleton(dateTimeFormat.full).pattern,
253
+ long: parseDateTimeSkeleton(dateTimeFormat.long).pattern,
254
+ medium: parseDateTimeSkeleton(dateTimeFormat.medium).pattern,
255
+ short: parseDateTimeSkeleton(dateTimeFormat.short).pattern,
259
256
  }, formats: {} });
260
257
  var _loop_2 = function (calendar) {
261
258
  processedData.formats[calendar] = Object.keys(formats[calendar]).map(function (skeleton) {
262
- return (0, skeleton_1.parseDateTimeSkeleton)(skeleton, formats[calendar][skeleton], intervalFormats[skeleton], intervalFormats.intervalFormatFallback);
259
+ return parseDateTimeSkeleton(skeleton, formats[calendar][skeleton], intervalFormats[skeleton], intervalFormats.intervalFormatFallback);
263
260
  });
264
261
  };
265
262
  for (var calendar in formats) {
@@ -268,11 +265,11 @@ exports.DateTimeFormat.__addLocaleData = function __addLocaleData() {
268
265
  var minimizedLocale = new Intl.Locale(locale)
269
266
  .minimize()
270
267
  .toString();
271
- exports.DateTimeFormat.localeData[locale] = exports.DateTimeFormat.localeData[minimizedLocale] = processedData;
272
- exports.DateTimeFormat.availableLocales.add(locale);
273
- exports.DateTimeFormat.availableLocales.add(minimizedLocale);
274
- if (!exports.DateTimeFormat.__defaultLocale) {
275
- exports.DateTimeFormat.__defaultLocale = minimizedLocale;
268
+ DateTimeFormat.localeData[locale] = DateTimeFormat.localeData[minimizedLocale] = processedData;
269
+ DateTimeFormat.availableLocales.add(locale);
270
+ DateTimeFormat.availableLocales.add(minimizedLocale);
271
+ if (!DateTimeFormat.__defaultLocale) {
272
+ DateTimeFormat.__defaultLocale = minimizedLocale;
276
273
  }
277
274
  };
278
275
  for (var _a = 0, data_1 = data; _a < data_1.length; _a++) {
@@ -280,28 +277,28 @@ exports.DateTimeFormat.__addLocaleData = function __addLocaleData() {
280
277
  _loop_1(d, locale);
281
278
  }
282
279
  };
283
- Object.defineProperty(exports.DateTimeFormat.prototype, 'format', formatDescriptor);
284
- exports.DateTimeFormat.__defaultLocale = '';
285
- exports.DateTimeFormat.localeData = {};
286
- exports.DateTimeFormat.availableLocales = new Set();
287
- exports.DateTimeFormat.getDefaultLocale = function () {
288
- return exports.DateTimeFormat.__defaultLocale;
280
+ Object.defineProperty(DateTimeFormat.prototype, 'format', formatDescriptor);
281
+ DateTimeFormat.__defaultLocale = '';
282
+ DateTimeFormat.localeData = {};
283
+ DateTimeFormat.availableLocales = new Set();
284
+ DateTimeFormat.getDefaultLocale = function () {
285
+ return DateTimeFormat.__defaultLocale;
289
286
  };
290
- exports.DateTimeFormat.polyfilled = true;
291
- exports.DateTimeFormat.tzData = {};
292
- exports.DateTimeFormat.__addTZData = function (d) {
293
- exports.DateTimeFormat.tzData = (0, packer_1.unpack)(d);
287
+ DateTimeFormat.polyfilled = true;
288
+ DateTimeFormat.tzData = {};
289
+ DateTimeFormat.__addTZData = function (d) {
290
+ DateTimeFormat.tzData = unpack(d);
294
291
  };
295
292
  try {
296
293
  if (typeof Symbol !== 'undefined') {
297
- Object.defineProperty(exports.DateTimeFormat.prototype, Symbol.toStringTag, {
294
+ Object.defineProperty(DateTimeFormat.prototype, Symbol.toStringTag, {
298
295
  value: 'Intl.DateTimeFormat',
299
296
  writable: false,
300
297
  enumerable: false,
301
298
  configurable: true,
302
299
  });
303
300
  }
304
- Object.defineProperty(exports.DateTimeFormat.prototype.constructor, 'length', {
301
+ Object.defineProperty(DateTimeFormat.prototype.constructor, 'length', {
305
302
  value: 1,
306
303
  writable: false,
307
304
  enumerable: false,
@@ -1,8 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  // @generated
4
2
  // prettier-ignore
5
- exports.default = {
3
+ export default {
6
4
  "abbrvs": "LMT|GMT|+0230|EAT|+0245|PMT|WET|WEST|CET|CEST|+0030|WAT|-01|CAT|EET|EEST|+00|+01|SAST|CAST|MMT|WAST|+0130|NST|NWT|NPT|BST|BDT|AHST|HST|HDT|AST|AWT|APT|AHDT|YST|AKST|AKDT|-03|-02|CMT|-04|AMT|EST|MST|CST|MDT|PST|CDT|ADT|-0330|-0530|CWT|CPT|BMT|-05|PDT|MWT|MPT|-00|EDT|-0430|SJMT|YDT|YWT|YPT|YDDT|PWT|PPT|EWT|EPT|NDT|ADDT|KMT|QMT|-0345|HMT|FFMT|-0230|-0130|PPMT|SMT|SDMT|NDDT|+08|+11|+07|+05|PMMT|+10|AEST|AEDT|+06|NZMT|NZST|NZDT|+03|+02|CEMT|+12|+13|+14|+04|+0730|+0820|+09|+0530|+0630|IST|IDT|PLMT|HKT|HKST|HKWT|JST|IMT|+0720|WIB|+0930|WIT|JMT|IDDT|+0430|PKT|PKST|+0545|WITA|KST|KDT|TBMT|TMT|+0330|JDT|RMT|FMT|ACST|ACDT|+0845|+0945|+1030|+1130|AWST|AWDT|MSK|MSD|DMT|BDST|WEMT|MDST|LST|WMT|-1130|-11|-10|+1215|+1245|+1345|EMT|-07|-06|-09|GST|GDT|ChST|HWT|HPT|-12|-1040|-0930|SST|-1120|+1112|+1230|-0830|-08|-1030|+1220|GMT+14|GMT+13|GMT+12|GMT+11|GMT+10|GMT+9|GMT+8|GMT+7|GMT+6|GMT+5|GMT+4|GMT+3|GMT+2|GMT+1|GMT-1|GMT-2|GMT-3|GMT-4|GMT-5|GMT-6|GMT-7|GMT-8|GMT-9|GMT-10|GMT-11|GMT-12",
7
5
  "offsets": "-qw|0|6tg|6y0|8c0|7n0|kc|fl|2s0|5k0|mn|1e0|-2vw|-2s0|618|5sl|-1ek|-zg|-2g0|56o|460|5us|60w|-1zw|-226|2sc|18w|-1p9|2fw|1vw|360|xya|-wpq|-uk0|-rs0|-p00|12wo|-rrc|-m80|-c8p|-b40|-8c0|-8xc|-5k0|-ato|-bw0|-c6k|-c3c|-cdo|-cqs|-ctg|-c44|-cos|-cac|-c2s|-cnc|-aog|-eq8|-eso|-dw0|-74s|-jho|-jg0|-go0|-b1h|-9q0|-8z8|-gc0|-fa0|-b8g|-dps|-lip|-a44|-g2g|-ce8|-ce4|-ci0|-9ow|-g8c|-jn8|-jpw|-fkd|-kr6|-adw|-3gg|-ptg|-m9k|-jfw|-fdn|-l0g|-cxs|-gio|-mpz|-74o|-b3o|-b6s|-9rg|-6zg|-6y0|-d68|-e7y|-grg|-es8|-ejc|-arr|-af0|-bs0|-f94|-f9c|-kjs|-fye|-g1i|-fzn|-g5v|-g2f|-fr4|-g7j|-g1d|15rv|-ow5|-fvq|-fpo|-cmc|-9uc|-e9o|-eac|-lwa|-6m4|-fz8|-fzc|-b44|-bb8|-i20|-jpg|-g83|-glg|16au|-od6|-id0|-aeg|-bzw|-iks|-aer|-460|-ep8|-dpe|101a|-umq|-604|-iuj|-irc|-is3|-9kw|-jc4|-a7s|-a84|-a7o|-de8|-ddo|-bu0|-d4s|-d39|-hzo|-6go|-jdo|-ck0|-a4o|-cy0|-cyo|-8ms|-42g|15lz|-p21|-jyw|-g5g|-cqk|-lo4|-mss|-p0c|14sh|-pvj|m80|uk0|jg0|dw0|r94|r8w|rs0|go0|wd4|vy0|yq0|xc0|1040|8ng|g7w|2h4|e90|6nk|wv8|12w0|9b4|b40|al4|at8|9m8|884|880|9jk|98c|im4|fic|6ko|dtc|kfk|ku0|n5c|p00|l0g|l7c|esc|esk|fa0|i20|6q0|gqs|gcw|n98|a8o|cqo|6ac|6ds|6hz|jqu|l56|nm0|gz0|jb5|js0|kdc|q20|qe0|6iu|6ig|ctc|ci0|tdo|cf0|fss|fz0|p3p|gd4|eva|h72|j8d|l0y|rxc|m40|-189c|meo|66g|g5c|fcs|dl6|9ic|k8w|nac|bs4|c4g|qfc|ceh|nig|mhj|sgs|mi0|ctz|8an|9iw|9q0|glo|pvn|fqf|jsk|qiu|of7|o0y|htb|b89|af5|88o|-4r4|-5aw|-c06|-986|-2uo|-4cs|-194|-34o|-6rk|-apo|pnw|t60|sc8|q70|ra4|o88|nv4|ob0|r30|rl8|tgk|qug|lgc|s04|t6|a4|8wc|4e4|3so|2o8|4u0|3j8|1kw|1dm|5c8|5bo|-169|1lr|-zo|-23|4md|5d4|5ew|97c|5ng|-ok|2os|53s|53c|6yh|707|9s7|ck7|4gy|78y|2b8|99w|8j6|6bc|6ao|4bg|4l0|3o8|8yo|30x|4os|3w0|4fc|des|dm0|anc|yv4|-vsw|-vy0|st4|xz0|y10|zf0|1270|-k94|v64|-vpk|x4w|w1g|-glc|-ozo|tmc|-13v0|qt0|-t8e|-t60|-qe0|-xc0|-t4w|-tmo|-10hg|u6k|uzk|-pu0|z20|-vm0|uws|-vgs|-vhc|v3s|v40|uto|-15rg|owk|-o38|-nm0|112w|-tl4|-rp4|y80|y9c",
8
6
  "zones": [
@@ -1,8 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  // @generated
4
2
  // prettier-ignore
5
- exports.default = {
3
+ export default {
6
4
  "Africa/Accra": "Africa/Abidjan",
7
5
  "Africa/Addis_Ababa": "Africa/Nairobi",
8
6
  "Africa/Asmara": "Africa/Nairobi",
@@ -1,9 +1,7 @@
1
- "use strict";
2
1
  // Type-only circular import
3
2
  // eslint-disable-next-line import/no-cycle
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
3
  var internalSlotMap = new WeakMap();
6
- function getInternalSlots(x) {
4
+ export default function getInternalSlots(x) {
7
5
  var internalSlots = internalSlotMap.get(x);
8
6
  if (!internalSlots) {
9
7
  internalSlots = Object.create(null);
@@ -11,4 +9,3 @@ function getInternalSlots(x) {
11
9
  }
12
10
  return internalSlots;
13
11
  }
14
- exports.default = getInternalSlots;
package/lib/src/packer.js CHANGED
@@ -1,25 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unpack = exports.pack = void 0;
4
- var tslib_1 = require("tslib");
5
- function pack(data) {
1
+ import { __spreadArray } from "tslib";
2
+ export function pack(data) {
6
3
  var zoneNames = Object.keys(data.zones);
7
4
  zoneNames.sort(); // so output is stable
8
5
  return {
9
6
  zones: zoneNames.map(function (zone) {
10
- return tslib_1.__spreadArray([
7
+ return __spreadArray([
11
8
  zone
12
9
  ], data.zones[zone].map(function (_a) {
13
10
  var ts = _a[0], others = _a.slice(1);
14
- return tslib_1.__spreadArray([ts === '' ? '' : ts.toString(36)], others, true).join(',');
11
+ return __spreadArray([ts === '' ? '' : ts.toString(36)], others, true).join(',');
15
12
  }), true).join('|');
16
13
  }),
17
14
  abbrvs: data.abbrvs.join('|'),
18
15
  offsets: data.offsets.map(function (o) { return o.toString(36); }).join('|'),
19
16
  };
20
17
  }
21
- exports.pack = pack;
22
- function unpack(data) {
18
+ export function unpack(data) {
23
19
  var abbrvs = data.abbrvs.split('|');
24
20
  var offsets = data.offsets.split('|').map(function (n) { return parseInt(n, 36); });
25
21
  var packedZones = data.zones;
@@ -41,4 +37,3 @@ function unpack(data) {
41
37
  }
42
38
  return zones;
43
39
  }
44
- exports.unpack = unpack;
@@ -1,25 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toLocaleTimeString = exports.toLocaleDateString = exports.toLocaleString = void 0;
4
1
  // eslint-disable-next-line import/no-cycle
5
- var core_1 = require("./core");
6
- var ToDateTimeOptions_1 = require("./abstract/ToDateTimeOptions");
2
+ import { DateTimeFormat } from './core';
3
+ import { ToDateTimeOptions } from './abstract/ToDateTimeOptions';
7
4
  /**
8
5
  * Number.prototype.toLocaleString ponyfill
9
6
  * https://tc39.es/ecma402/#sup-number.prototype.tolocalestring
10
7
  */
11
- function toLocaleString(x, locales, options) {
12
- var dtf = new core_1.DateTimeFormat(locales, options);
8
+ export function toLocaleString(x, locales, options) {
9
+ var dtf = new DateTimeFormat(locales, options);
13
10
  return dtf.format(x);
14
11
  }
15
- exports.toLocaleString = toLocaleString;
16
- function toLocaleDateString(x, locales, options) {
17
- var dtf = new core_1.DateTimeFormat(locales, (0, ToDateTimeOptions_1.ToDateTimeOptions)(options, 'date', 'date'));
12
+ export function toLocaleDateString(x, locales, options) {
13
+ var dtf = new DateTimeFormat(locales, ToDateTimeOptions(options, 'date', 'date'));
18
14
  return dtf.format(x);
19
15
  }
20
- exports.toLocaleDateString = toLocaleDateString;
21
- function toLocaleTimeString(x, locales, options) {
22
- var dtf = new core_1.DateTimeFormat(locales, (0, ToDateTimeOptions_1.ToDateTimeOptions)(options, 'time', 'time'));
16
+ export function toLocaleTimeString(x, locales, options) {
17
+ var dtf = new DateTimeFormat(locales, ToDateTimeOptions(options, 'time', 'time'));
23
18
  return dtf.format(x);
24
19
  }
25
- exports.toLocaleTimeString = toLocaleTimeString;
package/lib/src/types.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supportedLocales = void 0;
4
- exports.supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
1
+ export var supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
1
  /* @generated */
5
2
  // @ts-nocheck
6
- require("./polyfill-force");
7
- var all_tz_1 = tslib_1.__importDefault(require("./src/data/all-tz"));
3
+ import './polyfill-force';
4
+ import allData from './src/data/all-tz';
8
5
  defineProperty(Intl, 'DateTimeFormat', { value: DateTimeFormat });
9
6
  Intl.DateTimeFormat.__addLocaleData({
10
7
  "data": {
@@ -24010,4 +24007,4 @@ Intl.DateTimeFormat.__addLocaleData({
24010
24007
  },
24011
24008
  "locale": "zh"
24012
24009
  });
24013
- Intl.DateTimeFormat.__addTZData(all_tz_1.default);
24010
+ Intl.DateTimeFormat.__addTZData(allData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-datetimeformat",
3
- "version": "6.11.3",
3
+ "version": "6.12.1",
4
4
  "description": "Intl.DateTimeFormat polyfill",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -23,11 +23,11 @@
23
23
  "homepage": "https://github.com/formatjs/formatjs#readme",
24
24
  "dependencies": {
25
25
  "tslib": "^2.4.0",
26
- "@formatjs/ecma402-abstract": "1.17.4",
27
- "@formatjs/intl-localematcher": "0.5.1"
26
+ "@formatjs/ecma402-abstract": "1.18.1",
27
+ "@formatjs/intl-localematcher": "0.5.3"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@formatjs/intl-getcanonicallocales": "2.3.0",
31
- "@formatjs/intl-locale": "3.4.2"
31
+ "@formatjs/intl-locale": "3.4.4"
32
32
  }
33
33
  }