Socket
Socket
Sign inDemoInstall

@formatjs/intl-datetimeformat

Package Overview
Dependencies
Maintainers
3
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/intl-datetimeformat - npm Package Compare versions

Comparing version 6.11.1 to 6.11.2

5

lib/index.js

@@ -1,1 +0,4 @@

export * from './src/core';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./src/core"), exports);

22

lib/polyfill-force.js

@@ -1,19 +0,21 @@

import { DateTimeFormat } from './';
import { defineProperty } from '@formatjs/ecma402-abstract';
import { toLocaleString as _toLocaleString, toLocaleDateString as _toLocaleDateString, toLocaleTimeString as _toLocaleTimeString, } from './src/to_locale_string';
defineProperty(Intl, 'DateTimeFormat', { value: DateTimeFormat });
defineProperty(Date.prototype, 'toLocaleString', {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _1 = require("./");
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var to_locale_string_1 = require("./src/to_locale_string");
(0, ecma402_abstract_1.defineProperty)(Intl, 'DateTimeFormat', { value: _1.DateTimeFormat });
(0, ecma402_abstract_1.defineProperty)(Date.prototype, 'toLocaleString', {
value: function toLocaleString(locales, options) {
return _toLocaleString(this, locales, options);
return (0, to_locale_string_1.toLocaleString)(this, locales, options);
},
});
defineProperty(Date.prototype, 'toLocaleDateString', {
(0, ecma402_abstract_1.defineProperty)(Date.prototype, 'toLocaleDateString', {
value: function toLocaleDateString(locales, options) {
return _toLocaleDateString(this, locales, options);
return (0, to_locale_string_1.toLocaleDateString)(this, locales, options);
},
});
defineProperty(Date.prototype, 'toLocaleTimeString', {
(0, ecma402_abstract_1.defineProperty)(Date.prototype, 'toLocaleTimeString', {
value: function toLocaleTimeString(locales, options) {
return _toLocaleTimeString(this, locales, options);
return (0, to_locale_string_1.toLocaleTimeString)(this, locales, options);
},
});

@@ -1,11 +0,13 @@

import { DateTimeFormat } from './';
import { defineProperty } from '@formatjs/ecma402-abstract';
import { shouldPolyfill } from './should-polyfill';
import { toLocaleString as _toLocaleString, toLocaleDateString as _toLocaleDateString, toLocaleTimeString as _toLocaleTimeString, } from './src/to_locale_string';
if (shouldPolyfill()) {
defineProperty(Intl, 'DateTimeFormat', { value: DateTimeFormat });
defineProperty(Date.prototype, 'toLocaleString', {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _1 = require("./");
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var should_polyfill_1 = require("./should-polyfill");
var to_locale_string_1 = require("./src/to_locale_string");
if ((0, should_polyfill_1.shouldPolyfill)()) {
(0, ecma402_abstract_1.defineProperty)(Intl, 'DateTimeFormat', { value: _1.DateTimeFormat });
(0, ecma402_abstract_1.defineProperty)(Date.prototype, 'toLocaleString', {
value: function toLocaleString(locales, options) {
try {
return _toLocaleString(this, locales, options);
return (0, to_locale_string_1.toLocaleString)(this, locales, options);
}

@@ -17,6 +19,6 @@ catch (error) {

});
defineProperty(Date.prototype, 'toLocaleDateString', {
(0, ecma402_abstract_1.defineProperty)(Date.prototype, 'toLocaleDateString', {
value: function toLocaleDateString(locales, options) {
try {
return _toLocaleDateString(this, locales, options);
return (0, to_locale_string_1.toLocaleDateString)(this, locales, options);
}

@@ -28,6 +30,6 @@ catch (error) {

});
defineProperty(Date.prototype, 'toLocaleTimeString', {
(0, ecma402_abstract_1.defineProperty)(Date.prototype, 'toLocaleTimeString', {
value: function toLocaleTimeString(locales, options) {
try {
return _toLocaleTimeString(this, locales, options);
return (0, to_locale_string_1.toLocaleTimeString)(this, locales, options);
}

@@ -34,0 +36,0 @@ catch (error) {

@@ -1,3 +0,6 @@

import { match } from '@formatjs/intl-localematcher';
import { supportedLocales } from './supported-locales.generated';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldPolyfill = void 0;
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
var supported_locales_generated_1 = require("./supported-locales.generated");
function supportsDateStyle() {

@@ -50,3 +53,3 @@ try {

}
export function shouldPolyfill(locale) {
function shouldPolyfill(locale) {
if (locale === void 0) { locale = 'en'; }

@@ -60,4 +63,5 @@ if (!('DateTimeFormat' in Intl) ||

!supportedLocalesOf(locale)) {
return locale ? match([locale], supportedLocales, 'en') : undefined;
return locale ? (0, intl_localematcher_1.match)([locale], supported_locales_generated_1.supportedLocales, 'en') : undefined;
}
}
exports.shouldPolyfill = shouldPolyfill;

@@ -1,4 +0,7 @@

import { __assign } from "tslib";
import { invariant } from '@formatjs/ecma402-abstract';
import { DATE_TIME_PROPS, additionPenalty, removalPenalty, longMorePenalty, shortMorePenalty, shortLessPenalty, longLessPenalty, offsetPenalty, } from './utils';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BasicFormatMatcher = void 0;
var tslib_1 = require("tslib");
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var utils_1 = require("./utils");
/**

@@ -9,10 +12,10 @@ * https://tc39.es/ecma402/#sec-basicformatmatcher

*/
export function BasicFormatMatcher(options, formats) {
function BasicFormatMatcher(options, formats) {
var bestScore = -Infinity;
var bestFormat = formats[0];
invariant(Array.isArray(formats), 'formats should be a list of things');
(0, ecma402_abstract_1.invariant)(Array.isArray(formats), 'formats should be a list of things');
for (var _i = 0, formats_1 = formats; _i < formats_1.length; _i++) {
var format = formats_1[_i];
var score = 0;
for (var _a = 0, DATE_TIME_PROPS_1 = DATE_TIME_PROPS; _a < DATE_TIME_PROPS_1.length; _a++) {
for (var _a = 0, DATE_TIME_PROPS_1 = utils_1.DATE_TIME_PROPS; _a < DATE_TIME_PROPS_1.length; _a++) {
var prop = DATE_TIME_PROPS_1[_a];

@@ -22,6 +25,6 @@ var optionsProp = options[prop];

if (optionsProp === undefined && formatProp !== undefined) {
score -= additionPenalty;
score -= utils_1.additionPenalty;
}
else if (optionsProp !== undefined && formatProp === undefined) {
score -= removalPenalty;
score -= utils_1.removalPenalty;
}

@@ -31,16 +34,16 @@ else if (prop === 'timeZoneName') {

if (formatProp === 'shortOffset') {
score -= offsetPenalty;
score -= utils_1.offsetPenalty;
}
else if (formatProp === 'longOffset') {
score -= offsetPenalty + shortMorePenalty;
score -= utils_1.offsetPenalty + utils_1.shortMorePenalty;
}
else if (optionsProp === 'short' && formatProp === 'long') {
score -= shortMorePenalty;
score -= utils_1.shortMorePenalty;
}
else if (optionsProp === 'shortGeneric' &&
formatProp === 'longGeneric') {
score -= shortMorePenalty;
score -= utils_1.shortMorePenalty;
}
else if (optionsProp !== formatProp) {
score -= removalPenalty;
score -= utils_1.removalPenalty;
}

@@ -50,20 +53,20 @@ }

formatProp === 'longOffset') {
score -= shortMorePenalty;
score -= utils_1.shortMorePenalty;
}
else if (optionsProp === 'long' || optionsProp === 'longGeneric') {
if (formatProp === 'longOffset') {
score -= offsetPenalty;
score -= utils_1.offsetPenalty;
}
else if (formatProp === 'shortOffset') {
score -= offsetPenalty + longLessPenalty;
score -= utils_1.offsetPenalty + utils_1.longLessPenalty;
}
else if (optionsProp === 'long' && formatProp === 'short') {
score -= longLessPenalty;
score -= utils_1.longLessPenalty;
}
else if (optionsProp === 'longGeneric' &&
formatProp === 'shortGeneric') {
score -= longLessPenalty;
score -= utils_1.longLessPenalty;
}
else if (optionsProp !== formatProp) {
score -= removalPenalty;
score -= utils_1.removalPenalty;
}

@@ -73,6 +76,6 @@ }

formatProp === 'shortOffset') {
score -= longLessPenalty;
score -= utils_1.longLessPenalty;
}
else if (optionsProp !== formatProp) {
score -= removalPenalty;
score -= utils_1.removalPenalty;
}

@@ -92,12 +95,12 @@ }

if (delta === 2) {
score -= longMorePenalty;
score -= utils_1.longMorePenalty;
}
else if (delta === 1) {
score -= shortMorePenalty;
score -= utils_1.shortMorePenalty;
}
else if (delta === -1) {
score -= shortLessPenalty;
score -= utils_1.shortLessPenalty;
}
else if (delta === -2) {
score -= longLessPenalty;
score -= utils_1.longLessPenalty;
}

@@ -111,3 +114,4 @@ }

}
return __assign({}, bestFormat);
return tslib_1.__assign({}, bestFormat);
}
exports.BasicFormatMatcher = BasicFormatMatcher;

@@ -1,5 +0,8 @@

import { __assign } from "tslib";
import { invariant } from '@formatjs/ecma402-abstract';
import { DATE_TIME_PROPS, removalPenalty, additionPenalty, differentNumericTypePenalty, longMorePenalty, shortMorePenalty, shortLessPenalty, longLessPenalty, } from './utils';
import { processDateTimePattern } from './skeleton';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BestFitFormatMatcher = exports.bestFitFormatMatcherScore = void 0;
var tslib_1 = require("tslib");
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var utils_1 = require("./utils");
var skeleton_1 = require("./skeleton");
function isNumericType(t) {

@@ -14,11 +17,11 @@ return t === 'numeric' || t === '2-digit';

*/
export function bestFitFormatMatcherScore(options, format) {
function bestFitFormatMatcherScore(options, format) {
var score = 0;
if (options.hour12 && !format.hour12) {
score -= removalPenalty;
score -= utils_1.removalPenalty;
}
else if (!options.hour12 && format.hour12) {
score -= additionPenalty;
score -= utils_1.additionPenalty;
}
for (var _i = 0, DATE_TIME_PROPS_1 = DATE_TIME_PROPS; _i < DATE_TIME_PROPS_1.length; _i++) {
for (var _i = 0, DATE_TIME_PROPS_1 = utils_1.DATE_TIME_PROPS; _i < DATE_TIME_PROPS_1.length; _i++) {
var prop = DATE_TIME_PROPS_1[_i];

@@ -28,6 +31,6 @@ var optionsProp = options[prop];

if (optionsProp === undefined && formatProp !== undefined) {
score -= additionPenalty;
score -= utils_1.additionPenalty;
}
else if (optionsProp !== undefined && formatProp === undefined) {
score -= removalPenalty;
score -= utils_1.removalPenalty;
}

@@ -38,3 +41,3 @@ else if (optionsProp !== formatProp) {

isNumericType(formatProp)) {
score -= differentNumericTypePenalty;
score -= utils_1.differentNumericTypePenalty;
}

@@ -47,12 +50,12 @@ else {

if (delta === 2) {
score -= longMorePenalty;
score -= utils_1.longMorePenalty;
}
else if (delta === 1) {
score -= shortMorePenalty;
score -= utils_1.shortMorePenalty;
}
else if (delta === -1) {
score -= shortLessPenalty;
score -= utils_1.shortLessPenalty;
}
else if (delta === -2) {
score -= longLessPenalty;
score -= utils_1.longLessPenalty;
}

@@ -64,2 +67,3 @@ }

}
exports.bestFitFormatMatcherScore = bestFitFormatMatcherScore;
/**

@@ -72,6 +76,6 @@ * https://tc39.es/ecma402/#sec-bestfitformatmatcher

*/
export function BestFitFormatMatcher(options, formats) {
function BestFitFormatMatcher(options, formats) {
var bestScore = -Infinity;
var bestFormat = formats[0];
invariant(Array.isArray(formats), 'formats should be a list of things');
(0, ecma402_abstract_1.invariant)(Array.isArray(formats), 'formats should be a list of things');
for (var _i = 0, formats_1 = formats; _i < formats_1.length; _i++) {

@@ -85,5 +89,5 @@ var format = formats_1[_i];

}
var skeletonFormat = __assign({}, bestFormat);
var skeletonFormat = tslib_1.__assign({}, bestFormat);
var patternFormat = { rawPattern: bestFormat.rawPattern };
processDateTimePattern(bestFormat.rawPattern, patternFormat);
(0, skeleton_1.processDateTimePattern)(bestFormat.rawPattern, patternFormat);
// Kinda following https://github.com/unicode-org/icu/blob/dd50e38f459d84e9bf1b0c618be8483d318458ad/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java

@@ -124,1 +128,2 @@ // Method adjustFieldTypes

}
exports.BestFitFormatMatcher = BestFitFormatMatcher;

@@ -1,6 +0,9 @@

import { invariant, } from '@formatjs/ecma402-abstract';
export function DateTimeStyleFormat(dateStyle, timeStyle, dataLocaleData) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DateTimeStyleFormat = void 0;
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
function DateTimeStyleFormat(dateStyle, timeStyle, dataLocaleData) {
var dateFormat, timeFormat;
if (timeStyle !== undefined) {
invariant(timeStyle === 'full' ||
(0, ecma402_abstract_1.invariant)(timeStyle === 'full' ||
timeStyle === 'long' ||

@@ -12,3 +15,3 @@ timeStyle === 'medium' ||

if (dateStyle !== undefined) {
invariant(dateStyle === 'full' ||
(0, ecma402_abstract_1.invariant)(dateStyle === 'full' ||
dateStyle === 'long' ||

@@ -49,4 +52,5 @@ dateStyle === 'medium' ||

}
invariant(dateStyle !== undefined, 'dateStyle should not be undefined');
(0, ecma402_abstract_1.invariant)(dateStyle !== undefined, 'dateStyle should not be undefined');
return dateFormat;
}
exports.DateTimeStyleFormat = DateTimeStyleFormat;

@@ -1,2 +0,5 @@

import { PartitionDateTimePattern } from './PartitionDateTimePattern';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormatDateTime = void 0;
var PartitionDateTimePattern_1 = require("./PartitionDateTimePattern");
/**

@@ -7,4 +10,4 @@ * https://tc39.es/ecma402/#sec-formatdatetime

*/
export function FormatDateTime(dtf, x, implDetails) {
var parts = PartitionDateTimePattern(dtf, x, implDetails);
function FormatDateTime(dtf, x, implDetails) {
var parts = (0, PartitionDateTimePattern_1.PartitionDateTimePattern)(dtf, x, implDetails);
var result = '';

@@ -17,1 +20,2 @@ for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {

}
exports.FormatDateTime = FormatDateTime;

@@ -1,4 +0,7 @@

import { TimeClip, } from '@formatjs/ecma402-abstract';
import { DATE_TIME_PROPS } from './utils';
import { ToLocalTime } from './ToLocalTime';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormatDateTimePattern = void 0;
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var utils_1 = require("./utils");
var ToLocalTime_1 = require("./ToLocalTime");
function pad(n) {

@@ -37,5 +40,5 @@ if (n < 10) {

*/
export function FormatDateTimePattern(dtf, patternParts, x, _a) {
function FormatDateTimePattern(dtf, patternParts, x, _a) {
var getInternalSlots = _a.getInternalSlots, localeData = _a.localeData, getDefaultTimeZone = _a.getDefaultTimeZone, tzData = _a.tzData;
x = TimeClip(x);
x = (0, ecma402_abstract_1.TimeClip)(x);
/** IMPL START */

@@ -62,3 +65,3 @@ var internalSlots = getInternalSlots(dtf);

}
var tm = ToLocalTime(x,
var tm = (0, ToLocalTime_1.ToLocalTime)(x,
// @ts-ignore

@@ -104,3 +107,3 @@ internalSlots.calendar, internalSlots.timeZone, { tzData: tzData });

}
else if (DATE_TIME_PROPS.indexOf(p) > -1) {
else if (utils_1.DATE_TIME_PROPS.indexOf(p) > -1) {
var fv = '';

@@ -190,1 +193,2 @@ var f = internalSlots[p];

}
exports.FormatDateTimePattern = FormatDateTimePattern;

@@ -1,4 +0,7 @@

import { PartitionDateTimeRangePattern } from './PartitionDateTimeRangePattern';
export function FormatDateTimeRange(dtf, x, y, implDetails) {
var parts = PartitionDateTimeRangePattern(dtf, x, y, implDetails);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormatDateTimeRange = void 0;
var PartitionDateTimeRangePattern_1 = require("./PartitionDateTimeRangePattern");
function FormatDateTimeRange(dtf, x, y, implDetails) {
var parts = (0, PartitionDateTimeRangePattern_1.PartitionDateTimeRangePattern)(dtf, x, y, implDetails);
var result = '';

@@ -11,1 +14,2 @@ for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {

}
exports.FormatDateTimeRange = FormatDateTimeRange;

@@ -1,4 +0,7 @@

import { PartitionDateTimeRangePattern } from './PartitionDateTimeRangePattern';
export function FormatDateTimeRangeToParts(dtf, x, y, implDetails) {
var parts = PartitionDateTimeRangePattern(dtf, x, y, implDetails);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormatDateTimeRangeToParts = void 0;
var PartitionDateTimeRangePattern_1 = require("./PartitionDateTimeRangePattern");
function FormatDateTimeRangeToParts(dtf, x, y, implDetails) {
var parts = (0, PartitionDateTimeRangePattern_1.PartitionDateTimeRangePattern)(dtf, x, y, implDetails);
var result = new Array(0);

@@ -15,1 +18,2 @@ for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {

}
exports.FormatDateTimeRangeToParts = FormatDateTimeRangeToParts;

@@ -1,3 +0,6 @@

import { PartitionDateTimePattern } from './PartitionDateTimePattern';
import { ArrayCreate } from '@formatjs/ecma402-abstract';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormatDateTimeToParts = void 0;
var PartitionDateTimePattern_1 = require("./PartitionDateTimePattern");
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
/**

@@ -10,5 +13,5 @@ * https://tc39.es/ecma402/#sec-formatdatetimetoparts

*/
export function FormatDateTimeToParts(dtf, x, implDetails) {
var parts = PartitionDateTimePattern(dtf, x, implDetails);
var result = ArrayCreate(0);
function FormatDateTimeToParts(dtf, x, implDetails) {
var parts = (0, PartitionDateTimePattern_1.PartitionDateTimePattern)(dtf, x, implDetails);
var result = (0, ecma402_abstract_1.ArrayCreate)(0);
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {

@@ -23,1 +26,2 @@ var part = parts_1[_i];

}
exports.FormatDateTimeToParts = FormatDateTimeToParts;

@@ -1,8 +0,11 @@

import { CanonicalizeLocaleList, invariant, GetOption, IsValidTimeZoneName, CanonicalizeTimeZoneName, GetNumberOption, } from '@formatjs/ecma402-abstract';
import { BasicFormatMatcher } from './BasicFormatMatcher';
import { BestFitFormatMatcher } from './BestFitFormatMatcher';
import { DATE_TIME_PROPS } from './utils';
import { DateTimeStyleFormat } from './DateTimeStyleFormat';
import { ToDateTimeOptions } from './ToDateTimeOptions';
import { ResolveLocale } from '@formatjs/intl-localematcher';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InitializeDateTimeFormat = void 0;
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var BasicFormatMatcher_1 = require("./BasicFormatMatcher");
var BestFitFormatMatcher_1 = require("./BestFitFormatMatcher");
var utils_1 = require("./utils");
var DateTimeStyleFormat_1 = require("./DateTimeStyleFormat");
var ToDateTimeOptions_1 = require("./ToDateTimeOptions");
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
function isTimeRelated(opt) {

@@ -32,3 +35,3 @@ for (var _i = 0, _a = ['hour', 'minute', 'second']; _i < _a.length; _i++) {

else {
invariant(!hour12, 'hour12 must not be set');
(0, ecma402_abstract_1.invariant)(!hour12, 'hour12 must not be set');
if (hcDefault === 'h11' || hcDefault === 'h23') {

@@ -51,11 +54,11 @@ hc = 'h23';

*/
export function InitializeDateTimeFormat(dtf, locales, opts, _a) {
function InitializeDateTimeFormat(dtf, locales, opts, _a) {
var getInternalSlots = _a.getInternalSlots, availableLocales = _a.availableLocales, localeData = _a.localeData, getDefaultLocale = _a.getDefaultLocale, getDefaultTimeZone = _a.getDefaultTimeZone, relevantExtensionKeys = _a.relevantExtensionKeys, tzData = _a.tzData, uppercaseLinks = _a.uppercaseLinks;
// @ts-ignore
var requestedLocales = CanonicalizeLocaleList(locales);
var options = ToDateTimeOptions(opts, 'any', 'date');
var requestedLocales = (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales);
var options = (0, ToDateTimeOptions_1.ToDateTimeOptions)(opts, 'any', 'date');
var opt = Object.create(null);
var matcher = GetOption(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');
var matcher = (0, ecma402_abstract_1.GetOption)(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');
opt.localeMatcher = matcher;
var calendar = GetOption(options, 'calendar', 'string', undefined, undefined);
var calendar = (0, ecma402_abstract_1.GetOption)(options, 'calendar', 'string', undefined, undefined);
if (calendar !== undefined && !TYPE_REGEX.test(calendar)) {

@@ -66,3 +69,3 @@ throw new RangeError('Malformed calendar');

opt.ca = calendar;
var numberingSystem = GetOption(options, 'numberingSystem', 'string', undefined, undefined);
var numberingSystem = (0, ecma402_abstract_1.GetOption)(options, 'numberingSystem', 'string', undefined, undefined);
if (numberingSystem !== undefined && !TYPE_REGEX.test(numberingSystem)) {

@@ -72,4 +75,4 @@ throw new RangeError('Malformed numbering system');

opt.nu = numberingSystem;
var hour12 = GetOption(options, 'hour12', 'boolean', undefined, undefined);
var hourCycle = GetOption(options, 'hourCycle', 'string', ['h11', 'h12', 'h23', 'h24'], undefined);
var hour12 = (0, ecma402_abstract_1.GetOption)(options, 'hour12', 'boolean', undefined, undefined);
var hourCycle = (0, ecma402_abstract_1.GetOption)(options, 'hourCycle', 'string', ['h11', 'h12', 'h23', 'h24'], undefined);
if (hour12 !== undefined) {

@@ -80,3 +83,3 @@ // @ts-ignore

opt.hc = hourCycle;
var r = ResolveLocale(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);
var r = (0, intl_localematcher_1.ResolveLocale)(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);
internalSlots.locale = r.locale;

@@ -92,6 +95,6 @@ calendar = r.ca;

timeZone = String(timeZone);
if (!IsValidTimeZoneName(timeZone, { tzData: tzData, uppercaseLinks: uppercaseLinks })) {
if (!(0, ecma402_abstract_1.IsValidTimeZoneName)(timeZone, { tzData: tzData, uppercaseLinks: uppercaseLinks })) {
throw new RangeError('Invalid timeZoneName');
}
timeZone = CanonicalizeTimeZoneName(timeZone, { tzData: tzData, uppercaseLinks: uppercaseLinks });
timeZone = (0, ecma402_abstract_1.CanonicalizeTimeZoneName)(timeZone, { tzData: tzData, uppercaseLinks: uppercaseLinks });
}

@@ -103,11 +106,11 @@ else {

opt = Object.create(null);
opt.weekday = GetOption(options, 'weekday', 'string', ['narrow', 'short', 'long'], undefined);
opt.era = GetOption(options, 'era', 'string', ['narrow', 'short', 'long'], undefined);
opt.year = GetOption(options, 'year', 'string', ['2-digit', 'numeric'], undefined);
opt.month = GetOption(options, 'month', 'string', ['2-digit', 'numeric', 'narrow', 'short', 'long'], undefined);
opt.day = GetOption(options, 'day', 'string', ['2-digit', 'numeric'], undefined);
opt.hour = GetOption(options, 'hour', 'string', ['2-digit', 'numeric'], undefined);
opt.minute = GetOption(options, 'minute', 'string', ['2-digit', 'numeric'], undefined);
opt.second = GetOption(options, 'second', 'string', ['2-digit', 'numeric'], undefined);
opt.timeZoneName = GetOption(options, 'timeZoneName', 'string', [
opt.weekday = (0, ecma402_abstract_1.GetOption)(options, 'weekday', 'string', ['narrow', 'short', 'long'], undefined);
opt.era = (0, ecma402_abstract_1.GetOption)(options, 'era', 'string', ['narrow', 'short', 'long'], undefined);
opt.year = (0, ecma402_abstract_1.GetOption)(options, 'year', 'string', ['2-digit', 'numeric'], undefined);
opt.month = (0, ecma402_abstract_1.GetOption)(options, 'month', 'string', ['2-digit', 'numeric', 'narrow', 'short', 'long'], undefined);
opt.day = (0, ecma402_abstract_1.GetOption)(options, 'day', 'string', ['2-digit', 'numeric'], undefined);
opt.hour = (0, ecma402_abstract_1.GetOption)(options, 'hour', 'string', ['2-digit', 'numeric'], undefined);
opt.minute = (0, ecma402_abstract_1.GetOption)(options, 'minute', 'string', ['2-digit', 'numeric'], undefined);
opt.second = (0, ecma402_abstract_1.GetOption)(options, 'second', 'string', ['2-digit', 'numeric'], undefined);
opt.timeZoneName = (0, ecma402_abstract_1.GetOption)(options, 'timeZoneName', 'string', [
'long',

@@ -120,7 +123,7 @@ 'short',

], undefined);
opt.fractionalSecondDigits = GetNumberOption(options, 'fractionalSecondDigits', 1, 3,
opt.fractionalSecondDigits = (0, ecma402_abstract_1.GetNumberOption)(options, 'fractionalSecondDigits', 1, 3,
// @ts-expect-error
undefined);
var dataLocaleData = localeData[dataLocale];
invariant(!!dataLocaleData, "Missing locale data for ".concat(dataLocale));
(0, ecma402_abstract_1.invariant)(!!dataLocaleData, "Missing locale data for ".concat(dataLocale));
var formats = dataLocaleData.formats[calendar];

@@ -131,6 +134,6 @@ // UNSPECCED: IMPLEMENTATION DETAILS

}
var formatMatcher = GetOption(options, 'formatMatcher', 'string', ['basic', 'best fit'], 'best fit');
var dateStyle = GetOption(options, 'dateStyle', 'string', ['full', 'long', 'medium', 'short'], undefined);
var formatMatcher = (0, ecma402_abstract_1.GetOption)(options, 'formatMatcher', 'string', ['basic', 'best fit'], 'best fit');
var dateStyle = (0, ecma402_abstract_1.GetOption)(options, 'dateStyle', 'string', ['full', 'long', 'medium', 'short'], undefined);
internalSlots.dateStyle = dateStyle;
var timeStyle = GetOption(options, 'timeStyle', 'string', ['full', 'long', 'medium', 'short'], undefined);
var timeStyle = (0, ecma402_abstract_1.GetOption)(options, 'timeStyle', 'string', ['full', 'long', 'medium', 'short'], undefined);
internalSlots.timeStyle = timeStyle;

@@ -140,3 +143,3 @@ var bestFormat;

if (formatMatcher === 'basic') {
bestFormat = BasicFormatMatcher(opt, formats);
bestFormat = (0, BasicFormatMatcher_1.BasicFormatMatcher)(opt, formats);
}

@@ -150,7 +153,7 @@ else {

// IMPL DETAILS END
bestFormat = BestFitFormatMatcher(opt, formats);
bestFormat = (0, BestFitFormatMatcher_1.BestFitFormatMatcher)(opt, formats);
}
}
else {
for (var _i = 0, DATE_TIME_PROPS_1 = DATE_TIME_PROPS; _i < DATE_TIME_PROPS_1.length; _i++) {
for (var _i = 0, DATE_TIME_PROPS_1 = utils_1.DATE_TIME_PROPS; _i < DATE_TIME_PROPS_1.length; _i++) {
var prop = DATE_TIME_PROPS_1[_i];

@@ -162,3 +165,3 @@ var p = opt[prop];

}
bestFormat = DateTimeStyleFormat(dateStyle, timeStyle, dataLocaleData);
bestFormat = (0, DateTimeStyleFormat_1.DateTimeStyleFormat)(dateStyle, timeStyle, dataLocaleData);
}

@@ -199,1 +202,2 @@ // IMPL DETAIL START

}
exports.InitializeDateTimeFormat = InitializeDateTimeFormat;

@@ -1,3 +0,6 @@

import { PartitionPattern, TimeClip, } from '@formatjs/ecma402-abstract';
import { FormatDateTimePattern, } from './FormatDateTimePattern';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PartitionDateTimePattern = void 0;
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var FormatDateTimePattern_1 = require("./FormatDateTimePattern");
/**

@@ -8,4 +11,4 @@ * https://tc39.es/ecma402/#sec-partitiondatetimepattern

*/
export function PartitionDateTimePattern(dtf, x, implDetails) {
x = TimeClip(x);
function PartitionDateTimePattern(dtf, x, implDetails) {
x = (0, ecma402_abstract_1.TimeClip)(x);
if (isNaN(x)) {

@@ -19,3 +22,4 @@ throw new RangeError('invalid time');

var pattern = internalSlots.pattern;
return FormatDateTimePattern(dtf, PartitionPattern(pattern), x, implDetails);
return (0, FormatDateTimePattern_1.FormatDateTimePattern)(dtf, (0, ecma402_abstract_1.PartitionPattern)(pattern), x, implDetails);
}
exports.PartitionDateTimePattern = PartitionDateTimePattern;

@@ -1,4 +0,7 @@

import { RangePatternType, PartitionPattern, SameValue, TimeClip, } from '@formatjs/ecma402-abstract';
import { ToLocalTime } from './ToLocalTime';
import { FormatDateTimePattern, } from './FormatDateTimePattern';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PartitionDateTimeRangePattern = void 0;
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var ToLocalTime_1 = require("./ToLocalTime");
var FormatDateTimePattern_1 = require("./FormatDateTimePattern");
var TABLE_2_FIELDS = [

@@ -16,8 +19,8 @@ 'era',

];
export function PartitionDateTimeRangePattern(dtf, x, y, implDetails) {
x = TimeClip(x);
function PartitionDateTimeRangePattern(dtf, x, y, implDetails) {
x = (0, ecma402_abstract_1.TimeClip)(x);
if (isNaN(x)) {
throw new RangeError('Invalid start time');
}
y = TimeClip(y);
y = (0, ecma402_abstract_1.TimeClip)(y);
if (isNaN(y)) {

@@ -30,6 +33,6 @@ throw new RangeError('Invalid end time');

/** IMPL END */
var tm1 = ToLocalTime(x,
var tm1 = (0, ToLocalTime_1.ToLocalTime)(x,
// @ts-ignore
internalSlots.calendar, internalSlots.timeZone, { tzData: tzData });
var tm2 = ToLocalTime(y,
var tm2 = (0, ToLocalTime_1.ToLocalTime)(y,
// @ts-ignore

@@ -67,3 +70,3 @@ internalSlots.calendar, internalSlots.timeZone, { tzData: tzData });

var v2 = Math.floor(tm2.millisecond * Math.pow(10, (fractionalSecondDigits - 3)));
if (!SameValue(v1, v2)) {
if (!(0, ecma402_abstract_1.SameValue)(v1, v2)) {
dateFieldsPracticallyEqual = false;

@@ -75,3 +78,3 @@ }

var v2 = tm2[fieldName];
if (!SameValue(v1, v2)) {
if (!(0, ecma402_abstract_1.SameValue)(v1, v2)) {
dateFieldsPracticallyEqual = false;

@@ -84,6 +87,6 @@ }

if (dateFieldsPracticallyEqual) {
var result_2 = FormatDateTimePattern(dtf, PartitionPattern(pattern), x, implDetails);
var result_2 = (0, FormatDateTimePattern_1.FormatDateTimePattern)(dtf, (0, ecma402_abstract_1.PartitionPattern)(pattern), x, implDetails);
for (var _a = 0, result_1 = result_2; _a < result_1.length; _a++) {
var r = result_1[_a];
r.source = RangePatternType.shared;
r.source = ecma402_abstract_1.RangePatternType.shared;
}

@@ -108,4 +111,4 @@ return result_2;

var z = void 0;
if (source === RangePatternType.startRange ||
source === RangePatternType.shared) {
if (source === ecma402_abstract_1.RangePatternType.startRange ||
source === ecma402_abstract_1.RangePatternType.shared) {
z = x;

@@ -116,4 +119,4 @@ }

}
var patternParts = PartitionPattern(pattern_1);
var partResult = FormatDateTimePattern(dtf, patternParts, z, implDetails);
var patternParts = (0, ecma402_abstract_1.PartitionPattern)(pattern_1);
var partResult = (0, FormatDateTimePattern_1.FormatDateTimePattern)(dtf, patternParts, z, implDetails);
for (var _f = 0, partResult_1 = partResult; _f < partResult_1.length; _f++) {

@@ -127,1 +130,2 @@ var r = partResult_1[_f];

}
exports.PartitionDateTimeRangePattern = PartitionDateTimeRangePattern;

@@ -1,3 +0,6 @@

import { __assign } from "tslib";
import { RangePatternType, } from '@formatjs/ecma402-abstract';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.splitRangePattern = exports.splitFallbackRangePattern = exports.parseDateTimeSkeleton = exports.processDateTimePattern = void 0;
var tslib_1 = require("tslib");
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
/**

@@ -166,3 +169,3 @@ * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table

}
export function processDateTimePattern(pattern, result) {
function processDateTimePattern(pattern, result) {
var literals = [];

@@ -196,2 +199,3 @@ // Use skeleton to populate result, but use mapped pattern to populate pattern

}
exports.processDateTimePattern = processDateTimePattern;
/**

@@ -203,3 +207,3 @@ * Parse Date time skeleton into Intl.DateTimeFormatOptions

*/
export function parseDateTimeSkeleton(skeleton, rawPattern, rangePatterns, intervalFormatFallback) {
function parseDateTimeSkeleton(skeleton, rawPattern, rangePatterns, intervalFormatFallback) {
if (rawPattern === void 0) { rawPattern = skeleton; }

@@ -222,4 +226,4 @@ var result = {

var _a = processDateTimePattern(rawPattern_1, intervalResult), pattern_1 = _a[0], pattern12_1 = _a[1];
result.rangePatterns[key] = __assign(__assign({}, intervalResult), { patternParts: splitRangePattern(pattern_1) });
result.rangePatterns12[key] = __assign(__assign({}, intervalResult), { patternParts: splitRangePattern(pattern12_1) });
result.rangePatterns[key] = tslib_1.__assign(tslib_1.__assign({}, intervalResult), { patternParts: splitRangePattern(pattern_1) });
result.rangePatterns12[key] = tslib_1.__assign(tslib_1.__assign({}, intervalResult), { patternParts: splitRangePattern(pattern12_1) });
}

@@ -243,3 +247,4 @@ }

}
export function splitFallbackRangePattern(pattern) {
exports.parseDateTimeSkeleton = parseDateTimeSkeleton;
function splitFallbackRangePattern(pattern) {
var parts = pattern.split(/(\{[0|1]\})/g).filter(Boolean);

@@ -250,3 +255,3 @@ return parts.map(function (pattern) {

return {
source: RangePatternType.startRange,
source: ecma402_abstract_1.RangePatternType.startRange,
pattern: pattern,

@@ -256,3 +261,3 @@ };

return {
source: RangePatternType.endRange,
source: ecma402_abstract_1.RangePatternType.endRange,
pattern: pattern,

@@ -262,3 +267,3 @@ };

return {
source: RangePatternType.shared,
source: ecma402_abstract_1.RangePatternType.shared,
pattern: pattern,

@@ -269,3 +274,4 @@ };

}
export function splitRangePattern(pattern) {
exports.splitFallbackRangePattern = splitFallbackRangePattern;
function splitRangePattern(pattern) {
var PART_REGEX = /\{(.*?)\}/g;

@@ -288,3 +294,3 @@ // Map of part and index within the string

{
source: RangePatternType.startRange,
source: ecma402_abstract_1.RangePatternType.startRange,
pattern: pattern,

@@ -296,7 +302,7 @@ },

{
source: RangePatternType.startRange,
source: ecma402_abstract_1.RangePatternType.startRange,
pattern: pattern.slice(0, splitIndex),
},
{
source: RangePatternType.endRange,
source: ecma402_abstract_1.RangePatternType.endRange,
pattern: pattern.slice(splitIndex),

@@ -306,1 +312,2 @@ },

}
exports.splitRangePattern = splitRangePattern;

@@ -1,2 +0,5 @@

import { ToObject } from '@formatjs/ecma402-abstract';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToDateTimeOptions = void 0;
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
/**

@@ -8,3 +11,3 @@ * https://tc39.es/ecma402/#sec-todatetimeoptions

*/
export function ToDateTimeOptions(options, required, defaults) {
function ToDateTimeOptions(options, required, defaults) {
if (options === undefined) {

@@ -14,3 +17,3 @@ options = null;

else {
options = ToObject(options);
options = (0, ecma402_abstract_1.ToObject)(options);
}

@@ -66,1 +69,2 @@ options = Object.create(options);

}
exports.ToDateTimeOptions = ToDateTimeOptions;

@@ -1,2 +0,5 @@

import { Type, YearFromTime, WeekDay, MonthFromTime, DateFromTime, HourFromTime, MinFromTime, SecFromTime, msFromTime, invariant, } from '@formatjs/ecma402-abstract';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToLocalTime = void 0;
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
function getApplicableZoneData(t, timeZone, tzData) {

@@ -27,11 +30,11 @@ var _a;

*/
export function ToLocalTime(t, calendar, timeZone, _a) {
function ToLocalTime(t, calendar, timeZone, _a) {
var tzData = _a.tzData;
invariant(Type(t) === 'Number', 'invalid time');
invariant(calendar === 'gregory', 'We only support Gregory calendar right now');
(0, ecma402_abstract_1.invariant)((0, ecma402_abstract_1.Type)(t) === 'Number', 'invalid time');
(0, ecma402_abstract_1.invariant)(calendar === 'gregory', 'We only support Gregory calendar right now');
var _b = getApplicableZoneData(t, timeZone, tzData), timeZoneOffset = _b[0], inDST = _b[1];
var tz = t + timeZoneOffset;
var year = YearFromTime(tz);
var year = (0, ecma402_abstract_1.YearFromTime)(tz);
return {
weekday: WeekDay(tz),
weekday: (0, ecma402_abstract_1.WeekDay)(tz),
era: year < 0 ? 'BC' : 'AD',

@@ -41,8 +44,8 @@ year: year,

yearName: undefined,
month: MonthFromTime(tz),
day: DateFromTime(tz),
hour: HourFromTime(tz),
minute: MinFromTime(tz),
second: SecFromTime(tz),
millisecond: msFromTime(tz),
month: (0, ecma402_abstract_1.MonthFromTime)(tz),
day: (0, ecma402_abstract_1.DateFromTime)(tz),
hour: (0, ecma402_abstract_1.HourFromTime)(tz),
minute: (0, ecma402_abstract_1.MinFromTime)(tz),
second: (0, ecma402_abstract_1.SecFromTime)(tz),
millisecond: (0, ecma402_abstract_1.msFromTime)(tz),
inDST: inDST,

@@ -53,1 +56,2 @@ // IMPORTANT: Not in spec

}
exports.ToLocalTime = ToLocalTime;

@@ -1,2 +0,5 @@

export var DATE_TIME_PROPS = [
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.offsetPenalty = exports.shortMorePenalty = exports.shortLessPenalty = exports.longMorePenalty = exports.longLessPenalty = exports.differentNumericTypePenalty = exports.additionPenalty = exports.removalPenalty = exports.DATE_TIME_PROPS = void 0;
exports.DATE_TIME_PROPS = [
'weekday',

@@ -14,9 +17,9 @@ 'era',

];
export var removalPenalty = 120;
export var additionPenalty = 20;
export var differentNumericTypePenalty = 15;
export var longLessPenalty = 8;
export var longMorePenalty = 6;
export var shortLessPenalty = 6;
export var shortMorePenalty = 3;
export var offsetPenalty = 1;
exports.removalPenalty = 120;
exports.additionPenalty = 20;
exports.differentNumericTypePenalty = 15;
exports.longLessPenalty = 8;
exports.longMorePenalty = 6;
exports.shortLessPenalty = 6;
exports.shortMorePenalty = 3;
exports.offsetPenalty = 1;

@@ -1,15 +0,18 @@

import { __assign, __rest } from "tslib";
import { invariant, defineProperty, SupportedLocales, IsValidTimeZoneName, CanonicalizeTimeZoneName, CanonicalizeLocaleList, ToNumber, OrdinaryHasInstance, } from '@formatjs/ecma402-abstract';
import getInternalSlots from './get_internal_slots';
import links from './data/links';
import { unpack } from './packer';
import { FormatDateTime } from './abstract/FormatDateTime';
import { InitializeDateTimeFormat } from './abstract/InitializeDateTimeFormat';
import { DATE_TIME_PROPS } from './abstract/utils';
import { FormatDateTimeToParts } from './abstract/FormatDateTimeToParts';
import { FormatDateTimeRangeToParts } from './abstract/FormatDateTimeRangeToParts';
import { FormatDateTimeRange } from './abstract/FormatDateTimeRange';
import { parseDateTimeSkeleton } from './abstract/skeleton';
var UPPERCASED_LINKS = Object.keys(links).reduce(function (all, l) {
all[l.toUpperCase()] = links[l];
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DateTimeFormat = void 0;
var tslib_1 = require("tslib");
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
var get_internal_slots_1 = tslib_1.__importDefault(require("./get_internal_slots"));
var links_1 = tslib_1.__importDefault(require("./data/links"));
var packer_1 = require("./packer");
var FormatDateTime_1 = require("./abstract/FormatDateTime");
var InitializeDateTimeFormat_1 = require("./abstract/InitializeDateTimeFormat");
var utils_1 = require("./abstract/utils");
var FormatDateTimeToParts_1 = require("./abstract/FormatDateTimeToParts");
var FormatDateTimeRangeToParts_1 = require("./abstract/FormatDateTimeRangeToParts");
var FormatDateTimeRange_1 = require("./abstract/FormatDateTimeRange");
var skeleton_1 = require("./abstract/skeleton");
var UPPERCASED_LINKS = Object.keys(links_1.default).reduce(function (all, l) {
all[l.toUpperCase()] = links_1.default[l];
return all;

@@ -40,6 +43,6 @@ }, {});

if (typeof this !== 'object' ||
!OrdinaryHasInstance(DateTimeFormat, this)) {
!(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.DateTimeFormat, this)) {
throw TypeError('Intl.DateTimeFormat format property accessor called on incompatible receiver');
}
var internalSlots = getInternalSlots(this);
var internalSlots = (0, get_internal_slots_1.default)(this);
// eslint-disable-next-line @typescript-eslint/no-this-alias

@@ -58,7 +61,7 @@ var dtf = this;

}
return FormatDateTime(dtf, x, {
getInternalSlots: getInternalSlots,
localeData: DateTimeFormat.localeData,
tzData: DateTimeFormat.tzData,
getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
return (0, FormatDateTime_1.FormatDateTime)(dtf, x, {
getInternalSlots: get_internal_slots_1.default,
localeData: exports.DateTimeFormat.localeData,
tzData: exports.DateTimeFormat.tzData,
getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
});

@@ -97,37 +100,37 @@ };

}
export var DateTimeFormat = function (locales, options) {
exports.DateTimeFormat = function (locales, options) {
// Cannot use `new.target` bc of IE11 & TS transpiles it to something else
if (!this || !OrdinaryHasInstance(DateTimeFormat, this)) {
return new DateTimeFormat(locales, options);
if (!this || !(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.DateTimeFormat, this)) {
return new exports.DateTimeFormat(locales, options);
}
InitializeDateTimeFormat(this, locales, options, {
tzData: DateTimeFormat.tzData,
(0, InitializeDateTimeFormat_1.InitializeDateTimeFormat)(this, locales, options, {
tzData: exports.DateTimeFormat.tzData,
uppercaseLinks: UPPERCASED_LINKS,
availableLocales: DateTimeFormat.availableLocales,
relevantExtensionKeys: DateTimeFormat.relevantExtensionKeys,
getDefaultLocale: DateTimeFormat.getDefaultLocale,
getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
getInternalSlots: getInternalSlots,
localeData: DateTimeFormat.localeData,
availableLocales: exports.DateTimeFormat.availableLocales,
relevantExtensionKeys: exports.DateTimeFormat.relevantExtensionKeys,
getDefaultLocale: exports.DateTimeFormat.getDefaultLocale,
getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
getInternalSlots: get_internal_slots_1.default,
localeData: exports.DateTimeFormat.localeData,
});
/** IMPL START */
var internalSlots = getInternalSlots(this);
var internalSlots = (0, get_internal_slots_1.default)(this);
var dataLocale = internalSlots.dataLocale;
var dataLocaleData = DateTimeFormat.localeData[dataLocale];
invariant(dataLocaleData !== undefined, "Cannot load locale-dependent data for ".concat(dataLocale, "."));
var dataLocaleData = exports.DateTimeFormat.localeData[dataLocale];
(0, ecma402_abstract_1.invariant)(dataLocaleData !== undefined, "Cannot load locale-dependent data for ".concat(dataLocale, "."));
/** IMPL END */
};
// Static properties
defineProperty(DateTimeFormat, 'supportedLocalesOf', {
(0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat, 'supportedLocalesOf', {
value: function supportedLocalesOf(locales, options) {
return SupportedLocales(DateTimeFormat.availableLocales, CanonicalizeLocaleList(locales), options);
return (0, ecma402_abstract_1.SupportedLocales)(exports.DateTimeFormat.availableLocales, (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales), options);
},
});
defineProperty(DateTimeFormat.prototype, 'resolvedOptions', {
(0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat.prototype, 'resolvedOptions', {
value: function resolvedOptions() {
if (typeof this !== 'object' ||
!OrdinaryHasInstance(DateTimeFormat, this)) {
!(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.DateTimeFormat, this)) {
throw TypeError('Method Intl.DateTimeFormat.prototype.resolvedOptions called on incompatible receiver');
}
var internalSlots = getInternalSlots(this);
var internalSlots = (0, get_internal_slots_1.default)(this);
var ro = {};

@@ -147,3 +150,3 @@ for (var _i = 0, RESOLVED_OPTIONS_KEYS_1 = RESOLVED_OPTIONS_KEYS; _i < RESOLVED_OPTIONS_KEYS_1.length; _i++) {

}
if (DATE_TIME_PROPS.indexOf(key) > -1) {
if (utils_1.DATE_TIME_PROPS.indexOf(key) > -1) {
if (internalSlots.dateStyle !== undefined ||

@@ -161,3 +164,3 @@ internalSlots.timeStyle !== undefined) {

});
defineProperty(DateTimeFormat.prototype, 'formatToParts', {
(0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat.prototype, 'formatToParts', {
value: function formatToParts(date) {

@@ -168,13 +171,13 @@ if (date === undefined) {

else {
date = ToNumber(date);
date = (0, ecma402_abstract_1.ToNumber)(date);
}
return FormatDateTimeToParts(this, date, {
getInternalSlots: getInternalSlots,
localeData: DateTimeFormat.localeData,
tzData: DateTimeFormat.tzData,
getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
return (0, FormatDateTimeToParts_1.FormatDateTimeToParts)(this, date, {
getInternalSlots: get_internal_slots_1.default,
localeData: exports.DateTimeFormat.localeData,
tzData: exports.DateTimeFormat.tzData,
getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
});
},
});
defineProperty(DateTimeFormat.prototype, 'formatRangeToParts', {
(0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat.prototype, 'formatRangeToParts', {
value: function formatRangeToParts(startDate, endDate) {

@@ -188,13 +191,13 @@ var dtf = this;

}
var x = ToNumber(startDate);
var y = ToNumber(endDate);
return FormatDateTimeRangeToParts(dtf, x, y, {
getInternalSlots: getInternalSlots,
localeData: DateTimeFormat.localeData,
tzData: DateTimeFormat.tzData,
getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
var x = (0, ecma402_abstract_1.ToNumber)(startDate);
var y = (0, ecma402_abstract_1.ToNumber)(endDate);
return (0, FormatDateTimeRangeToParts_1.FormatDateTimeRangeToParts)(dtf, x, y, {
getInternalSlots: get_internal_slots_1.default,
localeData: exports.DateTimeFormat.localeData,
tzData: exports.DateTimeFormat.tzData,
getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
});
},
});
defineProperty(DateTimeFormat.prototype, 'formatRange', {
(0, ecma402_abstract_1.defineProperty)(exports.DateTimeFormat.prototype, 'formatRange', {
value: function formatRange(startDate, endDate) {

@@ -208,9 +211,9 @@ var dtf = this;

}
var x = ToNumber(startDate);
var y = ToNumber(endDate);
return FormatDateTimeRange(dtf, x, y, {
getInternalSlots: getInternalSlots,
localeData: DateTimeFormat.localeData,
tzData: DateTimeFormat.tzData,
getDefaultTimeZone: DateTimeFormat.getDefaultTimeZone,
var x = (0, ecma402_abstract_1.ToNumber)(startDate);
var y = (0, ecma402_abstract_1.ToNumber)(endDate);
return (0, FormatDateTimeRange_1.FormatDateTimeRange)(dtf, x, y, {
getInternalSlots: get_internal_slots_1.default,
localeData: exports.DateTimeFormat.localeData,
tzData: exports.DateTimeFormat.tzData,
getDefaultTimeZone: exports.DateTimeFormat.getDefaultTimeZone,
});

@@ -220,7 +223,7 @@ },

var DEFAULT_TIMEZONE = 'UTC';
DateTimeFormat.__setDefaultTimeZone = function (timeZone) {
exports.DateTimeFormat.__setDefaultTimeZone = function (timeZone) {
if (timeZone !== undefined) {
timeZone = String(timeZone);
if (!IsValidTimeZoneName(timeZone, {
tzData: DateTimeFormat.tzData,
if (!(0, ecma402_abstract_1.IsValidTimeZoneName)(timeZone, {
tzData: exports.DateTimeFormat.tzData,
uppercaseLinks: UPPERCASED_LINKS,

@@ -230,4 +233,4 @@ })) {

}
timeZone = CanonicalizeTimeZoneName(timeZone, {
tzData: DateTimeFormat.tzData,
timeZone = (0, ecma402_abstract_1.CanonicalizeTimeZoneName)(timeZone, {
tzData: exports.DateTimeFormat.tzData,
uppercaseLinks: UPPERCASED_LINKS,

@@ -239,8 +242,8 @@ });

}
DateTimeFormat.__defaultTimeZone = timeZone;
exports.DateTimeFormat.__defaultTimeZone = timeZone;
};
DateTimeFormat.relevantExtensionKeys = ['nu', 'ca', 'hc'];
DateTimeFormat.__defaultTimeZone = DEFAULT_TIMEZONE;
DateTimeFormat.getDefaultTimeZone = function () { return DateTimeFormat.__defaultTimeZone; };
DateTimeFormat.__addLocaleData = function __addLocaleData() {
exports.DateTimeFormat.relevantExtensionKeys = ['nu', 'ca', 'hc'];
exports.DateTimeFormat.__defaultTimeZone = DEFAULT_TIMEZONE;
exports.DateTimeFormat.getDefaultTimeZone = function () { return exports.DateTimeFormat.__defaultTimeZone; };
exports.DateTimeFormat.__addLocaleData = function __addLocaleData() {
var data = [];

@@ -251,22 +254,22 @@ for (var _i = 0; _i < arguments.length; _i++) {

var _loop_1 = function (d, locale) {
var dateFormat = d.dateFormat, timeFormat = d.timeFormat, dateTimeFormat = d.dateTimeFormat, formats = d.formats, intervalFormats = d.intervalFormats, rawData = __rest(d, ["dateFormat", "timeFormat", "dateTimeFormat", "formats", "intervalFormats"]);
var processedData = __assign(__assign({}, rawData), { dateFormat: {
full: parseDateTimeSkeleton(dateFormat.full),
long: parseDateTimeSkeleton(dateFormat.long),
medium: parseDateTimeSkeleton(dateFormat.medium),
short: parseDateTimeSkeleton(dateFormat.short),
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"]);
var processedData = tslib_1.__assign(tslib_1.__assign({}, rawData), { dateFormat: {
full: (0, skeleton_1.parseDateTimeSkeleton)(dateFormat.full),
long: (0, skeleton_1.parseDateTimeSkeleton)(dateFormat.long),
medium: (0, skeleton_1.parseDateTimeSkeleton)(dateFormat.medium),
short: (0, skeleton_1.parseDateTimeSkeleton)(dateFormat.short),
}, timeFormat: {
full: parseDateTimeSkeleton(timeFormat.full),
long: parseDateTimeSkeleton(timeFormat.long),
medium: parseDateTimeSkeleton(timeFormat.medium),
short: parseDateTimeSkeleton(timeFormat.short),
full: (0, skeleton_1.parseDateTimeSkeleton)(timeFormat.full),
long: (0, skeleton_1.parseDateTimeSkeleton)(timeFormat.long),
medium: (0, skeleton_1.parseDateTimeSkeleton)(timeFormat.medium),
short: (0, skeleton_1.parseDateTimeSkeleton)(timeFormat.short),
}, dateTimeFormat: {
full: parseDateTimeSkeleton(dateTimeFormat.full).pattern,
long: parseDateTimeSkeleton(dateTimeFormat.long).pattern,
medium: parseDateTimeSkeleton(dateTimeFormat.medium).pattern,
short: parseDateTimeSkeleton(dateTimeFormat.short).pattern,
full: (0, skeleton_1.parseDateTimeSkeleton)(dateTimeFormat.full).pattern,
long: (0, skeleton_1.parseDateTimeSkeleton)(dateTimeFormat.long).pattern,
medium: (0, skeleton_1.parseDateTimeSkeleton)(dateTimeFormat.medium).pattern,
short: (0, skeleton_1.parseDateTimeSkeleton)(dateTimeFormat.short).pattern,
}, formats: {} });
var _loop_2 = function (calendar) {
processedData.formats[calendar] = Object.keys(formats[calendar]).map(function (skeleton) {
return parseDateTimeSkeleton(skeleton, formats[calendar][skeleton], intervalFormats[skeleton], intervalFormats.intervalFormatFallback);
return (0, skeleton_1.parseDateTimeSkeleton)(skeleton, formats[calendar][skeleton], intervalFormats[skeleton], intervalFormats.intervalFormatFallback);
});

@@ -280,7 +283,7 @@ };

.toString();
DateTimeFormat.localeData[locale] = DateTimeFormat.localeData[minimizedLocale] = processedData;
DateTimeFormat.availableLocales.add(locale);
DateTimeFormat.availableLocales.add(minimizedLocale);
if (!DateTimeFormat.__defaultLocale) {
DateTimeFormat.__defaultLocale = minimizedLocale;
exports.DateTimeFormat.localeData[locale] = exports.DateTimeFormat.localeData[minimizedLocale] = processedData;
exports.DateTimeFormat.availableLocales.add(locale);
exports.DateTimeFormat.availableLocales.add(minimizedLocale);
if (!exports.DateTimeFormat.__defaultLocale) {
exports.DateTimeFormat.__defaultLocale = minimizedLocale;
}

@@ -293,17 +296,17 @@ };

};
Object.defineProperty(DateTimeFormat.prototype, 'format', formatDescriptor);
DateTimeFormat.__defaultLocale = '';
DateTimeFormat.localeData = {};
DateTimeFormat.availableLocales = new Set();
DateTimeFormat.getDefaultLocale = function () {
return DateTimeFormat.__defaultLocale;
Object.defineProperty(exports.DateTimeFormat.prototype, 'format', formatDescriptor);
exports.DateTimeFormat.__defaultLocale = '';
exports.DateTimeFormat.localeData = {};
exports.DateTimeFormat.availableLocales = new Set();
exports.DateTimeFormat.getDefaultLocale = function () {
return exports.DateTimeFormat.__defaultLocale;
};
DateTimeFormat.polyfilled = true;
DateTimeFormat.tzData = {};
DateTimeFormat.__addTZData = function (d) {
DateTimeFormat.tzData = unpack(d);
exports.DateTimeFormat.polyfilled = true;
exports.DateTimeFormat.tzData = {};
exports.DateTimeFormat.__addTZData = function (d) {
exports.DateTimeFormat.tzData = (0, packer_1.unpack)(d);
};
try {
if (typeof Symbol !== 'undefined') {
Object.defineProperty(DateTimeFormat.prototype, Symbol.toStringTag, {
Object.defineProperty(exports.DateTimeFormat.prototype, Symbol.toStringTag, {
value: 'Intl.DateTimeFormat',

@@ -315,3 +318,3 @@ writable: false,

}
Object.defineProperty(DateTimeFormat.prototype.constructor, 'length', {
Object.defineProperty(exports.DateTimeFormat.prototype.constructor, 'length', {
value: 1,

@@ -318,0 +321,0 @@ writable: false,

@@ -0,4 +1,6 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @generated
// prettier-ignore
export default {
exports.default = {
"Africa/Accra": "Africa/Abidjan",

@@ -5,0 +7,0 @@ "Africa/Addis_Ababa": "Africa/Nairobi",

@@ -0,5 +1,7 @@

"use strict";
// Type-only circular import
// eslint-disable-next-line import/no-cycle
Object.defineProperty(exports, "__esModule", { value: true });
var internalSlotMap = new WeakMap();
export default function getInternalSlots(x) {
function getInternalSlots(x) {
var internalSlots = internalSlotMap.get(x);

@@ -12,1 +14,2 @@ if (!internalSlots) {

}
exports.default = getInternalSlots;

@@ -1,3 +0,6 @@

import { __spreadArray } from "tslib";
export function pack(data) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.unpack = exports.pack = void 0;
var tslib_1 = require("tslib");
function pack(data) {
var zoneNames = Object.keys(data.zones);

@@ -7,7 +10,7 @@ zoneNames.sort(); // so output is stable

zones: zoneNames.map(function (zone) {
return __spreadArray([
return tslib_1.__spreadArray([
zone
], data.zones[zone].map(function (_a) {
var ts = _a[0], others = _a.slice(1);
return __spreadArray([ts === '' ? '' : ts.toString(36)], others, true).join(',');
return tslib_1.__spreadArray([ts === '' ? '' : ts.toString(36)], others, true).join(',');
}), true).join('|');

@@ -19,3 +22,4 @@ }),

}
export function unpack(data) {
exports.pack = pack;
function unpack(data) {
var abbrvs = data.abbrvs.split('|');

@@ -42,1 +46,2 @@ var offsets = data.offsets.split('|').map(function (n) { return parseInt(n, 36); });

}
exports.unpack = unpack;

@@ -0,4 +1,7 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toLocaleTimeString = exports.toLocaleDateString = exports.toLocaleString = void 0;
// eslint-disable-next-line import/no-cycle
import { DateTimeFormat } from './core';
import { ToDateTimeOptions } from './abstract/ToDateTimeOptions';
var core_1 = require("./core");
var ToDateTimeOptions_1 = require("./abstract/ToDateTimeOptions");
/**

@@ -8,13 +11,16 @@ * Number.prototype.toLocaleString ponyfill

*/
export function toLocaleString(x, locales, options) {
var dtf = new DateTimeFormat(locales, options);
function toLocaleString(x, locales, options) {
var dtf = new core_1.DateTimeFormat(locales, options);
return dtf.format(x);
}
export function toLocaleDateString(x, locales, options) {
var dtf = new DateTimeFormat(locales, ToDateTimeOptions(options, 'date', 'date'));
exports.toLocaleString = toLocaleString;
function toLocaleDateString(x, locales, options) {
var dtf = new core_1.DateTimeFormat(locales, (0, ToDateTimeOptions_1.ToDateTimeOptions)(options, 'date', 'date'));
return dtf.format(x);
}
export function toLocaleTimeString(x, locales, options) {
var dtf = new DateTimeFormat(locales, ToDateTimeOptions(options, 'time', 'time'));
exports.toLocaleDateString = toLocaleDateString;
function toLocaleTimeString(x, locales, options) {
var dtf = new core_1.DateTimeFormat(locales, (0, ToDateTimeOptions_1.ToDateTimeOptions)(options, 'time', 'time'));
return dtf.format(x);
}
exports.toLocaleTimeString = toLocaleTimeString;

@@ -1,1 +0,2 @@

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,1 +0,4 @@

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"];
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.supportedLocales = void 0;
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"];
{
"name": "@formatjs/intl-datetimeformat",
"version": "6.11.1",
"version": "6.11.2",
"description": "Intl.DateTimeFormat polyfill",

@@ -26,9 +26,9 @@ "main": "index.js",

"tslib": "^2.4.0",
"@formatjs/ecma402-abstract": "1.17.2",
"@formatjs/intl-localematcher": "0.4.2"
"@formatjs/intl-localematcher": "0.5.0",
"@formatjs/ecma402-abstract": "1.17.3"
},
"devDependencies": {
"@formatjs/intl-locale": "3.4.0",
"@formatjs/intl-getcanonicallocales": "2.3.0"
"@formatjs/intl-getcanonicallocales": "2.3.0",
"@formatjs/intl-locale": "3.4.1"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc