@formatjs/intl-datetimeformat 6.16.6 → 6.17.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.
- package/lib/src/abstract/BestFitFormatMatcher.js +1 -1
- package/lib/src/abstract/FormatDateTimeRangeToParts.d.ts +2 -1
- package/lib/src/abstract/PartitionDateTimeRangePattern.d.ts +1 -1
- package/lib/src/abstract/PartitionDateTimeRangePattern.js +2 -2
- package/lib/src/core.js +5 -5
- package/lib/src/data/all-tz.d.ts +2 -2
- package/lib/src/data/all-tz.js +2 -1
- package/package.json +5 -5
- package/polyfill.iife.js +2409 -34
- package/src/abstract/BestFitFormatMatcher.js +1 -1
- package/src/abstract/FormatDateTimeRangeToParts.d.ts +2 -1
- package/src/abstract/PartitionDateTimeRangePattern.d.ts +1 -1
- package/src/abstract/PartitionDateTimeRangePattern.js +1 -1
- package/src/core.js +5 -5
- package/src/data/all-tz.d.ts +2 -2
- package/src/data/all-tz.js +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import { invariant } from '@formatjs/ecma402-abstract';
|
|
3
|
-
import { DATE_TIME_PROPS, removalPenalty, additionPenalty, differentNumericTypePenalty, longMorePenalty, shortMorePenalty, shortLessPenalty, longLessPenalty, } from './utils';
|
|
4
3
|
import { processDateTimePattern } from './skeleton';
|
|
4
|
+
import { DATE_TIME_PROPS, additionPenalty, differentNumericTypePenalty, longLessPenalty, longMorePenalty, removalPenalty, shortLessPenalty, shortMorePenalty, } from './utils';
|
|
5
5
|
function isNumericType(t) {
|
|
6
6
|
return t === 'numeric' || t === '2-digit';
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IntlDateTimeFormatPart } from '@formatjs/ecma402-abstract';
|
|
1
2
|
import { FormatDateTimePatternImplDetails } from './FormatDateTimePattern';
|
|
2
3
|
import { ToLocalTimeImplDetails } from './ToLocalTime';
|
|
3
|
-
export declare function FormatDateTimeRangeToParts(dtf: Intl.DateTimeFormat, x: number, y: number, implDetails: FormatDateTimePatternImplDetails & ToLocalTimeImplDetails):
|
|
4
|
+
export declare function FormatDateTimeRangeToParts(dtf: Intl.DateTimeFormat, x: number, y: number, implDetails: FormatDateTimePatternImplDetails & ToLocalTimeImplDetails): IntlDateTimeFormatPart[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IntlDateTimeFormatPart } from '@formatjs/ecma402-abstract';
|
|
2
|
-
import { ToLocalTimeImplDetails } from './ToLocalTime';
|
|
3
2
|
import { FormatDateTimePatternImplDetails } from './FormatDateTimePattern';
|
|
3
|
+
import { ToLocalTimeImplDetails } from './ToLocalTime';
|
|
4
4
|
export declare function PartitionDateTimeRangePattern(dtf: Intl.DateTimeFormat, x: number, y: number, implDetails: FormatDateTimePatternImplDetails & ToLocalTimeImplDetails): IntlDateTimeFormatPart[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ToLocalTime } from './ToLocalTime';
|
|
1
|
+
import { PartitionPattern, RangePatternType, SameValue, TimeClip, } from '@formatjs/ecma402-abstract';
|
|
3
2
|
import { FormatDateTimePattern, } from './FormatDateTimePattern';
|
|
3
|
+
import { ToLocalTime } from './ToLocalTime';
|
|
4
4
|
var TABLE_2_FIELDS = [
|
|
5
5
|
'era',
|
|
6
6
|
'year',
|
package/lib/src/core.js
CHANGED
|
@@ -160,7 +160,7 @@ defineProperty(DateTimeFormat.prototype, 'formatToParts', {
|
|
|
160
160
|
date = Date.now();
|
|
161
161
|
}
|
|
162
162
|
else {
|
|
163
|
-
date = ToNumber(date);
|
|
163
|
+
date = ToNumber(date).toNumber();
|
|
164
164
|
}
|
|
165
165
|
return FormatDateTimeToParts(this, date, {
|
|
166
166
|
getInternalSlots: getInternalSlots,
|
|
@@ -179,8 +179,8 @@ defineProperty(DateTimeFormat.prototype, 'formatRangeToParts', {
|
|
|
179
179
|
if (startDate === undefined || endDate === undefined) {
|
|
180
180
|
throw new TypeError('startDate/endDate cannot be undefined');
|
|
181
181
|
}
|
|
182
|
-
var x = ToNumber(startDate);
|
|
183
|
-
var y = ToNumber(endDate);
|
|
182
|
+
var x = ToNumber(startDate).toNumber();
|
|
183
|
+
var y = ToNumber(endDate).toNumber();
|
|
184
184
|
return FormatDateTimeRangeToParts(dtf, x, y, {
|
|
185
185
|
getInternalSlots: getInternalSlots,
|
|
186
186
|
localeData: DateTimeFormat.localeData,
|
|
@@ -198,8 +198,8 @@ defineProperty(DateTimeFormat.prototype, 'formatRange', {
|
|
|
198
198
|
if (startDate === undefined || endDate === undefined) {
|
|
199
199
|
throw new TypeError('startDate/endDate cannot be undefined');
|
|
200
200
|
}
|
|
201
|
-
var x = ToNumber(startDate);
|
|
202
|
-
var y = ToNumber(endDate);
|
|
201
|
+
var x = ToNumber(startDate).toNumber();
|
|
202
|
+
var y = ToNumber(endDate).toNumber();
|
|
203
203
|
return FormatDateTimeRange(dtf, x, y, {
|
|
204
204
|
getInternalSlots: getInternalSlots,
|
|
205
205
|
localeData: DateTimeFormat.localeData,
|
package/lib/src/data/all-tz.d.ts
CHANGED
package/lib/src/data/all-tz.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated
|
|
2
2
|
// prettier-ignore
|
|
3
|
-
|
|
3
|
+
var data = {
|
|
4
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|CDT|ADT|-0330|-0530|CWT|CPT|BMT|-05|PST|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",
|
|
5
5
|
"offsets": "-qw|0|6tg|6y0|8c0|7n0|kc|fl|2s0|5k0|mn|1e0|-2vw|-2s0|616|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|2h4|e90|6nk|wv8|12w0|9b4|b40|al4|at8|9m8|884|880|9jk|98c|im4|fic|6ko|dtc|kfk|ku0|n5c|p00|l0g|jsk|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|g7w|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",
|
|
6
6
|
"zones": [
|
|
@@ -458,3 +458,4 @@ export default {
|
|
|
458
458
|
"Pacific/Wallis|,0,372,0|-100f9dh,0,372,0|-100f9dg,99,192,0|NaN,99,192,0"
|
|
459
459
|
]
|
|
460
460
|
};
|
|
461
|
+
export default data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-datetimeformat",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.17.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",
|
|
26
|
-
"@formatjs/
|
|
27
|
-
"@formatjs/
|
|
26
|
+
"@formatjs/ecma402-abstract": "2.3.1",
|
|
27
|
+
"@formatjs/intl-localematcher": "0.5.9"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@formatjs/intl-getcanonicallocales": "2.5.
|
|
31
|
-
"@formatjs/intl-locale": "4.2.
|
|
30
|
+
"@formatjs/intl-getcanonicallocales": "2.5.4",
|
|
31
|
+
"@formatjs/intl-locale": "4.2.8"
|
|
32
32
|
}
|
|
33
33
|
}
|