@formatjs/intl-datetimeformat 6.12.6 → 6.14.0
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.
- package/add-all-tz.js +212 -212
- package/add-golden-tz.js +134 -134
- package/lib/src/abstract/FormatDateTimePattern.d.ts +1 -1
- package/lib/src/abstract/FormatDateTimePattern.js +5 -5
- package/lib/src/data/all-tz.js +212 -212
- package/lib/src/data/links.d.ts +12 -0
- package/lib/src/data/links.js +12 -0
- package/package.json +6 -6
- package/polyfill.iife.js +827 -523
- package/should-polyfill.js +1 -2
- package/src/abstract/BasicFormatMatcher.js +1 -2
- package/src/abstract/BestFitFormatMatcher.js +2 -3
- package/src/abstract/DateTimeStyleFormat.js +1 -2
- package/src/abstract/FormatDateTime.js +1 -2
- package/src/abstract/FormatDateTimePattern.d.ts +1 -1
- package/src/abstract/FormatDateTimePattern.js +5 -6
- package/src/abstract/FormatDateTimeRange.js +1 -2
- package/src/abstract/FormatDateTimeRangeToParts.js +1 -2
- package/src/abstract/FormatDateTimeToParts.js +1 -2
- package/src/abstract/InitializeDateTimeFormat.js +1 -2
- package/src/abstract/PartitionDateTimePattern.js +1 -2
- package/src/abstract/PartitionDateTimeRangePattern.js +1 -2
- package/src/abstract/ToDateTimeOptions.js +1 -2
- package/src/abstract/ToLocalTime.js +1 -2
- package/src/abstract/skeleton.js +4 -5
- package/src/data/all-tz.js +212 -212
- package/src/data/links.d.ts +12 -0
- package/src/data/links.js +12 -0
- package/src/get_internal_slots.js +1 -1
- package/src/packer.js +2 -3
- package/src/to_locale_string.js +3 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DateTimeFormat, DateTimeFormatLocaleInternalData, IntlDateTimeFormatInternal, IntlDateTimeFormatPart } from '@formatjs/ecma402-abstract';
|
|
2
2
|
import { ToLocalTimeImplDetails } from './ToLocalTime';
|
|
3
3
|
export interface FormatDateTimePatternImplDetails {
|
|
4
4
|
getInternalSlots(dtf: Intl.DateTimeFormat | DateTimeFormat): IntlDateTimeFormatInternal;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TimeClip, } from '@formatjs/ecma402-abstract';
|
|
2
|
-
import { DATE_TIME_PROPS } from './utils';
|
|
1
|
+
import { TimeClip, createMemoizedNumberFormat, } from '@formatjs/ecma402-abstract';
|
|
3
2
|
import { ToLocalTime } from './ToLocalTime';
|
|
3
|
+
import { DATE_TIME_PROPS } from './utils';
|
|
4
4
|
function pad(n) {
|
|
5
5
|
if (n < 10) {
|
|
6
6
|
return "0".concat(n);
|
|
@@ -45,18 +45,18 @@ export function FormatDateTimePattern(dtf, patternParts, x, _a) {
|
|
|
45
45
|
var locale = internalSlots.locale;
|
|
46
46
|
var nfOptions = Object.create(null);
|
|
47
47
|
nfOptions.useGrouping = false;
|
|
48
|
-
var nf =
|
|
48
|
+
var nf = createMemoizedNumberFormat(locale, nfOptions);
|
|
49
49
|
var nf2Options = Object.create(null);
|
|
50
50
|
nf2Options.minimumIntegerDigits = 2;
|
|
51
51
|
nf2Options.useGrouping = false;
|
|
52
|
-
var nf2 =
|
|
52
|
+
var nf2 = createMemoizedNumberFormat(locale, nf2Options);
|
|
53
53
|
var fractionalSecondDigits = internalSlots.fractionalSecondDigits;
|
|
54
54
|
var nf3;
|
|
55
55
|
if (fractionalSecondDigits !== undefined) {
|
|
56
56
|
var nf3Options = Object.create(null);
|
|
57
57
|
nf3Options.minimumIntegerDigits = fractionalSecondDigits;
|
|
58
58
|
nf3Options.useGrouping = false;
|
|
59
|
-
nf3 =
|
|
59
|
+
nf3 = createMemoizedNumberFormat(locale, nf3Options);
|
|
60
60
|
}
|
|
61
61
|
var tm = ToLocalTime(x,
|
|
62
62
|
// @ts-ignore
|