@formatjs/intl-datetimeformat 6.16.6 → 6.17.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.
@@ -4,8 +4,8 @@ exports.bestFitFormatMatcherScore = bestFitFormatMatcherScore;
4
4
  exports.BestFitFormatMatcher = BestFitFormatMatcher;
5
5
  var tslib_1 = require("tslib");
6
6
  var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
7
- var utils_1 = require("./utils");
8
7
  var skeleton_1 = require("./skeleton");
8
+ var utils_1 = require("./utils");
9
9
  function isNumericType(t) {
10
10
  return t === 'numeric' || t === '2-digit';
11
11
  }
@@ -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): any[];
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[];
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PartitionDateTimeRangePattern = PartitionDateTimeRangePattern;
4
4
  var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
5
- var ToLocalTime_1 = require("./ToLocalTime");
6
5
  var FormatDateTimePattern_1 = require("./FormatDateTimePattern");
6
+ var ToLocalTime_1 = require("./ToLocalTime");
7
7
  var TABLE_2_FIELDS = [
8
8
  'era',
9
9
  'year',
package/src/core.js CHANGED
@@ -163,7 +163,7 @@ exports.DateTimeFormat = function (locales, options) {
163
163
  date = Date.now();
164
164
  }
165
165
  else {
166
- date = (0, ecma402_abstract_1.ToNumber)(date);
166
+ date = (0, ecma402_abstract_1.ToNumber)(date).toNumber();
167
167
  }
168
168
  return (0, FormatDateTimeToParts_1.FormatDateTimeToParts)(this, date, {
169
169
  getInternalSlots: get_internal_slots_1.default,
@@ -182,8 +182,8 @@ exports.DateTimeFormat = function (locales, options) {
182
182
  if (startDate === undefined || endDate === undefined) {
183
183
  throw new TypeError('startDate/endDate cannot be undefined');
184
184
  }
185
- var x = (0, ecma402_abstract_1.ToNumber)(startDate);
186
- var y = (0, ecma402_abstract_1.ToNumber)(endDate);
185
+ var x = (0, ecma402_abstract_1.ToNumber)(startDate).toNumber();
186
+ var y = (0, ecma402_abstract_1.ToNumber)(endDate).toNumber();
187
187
  return (0, FormatDateTimeRangeToParts_1.FormatDateTimeRangeToParts)(dtf, x, y, {
188
188
  getInternalSlots: get_internal_slots_1.default,
189
189
  localeData: exports.DateTimeFormat.localeData,
@@ -201,8 +201,8 @@ exports.DateTimeFormat = function (locales, options) {
201
201
  if (startDate === undefined || endDate === undefined) {
202
202
  throw new TypeError('startDate/endDate cannot be undefined');
203
203
  }
204
- var x = (0, ecma402_abstract_1.ToNumber)(startDate);
205
- var y = (0, ecma402_abstract_1.ToNumber)(endDate);
204
+ var x = (0, ecma402_abstract_1.ToNumber)(startDate).toNumber();
205
+ var y = (0, ecma402_abstract_1.ToNumber)(endDate).toNumber();
206
206
  return (0, FormatDateTimeRange_1.FormatDateTimeRange)(dtf, x, y, {
207
207
  getInternalSlots: get_internal_slots_1.default,
208
208
  localeData: exports.DateTimeFormat.localeData,
@@ -1,6 +1,6 @@
1
- declare const _default: {
1
+ declare const data: {
2
2
  abbrvs: string;
3
3
  offsets: string;
4
4
  zones: string[];
5
5
  };
6
- export default _default;
6
+ export default data;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // @generated
4
4
  // prettier-ignore
5
- exports.default = {
5
+ var data = {
6
6
  "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|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|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",
8
8
  "zones": [
@@ -460,3 +460,4 @@ exports.default = {
460
460
  "Pacific/Wallis|,0,372,0|-100f9dh,0,372,0|-100f9dg,99,192,0|NaN,99,192,0"
461
461
  ]
462
462
  };
463
+ exports.default = data;