@js-joda/locale 4.2.0 → 4.5.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/CHANGELOG.md +19 -2
- package/README.md +8 -8
- package/dist/js-joda-locale.js +1090 -1296
- package/dist/js-joda-locale.js.map +1 -1
- package/dist/js-joda-locale.min.js +9 -36
- package/dist/prebuilt/de/index.js +1100 -1306
- package/dist/prebuilt/de/index.js.map +1 -1
- package/dist/prebuilt/de-de/index.js +1100 -1306
- package/dist/prebuilt/de-de/index.js.map +1 -1
- package/dist/prebuilt/en/index.js +1101 -1307
- package/dist/prebuilt/en/index.js.map +1 -1
- package/dist/prebuilt/en-us/index.js +1100 -1306
- package/dist/prebuilt/en-us/index.js.map +1 -1
- package/dist/prebuilt/es/index.js +1101 -1307
- package/dist/prebuilt/es/index.js.map +1 -1
- package/dist/prebuilt/fr/index.js +1101 -1307
- package/dist/prebuilt/fr/index.js.map +1 -1
- package/dist/prebuilt/fr-fr/index.js +1100 -1306
- package/dist/prebuilt/fr-fr/index.js.map +1 -1
- package/dist/prebuilt/hi/index.js +1100 -1306
- package/dist/prebuilt/hi/index.js.map +1 -1
- package/dist/prebuilt/it/index.js +1100 -1306
- package/dist/prebuilt/it/index.js.map +1 -1
- package/dist/prebuilt/it-it/index.js +1100 -1306
- package/dist/prebuilt/it-it/index.js.map +1 -1
- package/dist/prebuilt/ja/index.js +1100 -1306
- package/dist/prebuilt/ja/index.js.map +1 -1
- package/dist/prebuilt/ja-jp/index.js +1100 -1306
- package/dist/prebuilt/ja-jp/index.js.map +1 -1
- package/dist/prebuilt/ko/index.js +1100 -1306
- package/dist/prebuilt/ko/index.js.map +1 -1
- package/dist/prebuilt/ro/index.js +1100 -1306
- package/dist/prebuilt/ro/index.js.map +1 -1
- package/dist/prebuilt/ru/index.js +4031 -0
- package/dist/prebuilt/ru/index.js.map +1 -0
- package/dist/prebuilt/sv/index.js +1100 -1306
- package/dist/prebuilt/sv/index.js.map +1 -1
- package/dist/prebuilt/sv-se/index.js +1100 -1306
- package/dist/prebuilt/sv-se/index.js.map +1 -1
- package/dist/prebuilt/zh/index.js +1100 -1306
- package/dist/prebuilt/zh/index.js.map +1 -1
- package/package.json +24 -17
- package/src/Locale.js +8 -0
- package/{dist → typings}/js-joda-locale.d.ts +12 -0
- package/.babelrc +0 -24
- package/build_package.default.json +0 -14
- package/build_package.prebuilt.json +0 -66
- package/examples/usage_browser.html +0 -111
- package/examples/usage_browser_build.html +0 -72
- package/examples/usage_es6.js +0 -15
- package/examples/usage_node.js +0 -38
- package/examples/usage_node_build.js +0 -48
- package/utils/CldrDataIgnorePlugin.js +0 -57
- package/utils/README_package.template.md +0 -13
- package/utils/buildWebpackConfig.js +0 -28
- package/utils/build_package.js +0 -170
- package/utils/create_packages.js +0 -136
- package/utils/load_cldrData.prebuilt.js +0 -18
- package/utils/publish_release.js +0 -151
- package/webpack.config.js +0 -88
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/locale - 4.
|
|
1
|
+
//! @version @js-joda/locale - 4.5.0
|
|
2
2
|
//! @copyright (c) 2015-2016, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
3
3
|
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
4
4
|
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
@@ -4339,12 +4339,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4339
4339
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Locale; });
|
|
4340
4340
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_init", function() { return _init; });
|
|
4341
4341
|
/* harmony import */ var _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format/cldr/CldrDateTimeTextProvider */ "./src/format/cldr/CldrDateTimeTextProvider.js");
|
|
4342
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4343
|
-
|
|
4344
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4345
|
-
|
|
4346
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4347
|
-
|
|
4348
4342
|
/*
|
|
4349
4343
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
4350
4344
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -4352,64 +4346,61 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
4352
4346
|
|
|
4353
4347
|
|
|
4354
4348
|
var Locale = function () {
|
|
4355
|
-
function
|
|
4356
|
-
|
|
4357
|
-
|
|
4349
|
+
Locale.getAvailableLocales = function getAvailableLocales() {
|
|
4350
|
+
return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
|
|
4351
|
+
};
|
|
4358
4352
|
|
|
4359
|
-
|
|
4353
|
+
function Locale(language, country, localeString) {
|
|
4354
|
+
if (country === void 0) {
|
|
4355
|
+
country = '';
|
|
4356
|
+
}
|
|
4357
|
+
|
|
4358
|
+
if (localeString === void 0) {
|
|
4359
|
+
localeString = '';
|
|
4360
|
+
}
|
|
4360
4361
|
|
|
4361
4362
|
this._language = language;
|
|
4362
4363
|
this._country = country;
|
|
4363
4364
|
this._localeString = localeString;
|
|
4364
4365
|
}
|
|
4365
4366
|
|
|
4366
|
-
|
|
4367
|
-
key: "language",
|
|
4368
|
-
value: function language() {
|
|
4369
|
-
return this._language;
|
|
4370
|
-
}
|
|
4371
|
-
}, {
|
|
4372
|
-
key: "country",
|
|
4373
|
-
value: function country() {
|
|
4374
|
-
return this._country;
|
|
4375
|
-
}
|
|
4376
|
-
}, {
|
|
4377
|
-
key: "localeString",
|
|
4378
|
-
value: function localeString() {
|
|
4379
|
-
if (this._localeString.length > 0) {
|
|
4380
|
-
return this._localeString;
|
|
4381
|
-
}
|
|
4367
|
+
var _proto = Locale.prototype;
|
|
4382
4368
|
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4369
|
+
_proto.language = function language() {
|
|
4370
|
+
return this._language;
|
|
4371
|
+
};
|
|
4372
|
+
|
|
4373
|
+
_proto.country = function country() {
|
|
4374
|
+
return this._country;
|
|
4375
|
+
};
|
|
4376
|
+
|
|
4377
|
+
_proto.localeString = function localeString() {
|
|
4378
|
+
if (this._localeString.length > 0) {
|
|
4379
|
+
return this._localeString;
|
|
4388
4380
|
}
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4381
|
+
|
|
4382
|
+
if (this._country.length > 0) {
|
|
4383
|
+
return this._language + "-" + this._country;
|
|
4384
|
+
} else {
|
|
4385
|
+
return this._language;
|
|
4393
4386
|
}
|
|
4394
|
-
}
|
|
4395
|
-
key: "equals",
|
|
4396
|
-
value: function equals(other) {
|
|
4397
|
-
if (!other) {
|
|
4398
|
-
return false;
|
|
4399
|
-
}
|
|
4387
|
+
};
|
|
4400
4388
|
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4389
|
+
_proto.toString = function toString() {
|
|
4390
|
+
return "Locale[" + this.localeString() + "]";
|
|
4391
|
+
};
|
|
4404
4392
|
|
|
4405
|
-
|
|
4393
|
+
_proto.equals = function equals(other) {
|
|
4394
|
+
if (!other) {
|
|
4395
|
+
return false;
|
|
4406
4396
|
}
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
|
|
4397
|
+
|
|
4398
|
+
if (!(other instanceof Locale)) {
|
|
4399
|
+
return false;
|
|
4411
4400
|
}
|
|
4412
|
-
|
|
4401
|
+
|
|
4402
|
+
return this.localeString() === other.localeString();
|
|
4403
|
+
};
|
|
4413
4404
|
|
|
4414
4405
|
return Locale;
|
|
4415
4406
|
}();
|
|
@@ -4427,6 +4418,14 @@ function _init() {
|
|
|
4427
4418
|
Locale.KOREAN = new Locale('ko');
|
|
4428
4419
|
Locale.JAPANESE = new Locale('ja', 'JP');
|
|
4429
4420
|
Locale.JAPAN = new Locale('ja', 'JP', 'ja');
|
|
4421
|
+
Locale.ITALIAN = new Locale('it');
|
|
4422
|
+
Locale.ITALY = new Locale('it', 'IT', 'it');
|
|
4423
|
+
Locale.CHINESE = new Locale('zh');
|
|
4424
|
+
Locale.ROMANIAN = new Locale('ro');
|
|
4425
|
+
Locale.SWEDISH = new Locale('sv');
|
|
4426
|
+
Locale.SWEDEN = new Locale('sv', 'SE', 'sv');
|
|
4427
|
+
Locale.HINDI = new Locale('hi');
|
|
4428
|
+
Locale.RUSSIAN = new Locale('ru');
|
|
4430
4429
|
}
|
|
4431
4430
|
|
|
4432
4431
|
/***/ }),
|
|
@@ -4482,28 +4481,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4482
4481
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
4483
4482
|
/* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locale */ "./src/Locale.js");
|
|
4484
4483
|
/* harmony import */ var _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cldr/CldrDateTimeFormatterBuilder */ "./src/format/cldr/CldrDateTimeFormatterBuilder.js");
|
|
4485
|
-
function
|
|
4486
|
-
|
|
4487
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4488
|
-
|
|
4489
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4490
|
-
|
|
4491
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4492
|
-
|
|
4493
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4484
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
4494
4485
|
|
|
4495
4486
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
4496
4487
|
|
|
4497
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4498
|
-
|
|
4499
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
4500
|
-
|
|
4501
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4502
|
-
|
|
4503
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4504
|
-
|
|
4505
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4506
|
-
|
|
4507
4488
|
/*
|
|
4508
4489
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
4509
4490
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -4514,28 +4495,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
4514
4495
|
var requireNonNull = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].assert.requireNonNull;
|
|
4515
4496
|
|
|
4516
4497
|
var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
var _super = _createSuper(LocaleDateTimeFormatter);
|
|
4498
|
+
_inheritsLoose(LocaleDateTimeFormatter, _DateTimeFormatter);
|
|
4520
4499
|
|
|
4521
4500
|
function LocaleDateTimeFormatter() {
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
return _super.apply(this, arguments);
|
|
4501
|
+
return _DateTimeFormatter.apply(this, arguments) || this;
|
|
4525
4502
|
}
|
|
4526
4503
|
|
|
4527
|
-
|
|
4528
|
-
key: "withLocale",
|
|
4529
|
-
value: function withLocale(locale) {
|
|
4530
|
-
requireNonNull(locale, 'locale');
|
|
4504
|
+
var _proto = LocaleDateTimeFormatter.prototype;
|
|
4531
4505
|
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
}
|
|
4506
|
+
_proto.withLocale = function withLocale(locale) {
|
|
4507
|
+
requireNonNull(locale, 'locale');
|
|
4535
4508
|
|
|
4536
|
-
|
|
4509
|
+
if (locale.equals(this._locale)) {
|
|
4510
|
+
return this;
|
|
4537
4511
|
}
|
|
4538
|
-
|
|
4512
|
+
|
|
4513
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
|
|
4514
|
+
};
|
|
4539
4515
|
|
|
4540
4516
|
return LocaleDateTimeFormatter;
|
|
4541
4517
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"]);
|
|
@@ -4581,12 +4557,6 @@ function _init() {
|
|
|
4581
4557
|
__webpack_require__.r(__webpack_exports__);
|
|
4582
4558
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEntry", function() { return createEntry; });
|
|
4583
4559
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleStore", function() { return LocaleStore; });
|
|
4584
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4585
|
-
|
|
4586
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4587
|
-
|
|
4588
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4589
|
-
|
|
4590
4560
|
/*
|
|
4591
4561
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
4592
4562
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -4596,7 +4566,7 @@ var createEntry = function createEntry(text, field) {
|
|
|
4596
4566
|
key: text,
|
|
4597
4567
|
value: field,
|
|
4598
4568
|
toString: function toString() {
|
|
4599
|
-
return
|
|
4569
|
+
return text + "->" + field;
|
|
4600
4570
|
}
|
|
4601
4571
|
};
|
|
4602
4572
|
};
|
|
@@ -4607,8 +4577,6 @@ var _comparator = function _comparator(obj1, obj2) {
|
|
|
4607
4577
|
|
|
4608
4578
|
var LocaleStore = function () {
|
|
4609
4579
|
function LocaleStore(valueTextMap) {
|
|
4610
|
-
_classCallCheck(this, LocaleStore);
|
|
4611
|
-
|
|
4612
4580
|
this._valueTextMap = valueTextMap;
|
|
4613
4581
|
var map = {};
|
|
4614
4582
|
var allList = [];
|
|
@@ -4632,19 +4600,17 @@ var LocaleStore = function () {
|
|
|
4632
4600
|
this._parsable = map;
|
|
4633
4601
|
}
|
|
4634
4602
|
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
}
|
|
4647
|
-
}]);
|
|
4603
|
+
var _proto = LocaleStore.prototype;
|
|
4604
|
+
|
|
4605
|
+
_proto.getText = function getText(value, style) {
|
|
4606
|
+
var map = this._valueTextMap[style];
|
|
4607
|
+
return map != null ? map[value] : null;
|
|
4608
|
+
};
|
|
4609
|
+
|
|
4610
|
+
_proto.getTextIterator = function getTextIterator(style) {
|
|
4611
|
+
var list = this._parsable[style];
|
|
4612
|
+
return list != null ? list[Symbol.iterator]() : null;
|
|
4613
|
+
};
|
|
4648
4614
|
|
|
4649
4615
|
return LocaleStore;
|
|
4650
4616
|
}();
|
|
@@ -4727,28 +4693,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4727
4693
|
/* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
|
|
4728
4694
|
/* harmony import */ var _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser/LocalizedOffsetPrinterParser */ "./src/format/parser/LocalizedOffsetPrinterParser.js");
|
|
4729
4695
|
/* harmony import */ var _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../parser/WeekFieldsPrinterParser */ "./src/format/parser/WeekFieldsPrinterParser.js");
|
|
4730
|
-
function
|
|
4731
|
-
|
|
4732
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4733
|
-
|
|
4734
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4735
|
-
|
|
4736
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4737
|
-
|
|
4738
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4696
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
4739
4697
|
|
|
4740
4698
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
4741
4699
|
|
|
4742
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4743
|
-
|
|
4744
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
4745
|
-
|
|
4746
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4747
|
-
|
|
4748
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4749
|
-
|
|
4750
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4751
|
-
|
|
4752
4700
|
/**
|
|
4753
4701
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
4754
4702
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -4766,98 +4714,87 @@ var _jodaInternal$assert = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].asser
|
|
|
4766
4714
|
requireInstance = _jodaInternal$assert.requireInstance;
|
|
4767
4715
|
|
|
4768
4716
|
var CldrDateTimeFormatterBuilder = function (_DateTimeFormatterBui) {
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
var _super = _createSuper(CldrDateTimeFormatterBuilder);
|
|
4717
|
+
_inheritsLoose(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
|
|
4772
4718
|
|
|
4773
4719
|
function CldrDateTimeFormatterBuilder() {
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
return _super.apply(this, arguments);
|
|
4720
|
+
return _DateTimeFormatterBui.apply(this, arguments) || this;
|
|
4777
4721
|
}
|
|
4778
4722
|
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
}
|
|
4789
|
-
}
|
|
4790
|
-
}, {
|
|
4791
|
-
key: "appendTextField",
|
|
4792
|
-
value: function appendTextField(field) {
|
|
4793
|
-
return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
|
|
4723
|
+
var _proto = CldrDateTimeFormatterBuilder.prototype;
|
|
4724
|
+
|
|
4725
|
+
_proto.appendText = function appendText(field, styleOrMap) {
|
|
4726
|
+
if (styleOrMap === undefined) {
|
|
4727
|
+
return this.appendTextField(field);
|
|
4728
|
+
} else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
|
|
4729
|
+
return this.appendTextFieldStyle(field, styleOrMap);
|
|
4730
|
+
} else {
|
|
4731
|
+
return this.appendTextFieldMap(field, styleOrMap);
|
|
4794
4732
|
}
|
|
4795
|
-
}
|
|
4796
|
-
key: "appendTextFieldStyle",
|
|
4797
|
-
value: function appendTextFieldStyle(field, textStyle) {
|
|
4798
|
-
requireNonNull(field, 'field');
|
|
4799
|
-
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
|
|
4800
|
-
requireNonNull(textStyle, 'textStyle');
|
|
4801
|
-
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
4733
|
+
};
|
|
4802
4734
|
|
|
4803
|
-
|
|
4735
|
+
_proto.appendTextField = function appendTextField(field) {
|
|
4736
|
+
return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
|
|
4737
|
+
};
|
|
4804
4738
|
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
requireNonNull(field, 'field');
|
|
4811
|
-
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
|
|
4812
|
-
requireNonNull(textLookup, 'textLookup');
|
|
4813
|
-
var copy = Object.assign({}, textLookup);
|
|
4814
|
-
var map = {};
|
|
4815
|
-
map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
|
|
4816
|
-
var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
|
|
4817
|
-
var provider = {
|
|
4818
|
-
getText: function getText(field, value, style) {
|
|
4819
|
-
return store.getText(value, style);
|
|
4820
|
-
},
|
|
4821
|
-
getTextIterator: function getTextIterator(field, style) {
|
|
4822
|
-
return store.getTextIterator(style);
|
|
4823
|
-
}
|
|
4824
|
-
};
|
|
4739
|
+
_proto.appendTextFieldStyle = function appendTextFieldStyle(field, textStyle) {
|
|
4740
|
+
requireNonNull(field, 'field');
|
|
4741
|
+
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
|
|
4742
|
+
requireNonNull(textStyle, 'textStyle');
|
|
4743
|
+
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
4825
4744
|
|
|
4826
|
-
|
|
4745
|
+
this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
|
|
4827
4746
|
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4747
|
+
return this;
|
|
4748
|
+
};
|
|
4749
|
+
|
|
4750
|
+
_proto.appendTextFieldMap = function appendTextFieldMap(field, textLookup) {
|
|
4751
|
+
requireNonNull(field, 'field');
|
|
4752
|
+
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
|
|
4753
|
+
requireNonNull(textLookup, 'textLookup');
|
|
4754
|
+
var copy = Object.assign({}, textLookup);
|
|
4755
|
+
var map = {};
|
|
4756
|
+
map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
|
|
4757
|
+
var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
|
|
4758
|
+
var provider = {
|
|
4759
|
+
getText: function getText(field, value, style) {
|
|
4760
|
+
return store.getText(value, style);
|
|
4761
|
+
},
|
|
4762
|
+
getTextIterator: function getTextIterator(field, style) {
|
|
4763
|
+
return store.getTextIterator(style);
|
|
4764
|
+
}
|
|
4765
|
+
};
|
|
4835
4766
|
|
|
4836
|
-
|
|
4767
|
+
this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
|
|
4837
4768
|
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
}, {
|
|
4841
|
-
key: "appendZoneText",
|
|
4842
|
-
value: function appendZoneText(textStyle) {
|
|
4843
|
-
this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
|
|
4769
|
+
return this;
|
|
4770
|
+
};
|
|
4844
4771
|
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
key: "appendLocalizedOffset",
|
|
4849
|
-
value: function appendLocalizedOffset(textStyle) {
|
|
4850
|
-
requireNonNull(textStyle, 'textStyle');
|
|
4772
|
+
_proto.appendWeekField = function appendWeekField(field, count) {
|
|
4773
|
+
requireNonNull(field, 'field');
|
|
4774
|
+
requireNonNull(count, 'count');
|
|
4851
4775
|
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4776
|
+
this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
|
|
4777
|
+
|
|
4778
|
+
return this;
|
|
4779
|
+
};
|
|
4855
4780
|
|
|
4856
|
-
|
|
4781
|
+
_proto.appendZoneText = function appendZoneText(textStyle) {
|
|
4782
|
+
this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
|
|
4857
4783
|
|
|
4858
|
-
|
|
4784
|
+
return this;
|
|
4785
|
+
};
|
|
4786
|
+
|
|
4787
|
+
_proto.appendLocalizedOffset = function appendLocalizedOffset(textStyle) {
|
|
4788
|
+
requireNonNull(textStyle, 'textStyle');
|
|
4789
|
+
|
|
4790
|
+
if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
|
|
4791
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
|
|
4859
4792
|
}
|
|
4860
|
-
|
|
4793
|
+
|
|
4794
|
+
this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
|
|
4795
|
+
|
|
4796
|
+
return this;
|
|
4797
|
+
};
|
|
4861
4798
|
|
|
4862
4799
|
return CldrDateTimeFormatterBuilder;
|
|
4863
4800
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"]);
|
|
@@ -4882,12 +4819,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4882
4819
|
/* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
|
|
4883
4820
|
/* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
|
|
4884
4821
|
/* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
|
|
4885
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4886
|
-
|
|
4887
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4888
|
-
|
|
4889
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4890
|
-
|
|
4891
4822
|
/*
|
|
4892
4823
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
4893
4824
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -4899,218 +4830,210 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
4899
4830
|
|
|
4900
4831
|
var CldrDateTimeTextProvider = function () {
|
|
4901
4832
|
function CldrDateTimeTextProvider() {
|
|
4902
|
-
_classCallCheck(this, CldrDateTimeTextProvider);
|
|
4903
|
-
|
|
4904
4833
|
this._cache = {};
|
|
4905
4834
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])('supplemental/likelySubtags.json');
|
|
4906
4835
|
}
|
|
4907
4836
|
|
|
4908
|
-
|
|
4909
|
-
key: "getAvailableLocales",
|
|
4910
|
-
value: function getAvailableLocales() {
|
|
4911
|
-
if (true) {
|
|
4912
|
-
return ["en.*"];
|
|
4913
|
-
}
|
|
4837
|
+
var _proto = CldrDateTimeTextProvider.prototype;
|
|
4914
4838
|
|
|
4915
|
-
|
|
4839
|
+
_proto.getAvailableLocales = function getAvailableLocales() {
|
|
4840
|
+
if (true) {
|
|
4841
|
+
return ["en.*"];
|
|
4916
4842
|
}
|
|
4917
|
-
}, {
|
|
4918
|
-
key: "getText",
|
|
4919
|
-
value: function getText(field, value, style, locale) {
|
|
4920
|
-
var store = this._findStore(field, locale);
|
|
4921
4843
|
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
}
|
|
4844
|
+
return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
|
|
4845
|
+
};
|
|
4925
4846
|
|
|
4926
|
-
|
|
4847
|
+
_proto.getText = function getText(field, value, style, locale) {
|
|
4848
|
+
var store = this._findStore(field, locale);
|
|
4849
|
+
|
|
4850
|
+
if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
|
|
4851
|
+
return store.getText(value, style);
|
|
4927
4852
|
}
|
|
4928
|
-
}, {
|
|
4929
|
-
key: "getTextIterator",
|
|
4930
|
-
value: function getTextIterator(field, style, locale) {
|
|
4931
|
-
var store = this._findStore(field, locale);
|
|
4932
4853
|
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
}
|
|
4854
|
+
return null;
|
|
4855
|
+
};
|
|
4936
4856
|
|
|
4937
|
-
|
|
4857
|
+
_proto.getTextIterator = function getTextIterator(field, style, locale) {
|
|
4858
|
+
var store = this._findStore(field, locale);
|
|
4859
|
+
|
|
4860
|
+
if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
|
|
4861
|
+
return store.getTextIterator(style);
|
|
4938
4862
|
}
|
|
4939
|
-
}, {
|
|
4940
|
-
key: "_findStore",
|
|
4941
|
-
value: function _findStore(field, locale) {
|
|
4942
|
-
var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
|
|
4943
|
-
var store = this._cache[key];
|
|
4944
|
-
|
|
4945
|
-
if (store === undefined) {
|
|
4946
|
-
store = this._createStore(field, locale);
|
|
4947
|
-
this._cache[key] = store;
|
|
4948
|
-
}
|
|
4949
4863
|
|
|
4950
|
-
|
|
4864
|
+
return null;
|
|
4865
|
+
};
|
|
4866
|
+
|
|
4867
|
+
_proto._findStore = function _findStore(field, locale) {
|
|
4868
|
+
var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
|
|
4869
|
+
var store = this._cache[key];
|
|
4870
|
+
|
|
4871
|
+
if (store === undefined) {
|
|
4872
|
+
store = this._createStore(field, locale);
|
|
4873
|
+
this._cache[key] = store;
|
|
4951
4874
|
}
|
|
4952
|
-
}, {
|
|
4953
|
-
key: "_createStore",
|
|
4954
|
-
value: function _createStore(field, locale) {
|
|
4955
|
-
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/".concat(locale.localeString(), "/ca-gregorian.json"));
|
|
4956
|
-
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
|
|
4957
|
-
|
|
4958
|
-
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
|
|
4959
|
-
var monthsData = cldr.main('dates/calendars/gregorian/months/format');
|
|
4960
|
-
var styleMap = {};
|
|
4961
|
-
var data = {};
|
|
4962
|
-
data[1] = monthsData.wide[1];
|
|
4963
|
-
data[2] = monthsData.wide[2];
|
|
4964
|
-
data[3] = monthsData.wide[3];
|
|
4965
|
-
data[4] = monthsData.wide[4];
|
|
4966
|
-
data[5] = monthsData.wide[5];
|
|
4967
|
-
data[6] = monthsData.wide[6];
|
|
4968
|
-
data[7] = monthsData.wide[7];
|
|
4969
|
-
data[8] = monthsData.wide[8];
|
|
4970
|
-
data[9] = monthsData.wide[9];
|
|
4971
|
-
data[10] = monthsData.wide[10];
|
|
4972
|
-
data[11] = monthsData.wide[11];
|
|
4973
|
-
data[12] = monthsData.wide[12];
|
|
4974
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
|
|
4975
|
-
data = {};
|
|
4976
|
-
data[1] = monthsData.narrow[1];
|
|
4977
|
-
data[2] = monthsData.narrow[2];
|
|
4978
|
-
data[3] = monthsData.narrow[3];
|
|
4979
|
-
data[4] = monthsData.narrow[4];
|
|
4980
|
-
data[5] = monthsData.narrow[5];
|
|
4981
|
-
data[6] = monthsData.narrow[6];
|
|
4982
|
-
data[7] = monthsData.narrow[7];
|
|
4983
|
-
data[8] = monthsData.narrow[8];
|
|
4984
|
-
data[9] = monthsData.narrow[9];
|
|
4985
|
-
data[10] = monthsData.narrow[10];
|
|
4986
|
-
data[11] = monthsData.narrow[11];
|
|
4987
|
-
data[12] = monthsData.narrow[12];
|
|
4988
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
|
|
4989
|
-
data = {};
|
|
4990
|
-
data[1] = monthsData.abbreviated[1];
|
|
4991
|
-
data[2] = monthsData.abbreviated[2];
|
|
4992
|
-
data[3] = monthsData.abbreviated[3];
|
|
4993
|
-
data[4] = monthsData.abbreviated[4];
|
|
4994
|
-
data[5] = monthsData.abbreviated[5];
|
|
4995
|
-
data[6] = monthsData.abbreviated[6];
|
|
4996
|
-
data[7] = monthsData.abbreviated[7];
|
|
4997
|
-
data[8] = monthsData.abbreviated[8];
|
|
4998
|
-
data[9] = monthsData.abbreviated[9];
|
|
4999
|
-
data[10] = monthsData.abbreviated[10];
|
|
5000
|
-
data[11] = monthsData.abbreviated[11];
|
|
5001
|
-
data[12] = monthsData.abbreviated[12];
|
|
5002
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
|
|
5003
|
-
return this._createLocaleStore(styleMap);
|
|
5004
|
-
}
|
|
5005
4875
|
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
var _styleMap = {};
|
|
5009
|
-
var _data = {};
|
|
5010
|
-
_data[1] = daysData.wide.mon;
|
|
5011
|
-
_data[2] = daysData.wide.tue;
|
|
5012
|
-
_data[3] = daysData.wide.wed;
|
|
5013
|
-
_data[4] = daysData.wide.thu;
|
|
5014
|
-
_data[5] = daysData.wide.fri;
|
|
5015
|
-
_data[6] = daysData.wide.sat;
|
|
5016
|
-
_data[7] = daysData.wide.sun;
|
|
5017
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
|
|
5018
|
-
_data = {};
|
|
5019
|
-
_data[1] = daysData.narrow.mon;
|
|
5020
|
-
_data[2] = daysData.narrow.tue;
|
|
5021
|
-
_data[3] = daysData.narrow.wed;
|
|
5022
|
-
_data[4] = daysData.narrow.thu;
|
|
5023
|
-
_data[5] = daysData.narrow.fri;
|
|
5024
|
-
_data[6] = daysData.narrow.sat;
|
|
5025
|
-
_data[7] = daysData.narrow.sun;
|
|
5026
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
|
|
5027
|
-
_data = {};
|
|
5028
|
-
_data[1] = daysData.abbreviated.mon;
|
|
5029
|
-
_data[2] = daysData.abbreviated.tue;
|
|
5030
|
-
_data[3] = daysData.abbreviated.wed;
|
|
5031
|
-
_data[4] = daysData.abbreviated.thu;
|
|
5032
|
-
_data[5] = daysData.abbreviated.fri;
|
|
5033
|
-
_data[6] = daysData.abbreviated.sat;
|
|
5034
|
-
_data[7] = daysData.abbreviated.sun;
|
|
5035
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
|
|
5036
|
-
return this._createLocaleStore(_styleMap);
|
|
5037
|
-
}
|
|
4876
|
+
return store;
|
|
4877
|
+
};
|
|
5038
4878
|
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
4879
|
+
_proto._createStore = function _createStore(field, locale) {
|
|
4880
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/" + locale.localeString() + "/ca-gregorian.json");
|
|
4881
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
|
|
4882
|
+
|
|
4883
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
|
|
4884
|
+
var monthsData = cldr.main('dates/calendars/gregorian/months/format');
|
|
4885
|
+
var styleMap = {};
|
|
4886
|
+
var data = {};
|
|
4887
|
+
data[1] = monthsData.wide[1];
|
|
4888
|
+
data[2] = monthsData.wide[2];
|
|
4889
|
+
data[3] = monthsData.wide[3];
|
|
4890
|
+
data[4] = monthsData.wide[4];
|
|
4891
|
+
data[5] = monthsData.wide[5];
|
|
4892
|
+
data[6] = monthsData.wide[6];
|
|
4893
|
+
data[7] = monthsData.wide[7];
|
|
4894
|
+
data[8] = monthsData.wide[8];
|
|
4895
|
+
data[9] = monthsData.wide[9];
|
|
4896
|
+
data[10] = monthsData.wide[10];
|
|
4897
|
+
data[11] = monthsData.wide[11];
|
|
4898
|
+
data[12] = monthsData.wide[12];
|
|
4899
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
|
|
4900
|
+
data = {};
|
|
4901
|
+
data[1] = monthsData.narrow[1];
|
|
4902
|
+
data[2] = monthsData.narrow[2];
|
|
4903
|
+
data[3] = monthsData.narrow[3];
|
|
4904
|
+
data[4] = monthsData.narrow[4];
|
|
4905
|
+
data[5] = monthsData.narrow[5];
|
|
4906
|
+
data[6] = monthsData.narrow[6];
|
|
4907
|
+
data[7] = monthsData.narrow[7];
|
|
4908
|
+
data[8] = monthsData.narrow[8];
|
|
4909
|
+
data[9] = monthsData.narrow[9];
|
|
4910
|
+
data[10] = monthsData.narrow[10];
|
|
4911
|
+
data[11] = monthsData.narrow[11];
|
|
4912
|
+
data[12] = monthsData.narrow[12];
|
|
4913
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
|
|
4914
|
+
data = {};
|
|
4915
|
+
data[1] = monthsData.abbreviated[1];
|
|
4916
|
+
data[2] = monthsData.abbreviated[2];
|
|
4917
|
+
data[3] = monthsData.abbreviated[3];
|
|
4918
|
+
data[4] = monthsData.abbreviated[4];
|
|
4919
|
+
data[5] = monthsData.abbreviated[5];
|
|
4920
|
+
data[6] = monthsData.abbreviated[6];
|
|
4921
|
+
data[7] = monthsData.abbreviated[7];
|
|
4922
|
+
data[8] = monthsData.abbreviated[8];
|
|
4923
|
+
data[9] = monthsData.abbreviated[9];
|
|
4924
|
+
data[10] = monthsData.abbreviated[10];
|
|
4925
|
+
data[11] = monthsData.abbreviated[11];
|
|
4926
|
+
data[12] = monthsData.abbreviated[12];
|
|
4927
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
|
|
4928
|
+
return this._createLocaleStore(styleMap);
|
|
4929
|
+
}
|
|
5056
4930
|
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
4931
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
|
|
4932
|
+
var daysData = cldr.main('dates/calendars/gregorian/days/format');
|
|
4933
|
+
var _styleMap = {};
|
|
4934
|
+
var _data = {};
|
|
4935
|
+
_data[1] = daysData.wide.mon;
|
|
4936
|
+
_data[2] = daysData.wide.tue;
|
|
4937
|
+
_data[3] = daysData.wide.wed;
|
|
4938
|
+
_data[4] = daysData.wide.thu;
|
|
4939
|
+
_data[5] = daysData.wide.fri;
|
|
4940
|
+
_data[6] = daysData.wide.sat;
|
|
4941
|
+
_data[7] = daysData.wide.sun;
|
|
4942
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
|
|
4943
|
+
_data = {};
|
|
4944
|
+
_data[1] = daysData.narrow.mon;
|
|
4945
|
+
_data[2] = daysData.narrow.tue;
|
|
4946
|
+
_data[3] = daysData.narrow.wed;
|
|
4947
|
+
_data[4] = daysData.narrow.thu;
|
|
4948
|
+
_data[5] = daysData.narrow.fri;
|
|
4949
|
+
_data[6] = daysData.narrow.sat;
|
|
4950
|
+
_data[7] = daysData.narrow.sun;
|
|
4951
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
|
|
4952
|
+
_data = {};
|
|
4953
|
+
_data[1] = daysData.abbreviated.mon;
|
|
4954
|
+
_data[2] = daysData.abbreviated.tue;
|
|
4955
|
+
_data[3] = daysData.abbreviated.wed;
|
|
4956
|
+
_data[4] = daysData.abbreviated.thu;
|
|
4957
|
+
_data[5] = daysData.abbreviated.fri;
|
|
4958
|
+
_data[6] = daysData.abbreviated.sat;
|
|
4959
|
+
_data[7] = daysData.abbreviated.sun;
|
|
4960
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
|
|
4961
|
+
return this._createLocaleStore(_styleMap);
|
|
4962
|
+
}
|
|
5074
4963
|
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
_data4[2] = quartersData.abbreviated['2'];
|
|
5093
|
-
_data4[3] = quartersData.abbreviated['3'];
|
|
5094
|
-
_data4[4] = quartersData.abbreviated['4'];
|
|
5095
|
-
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
|
|
5096
|
-
return this._createLocaleStore(_styleMap4);
|
|
5097
|
-
}
|
|
4964
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
|
|
4965
|
+
var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
|
|
4966
|
+
var _styleMap2 = {};
|
|
4967
|
+
var _data2 = {};
|
|
4968
|
+
_data2[0] = dayPeriodsData.wide.am;
|
|
4969
|
+
_data2[1] = dayPeriodsData.wide.pm;
|
|
4970
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
|
|
4971
|
+
_data2 = {};
|
|
4972
|
+
_data2[0] = dayPeriodsData.narrow.am;
|
|
4973
|
+
_data2[1] = dayPeriodsData.narrow.pm;
|
|
4974
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
|
|
4975
|
+
_data2 = {};
|
|
4976
|
+
_data2[0] = dayPeriodsData.abbreviated.am;
|
|
4977
|
+
_data2[1] = dayPeriodsData.abbreviated.pm;
|
|
4978
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
|
|
4979
|
+
return this._createLocaleStore(_styleMap2);
|
|
4980
|
+
}
|
|
5098
4981
|
|
|
5099
|
-
|
|
4982
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
|
|
4983
|
+
var erasData = cldr.main('dates/calendars/gregorian/eras');
|
|
4984
|
+
var _styleMap3 = {};
|
|
4985
|
+
var _data3 = {};
|
|
4986
|
+
_data3[0] = erasData.eraNames['0'];
|
|
4987
|
+
_data3[1] = erasData.eraNames['1'];
|
|
4988
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
|
|
4989
|
+
_data3 = {};
|
|
4990
|
+
_data3[0] = erasData.eraNarrow['0'];
|
|
4991
|
+
_data3[1] = erasData.eraNarrow['1'];
|
|
4992
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
|
|
4993
|
+
_data3 = {};
|
|
4994
|
+
_data3[0] = erasData.eraAbbr['0'];
|
|
4995
|
+
_data3[1] = erasData.eraAbbr['1'];
|
|
4996
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
|
|
4997
|
+
return this._createLocaleStore(_styleMap3);
|
|
5100
4998
|
}
|
|
5101
|
-
}, {
|
|
5102
|
-
key: "_createLocaleStore",
|
|
5103
|
-
value: function _createLocaleStore(valueTextMap) {
|
|
5104
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
|
|
5105
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
|
|
5106
|
-
|
|
5107
|
-
if (Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW) > -1 && Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE) === -1) {
|
|
5108
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
|
|
5109
|
-
}
|
|
5110
4999
|
|
|
5111
|
-
|
|
5000
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
|
|
5001
|
+
var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
|
|
5002
|
+
var _styleMap4 = {};
|
|
5003
|
+
var _data4 = {};
|
|
5004
|
+
_data4[1] = quartersData.wide['1'];
|
|
5005
|
+
_data4[2] = quartersData.wide['2'];
|
|
5006
|
+
_data4[3] = quartersData.wide['3'];
|
|
5007
|
+
_data4[4] = quartersData.wide['4'];
|
|
5008
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
|
|
5009
|
+
_data4 = {};
|
|
5010
|
+
_data4[1] = quartersData.narrow['1'];
|
|
5011
|
+
_data4[2] = quartersData.narrow['2'];
|
|
5012
|
+
_data4[3] = quartersData.narrow['3'];
|
|
5013
|
+
_data4[4] = quartersData.narrow['4'];
|
|
5014
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
|
|
5015
|
+
_data4 = {};
|
|
5016
|
+
_data4[1] = quartersData.abbreviated['1'];
|
|
5017
|
+
_data4[2] = quartersData.abbreviated['2'];
|
|
5018
|
+
_data4[3] = quartersData.abbreviated['3'];
|
|
5019
|
+
_data4[4] = quartersData.abbreviated['4'];
|
|
5020
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
|
|
5021
|
+
return this._createLocaleStore(_styleMap4);
|
|
5022
|
+
}
|
|
5023
|
+
|
|
5024
|
+
return null;
|
|
5025
|
+
};
|
|
5026
|
+
|
|
5027
|
+
_proto._createLocaleStore = function _createLocaleStore(valueTextMap) {
|
|
5028
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
|
|
5029
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
|
|
5030
|
+
|
|
5031
|
+
if (Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW) > -1 && Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE) === -1) {
|
|
5032
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
|
|
5112
5033
|
}
|
|
5113
|
-
|
|
5034
|
+
|
|
5035
|
+
return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
|
|
5036
|
+
};
|
|
5114
5037
|
|
|
5115
5038
|
return CldrDateTimeTextProvider;
|
|
5116
5039
|
}();
|
|
@@ -5132,18 +5055,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5132
5055
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
5133
5056
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
5134
5057
|
/* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
|
|
5135
|
-
function
|
|
5058
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5136
5059
|
|
|
5137
5060
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5138
5061
|
|
|
5139
5062
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
5140
5063
|
|
|
5141
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5142
|
-
|
|
5143
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5144
|
-
|
|
5145
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5146
|
-
|
|
5147
5064
|
/*
|
|
5148
5065
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
5149
5066
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -5168,8 +5085,6 @@ var resolveZoneIdTextCache = {};
|
|
|
5168
5085
|
|
|
5169
5086
|
var CldrZoneTextPrinterParser = function () {
|
|
5170
5087
|
function CldrZoneTextPrinterParser(textStyle) {
|
|
5171
|
-
_classCallCheck(this, CldrZoneTextPrinterParser);
|
|
5172
|
-
|
|
5173
5088
|
requireNonNull(textStyle, 'textStyle');
|
|
5174
5089
|
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
5175
5090
|
this._textStyle = textStyle;
|
|
@@ -5178,202 +5093,178 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
5178
5093
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/metaZones.json');
|
|
5179
5094
|
}
|
|
5180
5095
|
|
|
5181
|
-
|
|
5182
|
-
key: "_cachedResolveZoneIdText",
|
|
5183
|
-
value: function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
|
|
5184
|
-
if (resolveZoneIdTextCache[cldr.locale] == null) {
|
|
5185
|
-
resolveZoneIdTextCache[cldr.locale] = {};
|
|
5186
|
-
}
|
|
5096
|
+
var _proto = CldrZoneTextPrinterParser.prototype;
|
|
5187
5097
|
|
|
5188
|
-
|
|
5098
|
+
_proto._cachedResolveZoneIdText = function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
|
|
5099
|
+
if (resolveZoneIdTextCache[cldr.locale] == null) {
|
|
5100
|
+
resolveZoneIdTextCache[cldr.locale] = {};
|
|
5101
|
+
}
|
|
5189
5102
|
|
|
5190
|
-
|
|
5191
|
-
zoneIdToStyle[zoneId] = {};
|
|
5192
|
-
}
|
|
5103
|
+
var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
|
|
5193
5104
|
|
|
5194
|
-
|
|
5105
|
+
if (zoneIdToStyle[zoneId] == null) {
|
|
5106
|
+
zoneIdToStyle[zoneId] = {};
|
|
5107
|
+
}
|
|
5195
5108
|
|
|
5196
|
-
|
|
5197
|
-
styleToType[style] = {};
|
|
5198
|
-
}
|
|
5109
|
+
var styleToType = zoneIdToStyle[zoneId];
|
|
5199
5110
|
|
|
5200
|
-
|
|
5111
|
+
if (styleToType[style] == null) {
|
|
5112
|
+
styleToType[style] = {};
|
|
5113
|
+
}
|
|
5201
5114
|
|
|
5202
|
-
|
|
5203
|
-
typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
|
|
5204
|
-
}
|
|
5115
|
+
var typeToResolvedZoneIdText = styleToType[style];
|
|
5205
5116
|
|
|
5206
|
-
|
|
5117
|
+
if (typeToResolvedZoneIdText[type] == null) {
|
|
5118
|
+
typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
|
|
5207
5119
|
}
|
|
5208
|
-
}, {
|
|
5209
|
-
key: "_resolveZoneIdText",
|
|
5210
|
-
value: function _resolveZoneIdText(cldr, zoneId, style, type) {
|
|
5211
|
-
var zoneData = cldr.main("dates/timeZoneNames/zone/".concat(zoneId, "/").concat(style, "/").concat(type));
|
|
5212
5120
|
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5121
|
+
return typeToResolvedZoneIdText[type];
|
|
5122
|
+
};
|
|
5123
|
+
|
|
5124
|
+
_proto._resolveZoneIdText = function _resolveZoneIdText(cldr, zoneId, style, type) {
|
|
5125
|
+
var zoneData = cldr.main("dates/timeZoneNames/zone/" + zoneId + "/" + style + "/" + type);
|
|
5126
|
+
|
|
5127
|
+
if (zoneData) {
|
|
5128
|
+
return zoneData;
|
|
5129
|
+
} else {
|
|
5130
|
+
var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/" + zoneId);
|
|
5131
|
+
|
|
5132
|
+
if (metazoneInfo) {
|
|
5133
|
+
var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
|
|
5134
|
+
var metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/" + type);
|
|
5217
5135
|
|
|
5218
|
-
if (
|
|
5219
|
-
|
|
5220
|
-
|
|
5136
|
+
if (metaZoneData) {
|
|
5137
|
+
return metaZoneData;
|
|
5138
|
+
} else {
|
|
5139
|
+
metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/generic");
|
|
5140
|
+
|
|
5141
|
+
if (!metaZoneData) {
|
|
5142
|
+
metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/standard");
|
|
5143
|
+
}
|
|
5221
5144
|
|
|
5222
5145
|
if (metaZoneData) {
|
|
5223
5146
|
return metaZoneData;
|
|
5224
5147
|
} else {
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
if (!metaZoneData) {
|
|
5228
|
-
metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/standard"));
|
|
5229
|
-
}
|
|
5148
|
+
var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
|
|
5149
|
+
var preferredZone = mapZones[metazone][cldr.attributes.territory];
|
|
5230
5150
|
|
|
5231
|
-
if (
|
|
5232
|
-
|
|
5151
|
+
if (preferredZone) {
|
|
5152
|
+
if (preferredZone !== zoneId) {
|
|
5153
|
+
return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
|
|
5154
|
+
}
|
|
5233
5155
|
} else {
|
|
5234
|
-
var
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
if (preferredZone !== zoneId) {
|
|
5239
|
-
return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
|
|
5240
|
-
}
|
|
5241
|
-
} else {
|
|
5242
|
-
var goldenZone = mapZones[metazone]['001'];
|
|
5243
|
-
|
|
5244
|
-
if (goldenZone !== zoneId) {
|
|
5245
|
-
return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
|
|
5246
|
-
}
|
|
5156
|
+
var goldenZone = mapZones[metazone]['001'];
|
|
5157
|
+
|
|
5158
|
+
if (goldenZone !== zoneId) {
|
|
5159
|
+
return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
|
|
5247
5160
|
}
|
|
5248
5161
|
}
|
|
5249
5162
|
}
|
|
5250
5163
|
}
|
|
5251
5164
|
}
|
|
5252
5165
|
}
|
|
5253
|
-
}
|
|
5254
|
-
key: "print",
|
|
5255
|
-
value: function print(context, buf) {
|
|
5256
|
-
var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
|
|
5257
|
-
|
|
5258
|
-
if (zone == null) {
|
|
5259
|
-
return false;
|
|
5260
|
-
}
|
|
5261
|
-
|
|
5262
|
-
if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
|
|
5263
|
-
buf.append(zone.id());
|
|
5264
|
-
return true;
|
|
5265
|
-
}
|
|
5266
|
-
|
|
5267
|
-
var daylight = false;
|
|
5268
|
-
var hasDaylightSupport = false;
|
|
5269
|
-
var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
|
|
5270
|
-
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
5271
|
-
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(context.locale().localeString(), "/timeZoneNames.json"));
|
|
5272
|
-
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
|
|
5166
|
+
};
|
|
5273
5167
|
|
|
5274
|
-
|
|
5168
|
+
_proto.print = function print(context, buf) {
|
|
5169
|
+
var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
|
|
5275
5170
|
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
buf.append(zone.id());
|
|
5280
|
-
}
|
|
5171
|
+
if (zone == null) {
|
|
5172
|
+
return false;
|
|
5173
|
+
}
|
|
5281
5174
|
|
|
5175
|
+
if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
|
|
5176
|
+
buf.append(zone.id());
|
|
5282
5177
|
return true;
|
|
5283
5178
|
}
|
|
5284
|
-
}, {
|
|
5285
|
-
key: "_resolveZoneIds",
|
|
5286
|
-
value: function _resolveZoneIds(localString) {
|
|
5287
|
-
if (this._zoneIdsLocales[localString] != null) {
|
|
5288
|
-
return this._zoneIdsLocales[localString];
|
|
5289
|
-
}
|
|
5290
5179
|
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5180
|
+
var daylight = false;
|
|
5181
|
+
var hasDaylightSupport = false;
|
|
5182
|
+
var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
|
|
5183
|
+
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
5184
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + context.locale().localeString() + "/timeZoneNames.json");
|
|
5185
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
|
|
5294
5186
|
|
|
5295
|
-
|
|
5296
|
-
_step;
|
|
5187
|
+
var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
|
|
5297
5188
|
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5189
|
+
if (text) {
|
|
5190
|
+
buf.append(text);
|
|
5191
|
+
} else {
|
|
5192
|
+
buf.append(zone.id());
|
|
5193
|
+
}
|
|
5303
5194
|
|
|
5304
|
-
|
|
5195
|
+
return true;
|
|
5196
|
+
};
|
|
5305
5197
|
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5198
|
+
_proto._resolveZoneIds = function _resolveZoneIds(localString) {
|
|
5199
|
+
if (this._zoneIdsLocales[localString] != null) {
|
|
5200
|
+
return this._zoneIdsLocales[localString];
|
|
5201
|
+
}
|
|
5309
5202
|
|
|
5310
|
-
|
|
5203
|
+
var ids = {};
|
|
5204
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + localString + "/timeZoneNames.json");
|
|
5205
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
|
|
5311
5206
|
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5207
|
+
for (var _iterator = _createForOfIteratorHelperLoose(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()), _step; !(_step = _iterator()).done;) {
|
|
5208
|
+
var id = _step.value;
|
|
5209
|
+
ids[id] = id;
|
|
5210
|
+
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
5315
5211
|
|
|
5316
|
-
|
|
5212
|
+
var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
|
|
5317
5213
|
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
}
|
|
5321
|
-
}
|
|
5322
|
-
} catch (err) {
|
|
5323
|
-
_iterator.e(err);
|
|
5324
|
-
} finally {
|
|
5325
|
-
_iterator.f();
|
|
5214
|
+
if (genericText) {
|
|
5215
|
+
ids[genericText] = id;
|
|
5326
5216
|
}
|
|
5327
5217
|
|
|
5328
|
-
var
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
};
|
|
5333
|
-
return this._zoneIdsLocales[localString];
|
|
5334
|
-
}
|
|
5335
|
-
}, {
|
|
5336
|
-
key: "parse",
|
|
5337
|
-
value: function parse(context, text, position) {
|
|
5338
|
-
for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
|
|
5339
|
-
var name = _arr[_i];
|
|
5340
|
-
|
|
5341
|
-
if (context.subSequenceEquals(text, position, name, 0, name.length)) {
|
|
5342
|
-
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
|
|
5343
|
-
return position + name.length;
|
|
5344
|
-
}
|
|
5218
|
+
var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
|
|
5219
|
+
|
|
5220
|
+
if (standardText) {
|
|
5221
|
+
ids[standardText] = id;
|
|
5345
5222
|
}
|
|
5346
5223
|
|
|
5347
|
-
var
|
|
5348
|
-
ids = _this$_resolveZoneIds.ids,
|
|
5349
|
-
sortedKeys = _this$_resolveZoneIds.sortedKeys;
|
|
5224
|
+
var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
|
|
5350
5225
|
|
|
5351
|
-
|
|
5352
|
-
|
|
5226
|
+
if (daylightText) {
|
|
5227
|
+
ids[daylightText] = id;
|
|
5228
|
+
}
|
|
5229
|
+
}
|
|
5353
5230
|
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5231
|
+
var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
|
|
5232
|
+
this._zoneIdsLocales[localString] = {
|
|
5233
|
+
ids: ids,
|
|
5234
|
+
sortedKeys: sortedKeys
|
|
5235
|
+
};
|
|
5236
|
+
return this._zoneIdsLocales[localString];
|
|
5237
|
+
};
|
|
5357
5238
|
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
}
|
|
5362
|
-
}
|
|
5363
|
-
} catch (err) {
|
|
5364
|
-
_iterator2.e(err);
|
|
5365
|
-
} finally {
|
|
5366
|
-
_iterator2.f();
|
|
5367
|
-
}
|
|
5239
|
+
_proto.parse = function parse(context, text, position) {
|
|
5240
|
+
for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
|
|
5241
|
+
var name = _arr[_i];
|
|
5368
5242
|
|
|
5369
|
-
|
|
5243
|
+
if (context.subSequenceEquals(text, position, name, 0, name.length)) {
|
|
5244
|
+
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
|
|
5245
|
+
return position + name.length;
|
|
5246
|
+
}
|
|
5370
5247
|
}
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5248
|
+
|
|
5249
|
+
var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
|
|
5250
|
+
ids = _this$_resolveZoneIds.ids,
|
|
5251
|
+
sortedKeys = _this$_resolveZoneIds.sortedKeys;
|
|
5252
|
+
|
|
5253
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(sortedKeys), _step2; !(_step2 = _iterator2()).done;) {
|
|
5254
|
+
var _name = _step2.value;
|
|
5255
|
+
|
|
5256
|
+
if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
|
|
5257
|
+
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
|
|
5258
|
+
return position + _name.length;
|
|
5259
|
+
}
|
|
5375
5260
|
}
|
|
5376
|
-
|
|
5261
|
+
|
|
5262
|
+
return ~position;
|
|
5263
|
+
};
|
|
5264
|
+
|
|
5265
|
+
_proto.toString = function toString() {
|
|
5266
|
+
return "ZoneText(" + this._textStyle + ")";
|
|
5267
|
+
};
|
|
5377
5268
|
|
|
5378
5269
|
return CldrZoneTextPrinterParser;
|
|
5379
5270
|
}();
|
|
@@ -5394,12 +5285,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5394
5285
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocalizedOffsetPrinterParser; });
|
|
5395
5286
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
5396
5287
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
5397
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5398
|
-
|
|
5399
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5400
|
-
|
|
5401
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5402
|
-
|
|
5403
5288
|
/**
|
|
5404
5289
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
5405
5290
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -5410,180 +5295,174 @@ var MathUtil = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].MathUtil;
|
|
|
5410
5295
|
|
|
5411
5296
|
var LocalizedOffsetPrinterParser = function () {
|
|
5412
5297
|
function LocalizedOffsetPrinterParser(textStyle) {
|
|
5413
|
-
_classCallCheck(this, LocalizedOffsetPrinterParser);
|
|
5414
|
-
|
|
5415
5298
|
this._textStyle = textStyle;
|
|
5416
5299
|
}
|
|
5417
5300
|
|
|
5418
|
-
|
|
5419
|
-
key: "textStyle",
|
|
5420
|
-
value: function textStyle() {
|
|
5421
|
-
return this._textStyle;
|
|
5422
|
-
}
|
|
5423
|
-
}, {
|
|
5424
|
-
key: "print",
|
|
5425
|
-
value: function print(context, buf) {
|
|
5426
|
-
var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
|
|
5301
|
+
var _proto = LocalizedOffsetPrinterParser.prototype;
|
|
5427
5302
|
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5303
|
+
_proto.textStyle = function textStyle() {
|
|
5304
|
+
return this._textStyle;
|
|
5305
|
+
};
|
|
5431
5306
|
|
|
5432
|
-
|
|
5307
|
+
_proto.print = function print(context, buf) {
|
|
5308
|
+
var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
|
|
5433
5309
|
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5310
|
+
if (offsetSecs == null) {
|
|
5311
|
+
return false;
|
|
5312
|
+
}
|
|
5437
5313
|
|
|
5438
|
-
|
|
5314
|
+
buf.append('GMT');
|
|
5439
5315
|
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
|
|
5444
|
-
buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
|
|
5316
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
5317
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
|
|
5318
|
+
}
|
|
5445
5319
|
|
|
5446
|
-
|
|
5447
|
-
buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
|
|
5320
|
+
var totalSecs = MathUtil.safeToInt(offsetSecs);
|
|
5448
5321
|
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5322
|
+
if (totalSecs !== 0) {
|
|
5323
|
+
var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
|
|
5324
|
+
var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
|
|
5325
|
+
var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
|
|
5326
|
+
buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
|
|
5327
|
+
|
|
5328
|
+
if (absMinutes > 0 || absSeconds > 0) {
|
|
5329
|
+
buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
|
|
5330
|
+
|
|
5331
|
+
if (absSeconds > 0) {
|
|
5332
|
+
buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
|
|
5452
5333
|
}
|
|
5453
5334
|
}
|
|
5454
|
-
|
|
5455
|
-
return true;
|
|
5456
5335
|
}
|
|
5457
|
-
}, {
|
|
5458
|
-
key: "parse",
|
|
5459
|
-
value: function parse(context, text, position) {
|
|
5460
|
-
if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
|
|
5461
|
-
return ~position;
|
|
5462
|
-
}
|
|
5463
5336
|
|
|
5464
|
-
|
|
5337
|
+
return true;
|
|
5338
|
+
};
|
|
5465
5339
|
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5340
|
+
_proto.parse = function parse(context, text, position) {
|
|
5341
|
+
if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
|
|
5342
|
+
return ~position;
|
|
5343
|
+
}
|
|
5469
5344
|
|
|
5470
|
-
|
|
5345
|
+
position += 3;
|
|
5471
5346
|
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5347
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
5348
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
|
|
5349
|
+
}
|
|
5475
5350
|
|
|
5476
|
-
|
|
5351
|
+
var end = text.length;
|
|
5477
5352
|
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5353
|
+
if (position === end) {
|
|
5354
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
|
|
5355
|
+
}
|
|
5481
5356
|
|
|
5482
|
-
|
|
5357
|
+
var sign = text.charAt(position);
|
|
5483
5358
|
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5359
|
+
if (sign !== '+' && sign !== '-') {
|
|
5360
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
|
|
5361
|
+
}
|
|
5487
5362
|
|
|
5488
|
-
|
|
5489
|
-
var ch = text.charAt(position);
|
|
5363
|
+
var negative = sign === '-' ? -1 : 1;
|
|
5490
5364
|
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5365
|
+
if (position === end) {
|
|
5366
|
+
return ~position;
|
|
5367
|
+
}
|
|
5368
|
+
|
|
5369
|
+
position++;
|
|
5370
|
+
var ch = text.charAt(position);
|
|
5494
5371
|
|
|
5495
|
-
|
|
5496
|
-
|
|
5372
|
+
if (ch < '0' || ch > '9') {
|
|
5373
|
+
return ~position;
|
|
5374
|
+
}
|
|
5497
5375
|
|
|
5498
|
-
|
|
5499
|
-
|
|
5376
|
+
position++;
|
|
5377
|
+
var hour = MathUtil.parseInt(ch);
|
|
5500
5378
|
|
|
5501
|
-
|
|
5502
|
-
|
|
5379
|
+
if (position !== end) {
|
|
5380
|
+
ch = text.charAt(position);
|
|
5503
5381
|
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
}
|
|
5382
|
+
if (ch >= '0' && ch <= '9') {
|
|
5383
|
+
hour = hour * 10 + MathUtil.parseInt(ch);
|
|
5507
5384
|
|
|
5508
|
-
|
|
5385
|
+
if (hour > 23) {
|
|
5386
|
+
return ~position;
|
|
5509
5387
|
}
|
|
5388
|
+
|
|
5389
|
+
position++;
|
|
5510
5390
|
}
|
|
5391
|
+
}
|
|
5511
5392
|
|
|
5512
|
-
|
|
5513
|
-
|
|
5393
|
+
if (position === end || text.charAt(position) !== ':') {
|
|
5394
|
+
var _offset = negative * 3600 * hour;
|
|
5514
5395
|
|
|
5515
|
-
|
|
5516
|
-
|
|
5396
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
|
|
5397
|
+
}
|
|
5517
5398
|
|
|
5518
|
-
|
|
5399
|
+
position++;
|
|
5519
5400
|
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5401
|
+
if (position > end - 2) {
|
|
5402
|
+
return ~position;
|
|
5403
|
+
}
|
|
5523
5404
|
|
|
5524
|
-
|
|
5405
|
+
ch = text.charAt(position);
|
|
5525
5406
|
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5407
|
+
if (ch < '0' || ch > '9') {
|
|
5408
|
+
return ~position;
|
|
5409
|
+
}
|
|
5529
5410
|
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5411
|
+
position++;
|
|
5412
|
+
var min = MathUtil.parseInt(ch);
|
|
5413
|
+
ch = text.charAt(position);
|
|
5533
5414
|
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
position++;
|
|
5539
|
-
min = min * 10 + MathUtil.parseInt(ch);
|
|
5415
|
+
if (ch < '0' || ch > '9') {
|
|
5416
|
+
return ~position;
|
|
5417
|
+
}
|
|
5540
5418
|
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
}
|
|
5419
|
+
position++;
|
|
5420
|
+
min = min * 10 + MathUtil.parseInt(ch);
|
|
5544
5421
|
|
|
5545
|
-
|
|
5546
|
-
|
|
5422
|
+
if (min > 59) {
|
|
5423
|
+
return ~position;
|
|
5424
|
+
}
|
|
5547
5425
|
|
|
5548
|
-
|
|
5549
|
-
|
|
5426
|
+
if (position === end || text.charAt(position) !== ':') {
|
|
5427
|
+
var _offset2 = negative * (3600 * hour + 60 * min);
|
|
5550
5428
|
|
|
5551
|
-
position
|
|
5429
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
|
|
5430
|
+
}
|
|
5552
5431
|
|
|
5553
|
-
|
|
5554
|
-
return ~position;
|
|
5555
|
-
}
|
|
5432
|
+
position++;
|
|
5556
5433
|
|
|
5557
|
-
|
|
5434
|
+
if (position > end - 2) {
|
|
5435
|
+
return ~position;
|
|
5436
|
+
}
|
|
5558
5437
|
|
|
5559
|
-
|
|
5560
|
-
return ~position;
|
|
5561
|
-
}
|
|
5438
|
+
ch = text.charAt(position);
|
|
5562
5439
|
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5440
|
+
if (ch < '0' || ch > '9') {
|
|
5441
|
+
return ~position;
|
|
5442
|
+
}
|
|
5566
5443
|
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5444
|
+
position++;
|
|
5445
|
+
var sec = MathUtil.parseInt(ch);
|
|
5446
|
+
ch = text.charAt(position);
|
|
5570
5447
|
|
|
5571
|
-
|
|
5572
|
-
|
|
5448
|
+
if (ch < '0' || ch > '9') {
|
|
5449
|
+
return ~position;
|
|
5450
|
+
}
|
|
5573
5451
|
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
}
|
|
5452
|
+
position++;
|
|
5453
|
+
sec = sec * 10 + MathUtil.parseInt(ch);
|
|
5577
5454
|
|
|
5578
|
-
|
|
5579
|
-
return
|
|
5580
|
-
}
|
|
5581
|
-
}, {
|
|
5582
|
-
key: "toString",
|
|
5583
|
-
value: function toString() {
|
|
5584
|
-
return "LocalizedOffset(".concat(this._textStyle, ")");
|
|
5455
|
+
if (sec > 59) {
|
|
5456
|
+
return ~position;
|
|
5585
5457
|
}
|
|
5586
|
-
|
|
5458
|
+
|
|
5459
|
+
var offset = negative * (3600 * hour + 60 * min + sec);
|
|
5460
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
|
|
5461
|
+
};
|
|
5462
|
+
|
|
5463
|
+
_proto.toString = function toString() {
|
|
5464
|
+
return "LocalizedOffset(" + this._textStyle + ")";
|
|
5465
|
+
};
|
|
5587
5466
|
|
|
5588
5467
|
return LocalizedOffsetPrinterParser;
|
|
5589
5468
|
}();
|
|
@@ -5604,18 +5483,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5604
5483
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPrinterParser; });
|
|
5605
5484
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
5606
5485
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
5607
|
-
function
|
|
5486
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5608
5487
|
|
|
5609
5488
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5610
5489
|
|
|
5611
5490
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
5612
5491
|
|
|
5613
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5614
|
-
|
|
5615
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5616
|
-
|
|
5617
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5618
|
-
|
|
5619
5492
|
/**
|
|
5620
5493
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
5621
5494
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -5625,104 +5498,86 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
5625
5498
|
|
|
5626
5499
|
var TextPrinterParser = function () {
|
|
5627
5500
|
function TextPrinterParser(field, textStyle, provider) {
|
|
5628
|
-
_classCallCheck(this, TextPrinterParser);
|
|
5629
|
-
|
|
5630
5501
|
this._field = field;
|
|
5631
5502
|
this._textStyle = textStyle;
|
|
5632
5503
|
this._provider = provider;
|
|
5633
5504
|
}
|
|
5634
5505
|
|
|
5635
|
-
|
|
5636
|
-
key: "field",
|
|
5637
|
-
value: function field() {
|
|
5638
|
-
return this._field;
|
|
5639
|
-
}
|
|
5640
|
-
}, {
|
|
5641
|
-
key: "textStyle",
|
|
5642
|
-
value: function textStyle() {
|
|
5643
|
-
return this._textStyle;
|
|
5644
|
-
}
|
|
5645
|
-
}, {
|
|
5646
|
-
key: "provider",
|
|
5647
|
-
value: function provider() {
|
|
5648
|
-
return this._provider;
|
|
5649
|
-
}
|
|
5650
|
-
}, {
|
|
5651
|
-
key: "print",
|
|
5652
|
-
value: function print(context, buf) {
|
|
5653
|
-
var value = context.getValue(this._field);
|
|
5506
|
+
var _proto = TextPrinterParser.prototype;
|
|
5654
5507
|
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5508
|
+
_proto.field = function field() {
|
|
5509
|
+
return this._field;
|
|
5510
|
+
};
|
|
5658
5511
|
|
|
5659
|
-
|
|
5512
|
+
_proto.textStyle = function textStyle() {
|
|
5513
|
+
return this._textStyle;
|
|
5514
|
+
};
|
|
5660
5515
|
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5516
|
+
_proto.provider = function provider() {
|
|
5517
|
+
return this._provider;
|
|
5518
|
+
};
|
|
5664
5519
|
|
|
5665
|
-
|
|
5666
|
-
|
|
5520
|
+
_proto.print = function print(context, buf) {
|
|
5521
|
+
var value = context.getValue(this._field);
|
|
5522
|
+
|
|
5523
|
+
if (value === null) {
|
|
5524
|
+
return false;
|
|
5667
5525
|
}
|
|
5668
|
-
}, {
|
|
5669
|
-
key: "parse",
|
|
5670
|
-
value: function parse(context, parseText, position) {
|
|
5671
|
-
var length = parseText.length;
|
|
5672
5526
|
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5527
|
+
var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
|
|
5528
|
+
|
|
5529
|
+
if (text === null) {
|
|
5530
|
+
return this._numberPrinterParser().print(context, buf);
|
|
5531
|
+
}
|
|
5676
5532
|
|
|
5677
|
-
|
|
5533
|
+
buf.append(text);
|
|
5534
|
+
return true;
|
|
5535
|
+
};
|
|
5678
5536
|
|
|
5679
|
-
|
|
5537
|
+
_proto.parse = function parse(context, parseText, position) {
|
|
5538
|
+
var length = parseText.length;
|
|
5680
5539
|
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5540
|
+
if (position < 0 || position > length) {
|
|
5541
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: " + position);
|
|
5542
|
+
}
|
|
5684
5543
|
|
|
5685
|
-
|
|
5686
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
5687
|
-
var entry = _step.value;
|
|
5688
|
-
var itText = entry.key;
|
|
5544
|
+
var style = context.isStrict() ? this._textStyle : null;
|
|
5689
5545
|
|
|
5690
|
-
|
|
5691
|
-
return context.setParsedField(this._field, entry.value, position, position + itText.length);
|
|
5692
|
-
}
|
|
5693
|
-
}
|
|
5694
|
-
} catch (err) {
|
|
5695
|
-
_iterator.e(err);
|
|
5696
|
-
} finally {
|
|
5697
|
-
_iterator.f();
|
|
5698
|
-
}
|
|
5546
|
+
var it = this._provider.getTextIterator(this._field, style, context.locale());
|
|
5699
5547
|
|
|
5700
|
-
|
|
5701
|
-
|
|
5548
|
+
if (it != null) {
|
|
5549
|
+
for (var _iterator = _createForOfIteratorHelperLoose(it), _step; !(_step = _iterator()).done;) {
|
|
5550
|
+
var entry = _step.value;
|
|
5551
|
+
var itText = entry.key;
|
|
5552
|
+
|
|
5553
|
+
if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
|
|
5554
|
+
return context.setParsedField(this._field, entry.value, position, position + itText.length);
|
|
5702
5555
|
}
|
|
5703
5556
|
}
|
|
5704
5557
|
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
}, {
|
|
5708
|
-
key: "_numberPrinterParser",
|
|
5709
|
-
value: function _numberPrinterParser() {
|
|
5710
|
-
if (this._currentNumberPrinterParser == null) {
|
|
5711
|
-
this._currentNumberPrinterParser = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(this._field, 1, 19, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL);
|
|
5558
|
+
if (context.isStrict()) {
|
|
5559
|
+
return ~position;
|
|
5712
5560
|
}
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5563
|
+
return this._numberPrinterParser().parse(context, parseText, position);
|
|
5564
|
+
};
|
|
5713
5565
|
|
|
5714
|
-
|
|
5566
|
+
_proto._numberPrinterParser = function _numberPrinterParser() {
|
|
5567
|
+
if (this._currentNumberPrinterParser == null) {
|
|
5568
|
+
this._currentNumberPrinterParser = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(this._field, 1, 19, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL);
|
|
5715
5569
|
}
|
|
5716
|
-
}, {
|
|
5717
|
-
key: "toString",
|
|
5718
|
-
value: function toString() {
|
|
5719
|
-
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
5720
|
-
return "Text(".concat(this._field, ")");
|
|
5721
|
-
}
|
|
5722
5570
|
|
|
5723
|
-
|
|
5571
|
+
return this._currentNumberPrinterParser;
|
|
5572
|
+
};
|
|
5573
|
+
|
|
5574
|
+
_proto.toString = function toString() {
|
|
5575
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
5576
|
+
return "Text(" + this._field + ")";
|
|
5724
5577
|
}
|
|
5725
|
-
|
|
5578
|
+
|
|
5579
|
+
return "Text(" + this._field + "," + this._textStyle + ")";
|
|
5580
|
+
};
|
|
5726
5581
|
|
|
5727
5582
|
return TextPrinterParser;
|
|
5728
5583
|
}();
|
|
@@ -5744,12 +5599,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5744
5599
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
5745
5600
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
5746
5601
|
/* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../temporal/WeekFields */ "./src/temporal/WeekFields.js");
|
|
5747
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5748
|
-
|
|
5749
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5750
|
-
|
|
5751
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5752
|
-
|
|
5753
5602
|
/*
|
|
5754
5603
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
5755
5604
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -5760,95 +5609,89 @@ var StringBuilder = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].StringBuilde
|
|
|
5760
5609
|
|
|
5761
5610
|
var WeekFieldsPrinterParser = function () {
|
|
5762
5611
|
function WeekFieldsPrinterParser(letter, count) {
|
|
5763
|
-
_classCallCheck(this, WeekFieldsPrinterParser);
|
|
5764
|
-
|
|
5765
5612
|
this._letter = letter;
|
|
5766
5613
|
this._count = count;
|
|
5767
5614
|
}
|
|
5768
5615
|
|
|
5769
|
-
|
|
5770
|
-
key: "print",
|
|
5771
|
-
value: function print(context, buf) {
|
|
5772
|
-
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
5616
|
+
var _proto = WeekFieldsPrinterParser.prototype;
|
|
5773
5617
|
|
|
5774
|
-
|
|
5618
|
+
_proto.print = function print(context, buf) {
|
|
5619
|
+
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
5775
5620
|
|
|
5776
|
-
|
|
5777
|
-
}
|
|
5778
|
-
}, {
|
|
5779
|
-
key: "parse",
|
|
5780
|
-
value: function parse(context, text, position) {
|
|
5781
|
-
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
5621
|
+
var pp = this._evaluate(weekFields);
|
|
5782
5622
|
|
|
5783
|
-
|
|
5623
|
+
return pp.print(context, buf);
|
|
5624
|
+
};
|
|
5784
5625
|
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
}, {
|
|
5788
|
-
key: "_evaluate",
|
|
5789
|
-
value: function _evaluate(weekFields) {
|
|
5790
|
-
var pp = null;
|
|
5791
|
-
|
|
5792
|
-
switch (this._letter) {
|
|
5793
|
-
case 'e':
|
|
5794
|
-
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
|
|
5795
|
-
break;
|
|
5796
|
-
|
|
5797
|
-
case 'c':
|
|
5798
|
-
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
|
|
5799
|
-
break;
|
|
5800
|
-
|
|
5801
|
-
case 'w':
|
|
5802
|
-
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfWeekBasedYear(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
|
|
5803
|
-
break;
|
|
5804
|
-
|
|
5805
|
-
case 'W':
|
|
5806
|
-
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfMonth(), 1, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
|
|
5807
|
-
break;
|
|
5808
|
-
|
|
5809
|
-
case 'Y':
|
|
5810
|
-
if (this._count === 2) {
|
|
5811
|
-
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser(weekFields.weekBasedYear(), 2, 2, 0, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser.BASE_DATE);
|
|
5812
|
-
} else {
|
|
5813
|
-
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekBasedYear(), this._count, 19, this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD, -1);
|
|
5814
|
-
}
|
|
5626
|
+
_proto.parse = function parse(context, text, position) {
|
|
5627
|
+
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
5815
5628
|
|
|
5816
|
-
|
|
5817
|
-
}
|
|
5629
|
+
var pp = this._evaluate(weekFields);
|
|
5818
5630
|
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5631
|
+
return pp.parse(context, text, position);
|
|
5632
|
+
};
|
|
5633
|
+
|
|
5634
|
+
_proto._evaluate = function _evaluate(weekFields) {
|
|
5635
|
+
var pp = null;
|
|
5636
|
+
|
|
5637
|
+
switch (this._letter) {
|
|
5638
|
+
case 'e':
|
|
5639
|
+
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
|
|
5640
|
+
break;
|
|
5641
|
+
|
|
5642
|
+
case 'c':
|
|
5643
|
+
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
|
|
5644
|
+
break;
|
|
5645
|
+
|
|
5646
|
+
case 'w':
|
|
5647
|
+
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfWeekBasedYear(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
|
|
5648
|
+
break;
|
|
5649
|
+
|
|
5650
|
+
case 'W':
|
|
5651
|
+
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfMonth(), 1, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
|
|
5652
|
+
break;
|
|
5653
|
+
|
|
5654
|
+
case 'Y':
|
|
5655
|
+
if (this._count === 2) {
|
|
5656
|
+
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser(weekFields.weekBasedYear(), 2, 2, 0, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser.BASE_DATE);
|
|
5832
5657
|
} else {
|
|
5833
|
-
|
|
5834
|
-
}
|
|
5835
|
-
} else {
|
|
5836
|
-
if (this._letter === 'c' || this._letter === 'e') {
|
|
5837
|
-
sb.append('DayOfWeek');
|
|
5838
|
-
} else if (this._letter === 'w') {
|
|
5839
|
-
sb.append('WeekOfWeekBasedYear');
|
|
5840
|
-
} else if (this._letter === 'W') {
|
|
5841
|
-
sb.append('WeekOfMonth');
|
|
5658
|
+
pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekBasedYear(), this._count, 19, this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD, -1);
|
|
5842
5659
|
}
|
|
5843
5660
|
|
|
5844
|
-
|
|
5845
|
-
|
|
5661
|
+
break;
|
|
5662
|
+
}
|
|
5663
|
+
|
|
5664
|
+
return pp;
|
|
5665
|
+
};
|
|
5666
|
+
|
|
5667
|
+
_proto.toString = function toString() {
|
|
5668
|
+
var sb = new StringBuilder(30);
|
|
5669
|
+
sb.append('Localized(');
|
|
5670
|
+
|
|
5671
|
+
if (this._letter === 'Y') {
|
|
5672
|
+
if (this._count === 1) {
|
|
5673
|
+
sb.append('WeekBasedYear');
|
|
5674
|
+
} else if (this._count === 2) {
|
|
5675
|
+
sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
|
|
5676
|
+
} else {
|
|
5677
|
+
sb.append('WeekBasedYear,').append(this._count).append(',').append(19).append(',').append(this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD);
|
|
5678
|
+
}
|
|
5679
|
+
} else {
|
|
5680
|
+
if (this._letter === 'c' || this._letter === 'e') {
|
|
5681
|
+
sb.append('DayOfWeek');
|
|
5682
|
+
} else if (this._letter === 'w') {
|
|
5683
|
+
sb.append('WeekOfWeekBasedYear');
|
|
5684
|
+
} else if (this._letter === 'W') {
|
|
5685
|
+
sb.append('WeekOfMonth');
|
|
5846
5686
|
}
|
|
5847
5687
|
|
|
5848
|
-
sb.append('
|
|
5849
|
-
|
|
5688
|
+
sb.append(',');
|
|
5689
|
+
sb.append(this._count);
|
|
5850
5690
|
}
|
|
5851
|
-
|
|
5691
|
+
|
|
5692
|
+
sb.append(')');
|
|
5693
|
+
return sb.toString();
|
|
5694
|
+
};
|
|
5852
5695
|
|
|
5853
5696
|
return WeekFieldsPrinterParser;
|
|
5854
5697
|
}();
|
|
@@ -5937,12 +5780,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5937
5780
|
/* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
|
|
5938
5781
|
/* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cldrjs */ "./node_modules/cldrjs/dist/node_main.js");
|
|
5939
5782
|
/* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cldrjs__WEBPACK_IMPORTED_MODULE_2__);
|
|
5940
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5941
|
-
|
|
5942
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5943
|
-
|
|
5944
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5945
|
-
|
|
5946
5783
|
/*
|
|
5947
5784
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
5948
5785
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -5969,9 +5806,27 @@ var _weekDayMap = {
|
|
|
5969
5806
|
'sun': _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"].SUNDAY
|
|
5970
5807
|
};
|
|
5971
5808
|
var ComputedDayOfField = function () {
|
|
5972
|
-
function
|
|
5973
|
-
|
|
5809
|
+
ComputedDayOfField.ofDayOfWeekField = function ofDayOfWeekField(weekDef) {
|
|
5810
|
+
return new ComputedDayOfField('DayOfWeek', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, DAY_OF_WEEK_RANGE);
|
|
5811
|
+
};
|
|
5812
|
+
|
|
5813
|
+
ComputedDayOfField.ofWeekOfMonthField = function ofWeekOfMonthField(weekDef) {
|
|
5814
|
+
return new ComputedDayOfField('WeekOfMonth', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS, WEEK_OF_MONTH_RANGE);
|
|
5815
|
+
};
|
|
5816
|
+
|
|
5817
|
+
ComputedDayOfField.ofWeekOfYearField = function ofWeekOfYearField(weekDef) {
|
|
5818
|
+
return new ComputedDayOfField('WeekOfYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS, WEEK_OF_YEAR_RANGE);
|
|
5819
|
+
};
|
|
5820
|
+
|
|
5821
|
+
ComputedDayOfField.ofWeekOfWeekBasedYearField = function ofWeekOfWeekBasedYearField(weekDef) {
|
|
5822
|
+
return new ComputedDayOfField('WeekOfWeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, WEEK_OF_WEEK_BASED_YEAR_RANGE);
|
|
5823
|
+
};
|
|
5824
|
+
|
|
5825
|
+
ComputedDayOfField.ofWeekBasedYearField = function ofWeekBasedYearField(weekDef) {
|
|
5826
|
+
return new ComputedDayOfField('WeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER, WEEK_BASED_YEAR_RANGE);
|
|
5827
|
+
};
|
|
5974
5828
|
|
|
5829
|
+
function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
|
|
5975
5830
|
this._name = name;
|
|
5976
5831
|
this._weekDef = weekDef;
|
|
5977
5832
|
this._baseUnit = baseUnit;
|
|
@@ -5979,484 +5834,482 @@ var ComputedDayOfField = function () {
|
|
|
5979
5834
|
this._range = range;
|
|
5980
5835
|
}
|
|
5981
5836
|
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
}
|
|
5837
|
+
var _proto = ComputedDayOfField.prototype;
|
|
5838
|
+
|
|
5839
|
+
_proto.getFrom = function getFrom(temporal) {
|
|
5840
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
5841
|
+
|
|
5842
|
+
var dow = this._localizedDayOfWeek(temporal, sow);
|
|
5843
|
+
|
|
5844
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
5845
|
+
return dow;
|
|
5846
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
5847
|
+
return this._localizedWeekOfMonth(temporal, dow);
|
|
5848
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
5849
|
+
return this._localizedWeekOfYear(temporal, dow);
|
|
5850
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
5851
|
+
return this._localizedWOWBY(temporal);
|
|
5852
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
5853
|
+
return this._localizedWBY(temporal);
|
|
5854
|
+
} else {
|
|
5855
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
6002
5856
|
}
|
|
6003
|
-
}
|
|
6004
|
-
key: "_localizedDayOfWeek",
|
|
6005
|
-
value: function _localizedDayOfWeek(temporal, sow) {
|
|
6006
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6007
|
-
return MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6008
|
-
}
|
|
6009
|
-
}, {
|
|
6010
|
-
key: "_localizedWeekOfMonth",
|
|
6011
|
-
value: function _localizedWeekOfMonth(temporal, dow) {
|
|
6012
|
-
var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
5857
|
+
};
|
|
6013
5858
|
|
|
6014
|
-
|
|
5859
|
+
_proto._localizedDayOfWeek = function _localizedDayOfWeek(temporal, sow) {
|
|
5860
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
5861
|
+
return MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
5862
|
+
};
|
|
6015
5863
|
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
}, {
|
|
6019
|
-
key: "_localizedWeekOfYear",
|
|
6020
|
-
value: function _localizedWeekOfYear(temporal, dow) {
|
|
6021
|
-
var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
5864
|
+
_proto._localizedWeekOfMonth = function _localizedWeekOfMonth(temporal, dow) {
|
|
5865
|
+
var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
6022
5866
|
|
|
6023
|
-
|
|
5867
|
+
var offset = this._startOfWeekOffset(dom, dow);
|
|
6024
5868
|
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
}, {
|
|
6028
|
-
key: "_localizedWOWBY",
|
|
6029
|
-
value: function _localizedWOWBY(temporal) {
|
|
6030
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
5869
|
+
return ComputedDayOfField._computeWeek(offset, dom);
|
|
5870
|
+
};
|
|
6031
5871
|
|
|
6032
|
-
|
|
6033
|
-
|
|
5872
|
+
_proto._localizedWeekOfYear = function _localizedWeekOfYear(temporal, dow) {
|
|
5873
|
+
var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
6034
5874
|
|
|
6035
|
-
|
|
5875
|
+
var offset = this._startOfWeekOffset(doy, dow);
|
|
6036
5876
|
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
return this._localizedWeekOfYear(previous, dow) + 1;
|
|
6040
|
-
} else if (woy >= 53) {
|
|
6041
|
-
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
5877
|
+
return ComputedDayOfField._computeWeek(offset, doy);
|
|
5878
|
+
};
|
|
6042
5879
|
|
|
6043
|
-
|
|
6044
|
-
|
|
5880
|
+
_proto._localizedWOWBY = function _localizedWOWBY(temporal) {
|
|
5881
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
6045
5882
|
|
|
6046
|
-
|
|
5883
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
5884
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6047
5885
|
|
|
6048
|
-
|
|
6049
|
-
return woy - (weekIndexOfFirstWeekNextYear - 1);
|
|
6050
|
-
}
|
|
6051
|
-
}
|
|
5886
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
6052
5887
|
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
5888
|
+
if (woy === 0) {
|
|
5889
|
+
var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
5890
|
+
return this._localizedWeekOfYear(previous, dow) + 1;
|
|
5891
|
+
} else if (woy >= 53) {
|
|
5892
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
6059
5893
|
|
|
6060
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6061
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6062
5894
|
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
5895
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
6063
5896
|
|
|
6064
|
-
var
|
|
5897
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
6065
5898
|
|
|
6066
|
-
if (woy
|
|
6067
|
-
return
|
|
6068
|
-
} else if (woy < 53) {
|
|
6069
|
-
return year;
|
|
5899
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
5900
|
+
return woy - (weekIndexOfFirstWeekNextYear - 1);
|
|
6070
5901
|
}
|
|
5902
|
+
}
|
|
6071
5903
|
|
|
6072
|
-
|
|
5904
|
+
return woy;
|
|
5905
|
+
};
|
|
6073
5906
|
|
|
6074
|
-
|
|
5907
|
+
_proto._localizedWBY = function _localizedWBY(temporal) {
|
|
5908
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
6075
5909
|
|
|
6076
|
-
|
|
5910
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
5911
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
5912
|
+
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
6077
5913
|
|
|
6078
|
-
|
|
6079
|
-
return year + 1;
|
|
6080
|
-
}
|
|
5914
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
6081
5915
|
|
|
5916
|
+
if (woy === 0) {
|
|
5917
|
+
return year - 1;
|
|
5918
|
+
} else if (woy < 53) {
|
|
6082
5919
|
return year;
|
|
6083
5920
|
}
|
|
6084
|
-
}, {
|
|
6085
|
-
key: "_startOfWeekOffset",
|
|
6086
|
-
value: function _startOfWeekOffset(day, dow) {
|
|
6087
|
-
var weekStart = MathUtil.floorMod(day - dow, 7);
|
|
6088
|
-
var offset = -weekStart;
|
|
6089
|
-
|
|
6090
|
-
if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
|
|
6091
|
-
offset = 7 - weekStart;
|
|
6092
|
-
}
|
|
6093
5921
|
|
|
6094
|
-
|
|
5922
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
5923
|
+
|
|
5924
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
5925
|
+
|
|
5926
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
5927
|
+
|
|
5928
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
5929
|
+
return year + 1;
|
|
6095
5930
|
}
|
|
6096
|
-
}, {
|
|
6097
|
-
key: "adjustInto",
|
|
6098
|
-
value: function adjustInto(temporal, newValue) {
|
|
6099
|
-
var newVal = this._range.checkValidIntValue(newValue, this);
|
|
6100
5931
|
|
|
6101
|
-
|
|
5932
|
+
return year;
|
|
5933
|
+
};
|
|
6102
5934
|
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
5935
|
+
_proto._startOfWeekOffset = function _startOfWeekOffset(day, dow) {
|
|
5936
|
+
var weekStart = MathUtil.floorMod(day - dow, 7);
|
|
5937
|
+
var offset = -weekStart;
|
|
6106
5938
|
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
5939
|
+
if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
|
|
5940
|
+
offset = 7 - weekStart;
|
|
5941
|
+
}
|
|
6111
5942
|
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
6115
|
-
} else {
|
|
6116
|
-
if (result.get(this) < newVal) {
|
|
6117
|
-
result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
6118
|
-
}
|
|
5943
|
+
return offset;
|
|
5944
|
+
};
|
|
6119
5945
|
|
|
6120
|
-
|
|
5946
|
+
ComputedDayOfField._computeWeek = function _computeWeek(offset, day) {
|
|
5947
|
+
return MathUtil.intDiv(7 + offset + (day - 1), 7);
|
|
5948
|
+
};
|
|
6121
5949
|
|
|
6122
|
-
|
|
5950
|
+
_proto.adjustInto = function adjustInto(temporal, newValue) {
|
|
5951
|
+
var newVal = this._range.checkValidIntValue(newValue, this);
|
|
6123
5952
|
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
5953
|
+
var currentVal = temporal.get(this);
|
|
5954
|
+
|
|
5955
|
+
if (newVal === currentVal) {
|
|
5956
|
+
return temporal;
|
|
5957
|
+
}
|
|
5958
|
+
|
|
5959
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
5960
|
+
var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
|
|
5961
|
+
var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
|
|
5962
|
+
var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
5963
|
+
|
|
5964
|
+
if (result.get(this) > newVal) {
|
|
5965
|
+
var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
|
|
5966
|
+
result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
5967
|
+
} else {
|
|
5968
|
+
if (result.get(this) < newVal) {
|
|
5969
|
+
result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
6127
5970
|
}
|
|
6128
5971
|
|
|
6129
|
-
|
|
5972
|
+
var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
|
|
5973
|
+
|
|
5974
|
+
result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
5975
|
+
|
|
5976
|
+
if (result.get(this) > newVal) {
|
|
5977
|
+
result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
5978
|
+
}
|
|
6130
5979
|
}
|
|
6131
5980
|
|
|
6132
|
-
|
|
6133
|
-
return temporal.plus(delta, this._baseUnit);
|
|
5981
|
+
return result;
|
|
6134
5982
|
}
|
|
6135
|
-
}, {
|
|
6136
|
-
key: "resolve",
|
|
6137
|
-
value: function resolve(fieldValues, partialTemporal, resolverStyle) {
|
|
6138
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
6139
5983
|
|
|
6140
|
-
|
|
6141
|
-
|
|
5984
|
+
var delta = newVal - currentVal;
|
|
5985
|
+
return temporal.plus(delta, this._baseUnit);
|
|
5986
|
+
};
|
|
6142
5987
|
|
|
6143
|
-
|
|
5988
|
+
_proto.resolve = function resolve(fieldValues, partialTemporal, resolverStyle) {
|
|
5989
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
6144
5990
|
|
|
6145
|
-
|
|
5991
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
5992
|
+
var value = fieldValues.remove(this);
|
|
6146
5993
|
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
5994
|
+
var localDow = this._range.checkValidIntValue(value, this);
|
|
5995
|
+
|
|
5996
|
+
var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
|
|
5997
|
+
|
|
5998
|
+
fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
|
|
5999
|
+
return null;
|
|
6000
|
+
}
|
|
6150
6001
|
|
|
6151
|
-
|
|
6002
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
|
|
6003
|
+
return null;
|
|
6004
|
+
}
|
|
6005
|
+
|
|
6006
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
6007
|
+
if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
|
|
6152
6008
|
return null;
|
|
6153
6009
|
}
|
|
6154
6010
|
|
|
6155
|
-
|
|
6156
|
-
if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
|
|
6157
|
-
return null;
|
|
6158
|
-
}
|
|
6011
|
+
var _isoDow2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
|
|
6159
6012
|
|
|
6160
|
-
|
|
6013
|
+
var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
|
|
6161
6014
|
|
|
6162
|
-
|
|
6015
|
+
var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
|
|
6016
|
+
var date;
|
|
6017
|
+
var days;
|
|
6163
6018
|
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
var
|
|
6019
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
6020
|
+
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
6021
|
+
var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
|
|
6167
6022
|
|
|
6168
|
-
|
|
6169
|
-
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
6170
|
-
var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
|
|
6023
|
+
var dateDow = this._localizedDayOfWeek(date, sow);
|
|
6171
6024
|
|
|
6172
|
-
|
|
6025
|
+
var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
|
|
6173
6026
|
|
|
6174
|
-
|
|
6027
|
+
days = weeks * 7 + (_dow - dateDow);
|
|
6028
|
+
} else {
|
|
6029
|
+
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
6175
6030
|
|
|
6176
|
-
|
|
6177
|
-
} else {
|
|
6178
|
-
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
6031
|
+
var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
|
|
6179
6032
|
|
|
6180
|
-
|
|
6033
|
+
var _dateDow = this._localizedDayOfWeek(date, sow);
|
|
6181
6034
|
|
|
6182
|
-
|
|
6035
|
+
var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
|
|
6183
6036
|
|
|
6184
|
-
|
|
6037
|
+
days = _weeks * 7 + (_dow - _dateDow);
|
|
6038
|
+
}
|
|
6185
6039
|
|
|
6186
|
-
|
|
6040
|
+
date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
6041
|
+
|
|
6042
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
6043
|
+
if (date.getLong(this) !== fieldValues.get(this)) {
|
|
6044
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
|
|
6187
6045
|
}
|
|
6046
|
+
}
|
|
6188
6047
|
|
|
6189
|
-
|
|
6048
|
+
fieldValues.remove(this);
|
|
6049
|
+
fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
|
|
6050
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6051
|
+
return date;
|
|
6052
|
+
}
|
|
6190
6053
|
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
}
|
|
6195
|
-
}
|
|
6054
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
|
|
6055
|
+
return null;
|
|
6056
|
+
}
|
|
6196
6057
|
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
return date;
|
|
6201
|
-
}
|
|
6058
|
+
var isoDow = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
|
|
6059
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6060
|
+
var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
|
|
6202
6061
|
|
|
6203
|
-
|
|
6062
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
6063
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
|
|
6204
6064
|
return null;
|
|
6205
6065
|
}
|
|
6206
6066
|
|
|
6207
|
-
var
|
|
6208
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6209
|
-
var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
|
|
6067
|
+
var _value = fieldValues.remove(this);
|
|
6210
6068
|
|
|
6211
|
-
|
|
6212
|
-
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
|
|
6213
|
-
return null;
|
|
6214
|
-
}
|
|
6069
|
+
var _date;
|
|
6215
6070
|
|
|
6216
|
-
|
|
6071
|
+
var _days;
|
|
6217
6072
|
|
|
6218
|
-
|
|
6073
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
6074
|
+
var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
6075
|
+
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
6076
|
+
_date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
|
|
6219
6077
|
|
|
6220
|
-
var
|
|
6078
|
+
var _dateDow2 = this._localizedDayOfWeek(_date, sow);
|
|
6221
6079
|
|
|
6222
|
-
|
|
6223
|
-
var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
6224
|
-
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
6225
|
-
_date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
|
|
6080
|
+
var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
|
|
6226
6081
|
|
|
6227
|
-
|
|
6082
|
+
_days = _weeks2 * 7 + (dow - _dateDow2);
|
|
6083
|
+
} else {
|
|
6084
|
+
var _month = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR));
|
|
6228
6085
|
|
|
6229
|
-
|
|
6086
|
+
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
|
|
6230
6087
|
|
|
6231
|
-
|
|
6232
|
-
} else {
|
|
6233
|
-
var _month = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR));
|
|
6088
|
+
var _dateDow3 = this._localizedDayOfWeek(_date, sow);
|
|
6234
6089
|
|
|
6235
|
-
|
|
6090
|
+
var wom = this._range.checkValidIntValue(_value, this);
|
|
6236
6091
|
|
|
6237
|
-
|
|
6092
|
+
var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
|
|
6238
6093
|
|
|
6239
|
-
|
|
6094
|
+
_days = _weeks3 * 7 + (dow - _dateDow3);
|
|
6095
|
+
}
|
|
6240
6096
|
|
|
6241
|
-
|
|
6097
|
+
_date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
6242
6098
|
|
|
6243
|
-
|
|
6099
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
6100
|
+
if (_date.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR)) {
|
|
6101
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
|
|
6244
6102
|
}
|
|
6103
|
+
}
|
|
6245
6104
|
|
|
6246
|
-
|
|
6105
|
+
fieldValues.remove(this);
|
|
6106
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
6107
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
6108
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6109
|
+
return _date;
|
|
6110
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
6111
|
+
var _value2 = fieldValues.remove(this);
|
|
6247
6112
|
|
|
6248
|
-
|
|
6249
|
-
if (_date.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR)) {
|
|
6250
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
|
|
6251
|
-
}
|
|
6252
|
-
}
|
|
6113
|
+
var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
6253
6114
|
|
|
6254
|
-
|
|
6255
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
6256
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
6257
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6258
|
-
return _date;
|
|
6259
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
6260
|
-
var _value2 = fieldValues.remove(this);
|
|
6115
|
+
var _days2;
|
|
6261
6116
|
|
|
6262
|
-
|
|
6117
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
6118
|
+
var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
|
|
6263
6119
|
|
|
6264
|
-
var
|
|
6120
|
+
var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
|
|
6265
6121
|
|
|
6266
|
-
|
|
6267
|
-
|
|
6122
|
+
_days2 = _weeks4 * 7 + (dow - _dateDow4);
|
|
6123
|
+
} else {
|
|
6124
|
+
var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
|
|
6268
6125
|
|
|
6269
|
-
|
|
6126
|
+
var woy = this._range.checkValidIntValue(_value2, this);
|
|
6270
6127
|
|
|
6271
|
-
|
|
6272
|
-
} else {
|
|
6273
|
-
var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
|
|
6128
|
+
var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
|
|
6274
6129
|
|
|
6275
|
-
|
|
6130
|
+
_days2 = _weeks5 * 7 + (dow - _dateDow5);
|
|
6131
|
+
}
|
|
6276
6132
|
|
|
6277
|
-
|
|
6133
|
+
_date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
6278
6134
|
|
|
6279
|
-
|
|
6135
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
6136
|
+
if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
|
|
6137
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
|
|
6280
6138
|
}
|
|
6139
|
+
}
|
|
6140
|
+
|
|
6141
|
+
fieldValues.remove(this);
|
|
6142
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
6143
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6144
|
+
return _date2;
|
|
6145
|
+
} else {
|
|
6146
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
6147
|
+
}
|
|
6148
|
+
};
|
|
6281
6149
|
|
|
6282
|
-
|
|
6150
|
+
_proto.name = function name() {
|
|
6151
|
+
return this._name;
|
|
6152
|
+
};
|
|
6283
6153
|
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
}
|
|
6288
|
-
}
|
|
6154
|
+
_proto.baseUnit = function baseUnit() {
|
|
6155
|
+
return this._baseUnit;
|
|
6156
|
+
};
|
|
6289
6157
|
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
return _date2;
|
|
6294
|
-
} else {
|
|
6295
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
6296
|
-
}
|
|
6297
|
-
}
|
|
6298
|
-
}, {
|
|
6299
|
-
key: "name",
|
|
6300
|
-
value: function name() {
|
|
6301
|
-
return this._name;
|
|
6302
|
-
}
|
|
6303
|
-
}, {
|
|
6304
|
-
key: "baseUnit",
|
|
6305
|
-
value: function baseUnit() {
|
|
6306
|
-
return this._baseUnit;
|
|
6307
|
-
}
|
|
6308
|
-
}, {
|
|
6309
|
-
key: "rangeUnit",
|
|
6310
|
-
value: function rangeUnit() {
|
|
6311
|
-
return this._rangeUnit;
|
|
6312
|
-
}
|
|
6313
|
-
}, {
|
|
6314
|
-
key: "range",
|
|
6315
|
-
value: function range() {
|
|
6316
|
-
return this._range;
|
|
6317
|
-
}
|
|
6318
|
-
}, {
|
|
6319
|
-
key: "isDateBased",
|
|
6320
|
-
value: function isDateBased() {
|
|
6321
|
-
return true;
|
|
6322
|
-
}
|
|
6323
|
-
}, {
|
|
6324
|
-
key: "isTimeBased",
|
|
6325
|
-
value: function isTimeBased() {
|
|
6326
|
-
return false;
|
|
6327
|
-
}
|
|
6328
|
-
}, {
|
|
6329
|
-
key: "isSupportedBy",
|
|
6330
|
-
value: function isSupportedBy(temporal) {
|
|
6331
|
-
if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
|
|
6332
|
-
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
6333
|
-
return true;
|
|
6334
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
6335
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
6336
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
6337
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
6338
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
6339
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
6340
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
6341
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
6342
|
-
}
|
|
6343
|
-
}
|
|
6158
|
+
_proto.rangeUnit = function rangeUnit() {
|
|
6159
|
+
return this._rangeUnit;
|
|
6160
|
+
};
|
|
6344
6161
|
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
}
|
|
6348
|
-
key: "rangeRefinedBy",
|
|
6349
|
-
value: function rangeRefinedBy(temporal) {
|
|
6350
|
-
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
6351
|
-
return this._range;
|
|
6352
|
-
}
|
|
6162
|
+
_proto.range = function range() {
|
|
6163
|
+
return this._range;
|
|
6164
|
+
};
|
|
6353
6165
|
|
|
6354
|
-
|
|
6166
|
+
_proto.isDateBased = function isDateBased() {
|
|
6167
|
+
return true;
|
|
6168
|
+
};
|
|
6169
|
+
|
|
6170
|
+
_proto.isTimeBased = function isTimeBased() {
|
|
6171
|
+
return false;
|
|
6172
|
+
};
|
|
6355
6173
|
|
|
6356
|
-
|
|
6357
|
-
|
|
6174
|
+
_proto.isSupportedBy = function isSupportedBy(temporal) {
|
|
6175
|
+
if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
|
|
6176
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
6177
|
+
return true;
|
|
6178
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
6179
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
6358
6180
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
6359
|
-
|
|
6181
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
6360
6182
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
6361
|
-
return
|
|
6183
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
6362
6184
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
6363
|
-
return temporal.
|
|
6364
|
-
} else {
|
|
6365
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
6185
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
6366
6186
|
}
|
|
6187
|
+
}
|
|
6367
6188
|
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6371
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6189
|
+
return false;
|
|
6190
|
+
};
|
|
6372
6191
|
|
|
6373
|
-
|
|
6192
|
+
_proto.rangeRefinedBy = function rangeRefinedBy(temporal) {
|
|
6193
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
6194
|
+
return this._range;
|
|
6195
|
+
}
|
|
6374
6196
|
|
|
6375
|
-
|
|
6376
|
-
|
|
6197
|
+
var field = null;
|
|
6198
|
+
|
|
6199
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
6200
|
+
field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
|
|
6201
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
6202
|
+
field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
|
|
6203
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
6204
|
+
return this._rangeWOWBY(temporal);
|
|
6205
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
6206
|
+
return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
6207
|
+
} else {
|
|
6208
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
6377
6209
|
}
|
|
6378
|
-
}, {
|
|
6379
|
-
key: "_rangeWOWBY",
|
|
6380
|
-
value: function _rangeWOWBY(temporal) {
|
|
6381
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
6382
6210
|
|
|
6383
|
-
|
|
6384
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6211
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
6385
6212
|
|
|
6386
|
-
|
|
6213
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6214
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6387
6215
|
|
|
6388
|
-
|
|
6389
|
-
return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).minus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
|
|
6390
|
-
}
|
|
6216
|
+
var offset = this._startOfWeekOffset(temporal.get(field), dow);
|
|
6391
6217
|
|
|
6392
|
-
|
|
6218
|
+
var fieldRange = temporal.range(field);
|
|
6219
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
|
|
6220
|
+
};
|
|
6393
6221
|
|
|
6394
|
-
|
|
6395
|
-
|
|
6222
|
+
_proto._rangeWOWBY = function _rangeWOWBY(temporal) {
|
|
6223
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
6396
6224
|
|
|
6397
|
-
|
|
6225
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
6226
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
6398
6227
|
|
|
6399
|
-
|
|
6400
|
-
return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
|
|
6401
|
-
}
|
|
6228
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
6402
6229
|
|
|
6403
|
-
|
|
6230
|
+
if (woy === 0) {
|
|
6231
|
+
return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).minus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
|
|
6404
6232
|
}
|
|
6405
|
-
}, {
|
|
6406
|
-
key: "displayName",
|
|
6407
|
-
value: function displayName(locale) {
|
|
6408
|
-
requireNonNull(locale, 'locale');
|
|
6409
6233
|
|
|
6410
|
-
|
|
6411
|
-
return 'Week';
|
|
6412
|
-
}
|
|
6234
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
6413
6235
|
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
}], [{
|
|
6422
|
-
key: "ofDayOfWeekField",
|
|
6423
|
-
value: function ofDayOfWeekField(weekDef) {
|
|
6424
|
-
return new ComputedDayOfField('DayOfWeek', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, DAY_OF_WEEK_RANGE);
|
|
6425
|
-
}
|
|
6426
|
-
}, {
|
|
6427
|
-
key: "ofWeekOfMonthField",
|
|
6428
|
-
value: function ofWeekOfMonthField(weekDef) {
|
|
6429
|
-
return new ComputedDayOfField('WeekOfMonth', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS, WEEK_OF_MONTH_RANGE);
|
|
6430
|
-
}
|
|
6431
|
-
}, {
|
|
6432
|
-
key: "ofWeekOfYearField",
|
|
6433
|
-
value: function ofWeekOfYearField(weekDef) {
|
|
6434
|
-
return new ComputedDayOfField('WeekOfYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS, WEEK_OF_YEAR_RANGE);
|
|
6435
|
-
}
|
|
6436
|
-
}, {
|
|
6437
|
-
key: "ofWeekOfWeekBasedYearField",
|
|
6438
|
-
value: function ofWeekOfWeekBasedYearField(weekDef) {
|
|
6439
|
-
return new ComputedDayOfField('WeekOfWeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, WEEK_OF_WEEK_BASED_YEAR_RANGE);
|
|
6440
|
-
}
|
|
6441
|
-
}, {
|
|
6442
|
-
key: "ofWeekBasedYearField",
|
|
6443
|
-
value: function ofWeekBasedYearField(weekDef) {
|
|
6444
|
-
return new ComputedDayOfField('WeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER, WEEK_BASED_YEAR_RANGE);
|
|
6236
|
+
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
6237
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
6238
|
+
|
|
6239
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
6240
|
+
|
|
6241
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
6242
|
+
return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
|
|
6445
6243
|
}
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6244
|
+
|
|
6245
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
|
|
6246
|
+
};
|
|
6247
|
+
|
|
6248
|
+
_proto.displayName = function displayName(locale) {
|
|
6249
|
+
requireNonNull(locale, 'locale');
|
|
6250
|
+
|
|
6251
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
6252
|
+
return 'Week';
|
|
6450
6253
|
}
|
|
6451
|
-
|
|
6254
|
+
|
|
6255
|
+
return this.toString();
|
|
6256
|
+
};
|
|
6257
|
+
|
|
6258
|
+
_proto.toString = function toString() {
|
|
6259
|
+
return this._name + "[" + this._weekDef.toString() + "]";
|
|
6260
|
+
};
|
|
6452
6261
|
|
|
6453
6262
|
return ComputedDayOfField;
|
|
6454
6263
|
}();
|
|
6455
6264
|
var WeekFieldsCache = new Map();
|
|
6456
6265
|
var WeekFields = function () {
|
|
6457
|
-
function
|
|
6458
|
-
|
|
6266
|
+
WeekFields.of = function of(firstDayOrLocale, minDays) {
|
|
6267
|
+
if (minDays === undefined) {
|
|
6268
|
+
return WeekFields.ofLocale(firstDayOrLocale);
|
|
6269
|
+
} else {
|
|
6270
|
+
return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
|
|
6271
|
+
}
|
|
6272
|
+
};
|
|
6273
|
+
|
|
6274
|
+
WeekFields.ofLocale = function ofLocale(locale) {
|
|
6275
|
+
requireNonNull(locale, 'locale');
|
|
6276
|
+
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
|
|
6277
|
+
var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
|
|
6278
|
+
var worldRegion = '001';
|
|
6279
|
+
var weekData = cldr.get('supplemental/weekData');
|
|
6280
|
+
|
|
6281
|
+
var dow = _weekDayMap[weekData.firstDay[locale.country()]];
|
|
6282
|
+
|
|
6283
|
+
if (!dow) {
|
|
6284
|
+
dow = _weekDayMap[weekData.firstDay[worldRegion]];
|
|
6285
|
+
}
|
|
6286
|
+
|
|
6287
|
+
var minDays = weekData.minDays[locale.country()];
|
|
6288
|
+
|
|
6289
|
+
if (!minDays) {
|
|
6290
|
+
minDays = weekData.minDays[worldRegion];
|
|
6291
|
+
}
|
|
6292
|
+
|
|
6293
|
+
return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
|
|
6294
|
+
};
|
|
6295
|
+
|
|
6296
|
+
WeekFields.ofFirstDayOfWeekMinDays = function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
6297
|
+
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
6298
|
+
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
6299
|
+
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
6300
|
+
var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
|
|
6301
|
+
var rules = WeekFieldsCache.get(key);
|
|
6302
|
+
|
|
6303
|
+
if (rules == null) {
|
|
6304
|
+
rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
|
|
6305
|
+
WeekFieldsCache.set(key, rules);
|
|
6306
|
+
rules = WeekFieldsCache.get(key);
|
|
6307
|
+
}
|
|
6459
6308
|
|
|
6309
|
+
return rules;
|
|
6310
|
+
};
|
|
6311
|
+
|
|
6312
|
+
function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
6460
6313
|
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
6461
6314
|
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
6462
6315
|
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
@@ -6475,114 +6328,55 @@ var WeekFields = function () {
|
|
|
6475
6328
|
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/likelySubtags.json'));
|
|
6476
6329
|
}
|
|
6477
6330
|
|
|
6478
|
-
|
|
6479
|
-
key: "firstDayOfWeek",
|
|
6480
|
-
value: function firstDayOfWeek() {
|
|
6481
|
-
return this._firstDayOfWeek;
|
|
6482
|
-
}
|
|
6483
|
-
}, {
|
|
6484
|
-
key: "minimalDaysInFirstWeek",
|
|
6485
|
-
value: function minimalDaysInFirstWeek() {
|
|
6486
|
-
return this._minimalDays;
|
|
6487
|
-
}
|
|
6488
|
-
}, {
|
|
6489
|
-
key: "dayOfWeek",
|
|
6490
|
-
value: function dayOfWeek() {
|
|
6491
|
-
return this._dayOfWeek;
|
|
6492
|
-
}
|
|
6493
|
-
}, {
|
|
6494
|
-
key: "weekOfMonth",
|
|
6495
|
-
value: function weekOfMonth() {
|
|
6496
|
-
return this._weekOfMonth;
|
|
6497
|
-
}
|
|
6498
|
-
}, {
|
|
6499
|
-
key: "weekOfYear",
|
|
6500
|
-
value: function weekOfYear() {
|
|
6501
|
-
return this._weekOfYear;
|
|
6502
|
-
}
|
|
6503
|
-
}, {
|
|
6504
|
-
key: "weekOfWeekBasedYear",
|
|
6505
|
-
value: function weekOfWeekBasedYear() {
|
|
6506
|
-
return this._weekOfWeekBasedYear;
|
|
6507
|
-
}
|
|
6508
|
-
}, {
|
|
6509
|
-
key: "weekBasedYear",
|
|
6510
|
-
value: function weekBasedYear() {
|
|
6511
|
-
return this._weekBasedYear;
|
|
6512
|
-
}
|
|
6513
|
-
}, {
|
|
6514
|
-
key: "equals",
|
|
6515
|
-
value: function equals(other) {
|
|
6516
|
-
if (this === other) {
|
|
6517
|
-
return true;
|
|
6518
|
-
}
|
|
6331
|
+
var _proto2 = WeekFields.prototype;
|
|
6519
6332
|
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6333
|
+
_proto2.firstDayOfWeek = function firstDayOfWeek() {
|
|
6334
|
+
return this._firstDayOfWeek;
|
|
6335
|
+
};
|
|
6523
6336
|
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
}
|
|
6527
|
-
key: "hashCode",
|
|
6528
|
-
value: function hashCode() {
|
|
6529
|
-
return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
|
|
6530
|
-
}
|
|
6531
|
-
}, {
|
|
6532
|
-
key: "toString",
|
|
6533
|
-
value: function toString() {
|
|
6534
|
-
return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
|
|
6535
|
-
}
|
|
6536
|
-
}], [{
|
|
6537
|
-
key: "of",
|
|
6538
|
-
value: function of(firstDayOrLocale, minDays) {
|
|
6539
|
-
if (minDays === undefined) {
|
|
6540
|
-
return WeekFields.ofLocale(firstDayOrLocale);
|
|
6541
|
-
} else {
|
|
6542
|
-
return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
|
|
6543
|
-
}
|
|
6544
|
-
}
|
|
6545
|
-
}, {
|
|
6546
|
-
key: "ofLocale",
|
|
6547
|
-
value: function ofLocale(locale) {
|
|
6548
|
-
requireNonNull(locale, 'locale');
|
|
6549
|
-
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
|
|
6550
|
-
var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
|
|
6551
|
-
var worldRegion = '001';
|
|
6552
|
-
var weekData = cldr.get('supplemental/weekData');
|
|
6553
|
-
|
|
6554
|
-
var dow = _weekDayMap[weekData.firstDay[locale.country()]];
|
|
6555
|
-
|
|
6556
|
-
if (!dow) {
|
|
6557
|
-
dow = _weekDayMap[weekData.firstDay[worldRegion]];
|
|
6558
|
-
}
|
|
6337
|
+
_proto2.minimalDaysInFirstWeek = function minimalDaysInFirstWeek() {
|
|
6338
|
+
return this._minimalDays;
|
|
6339
|
+
};
|
|
6559
6340
|
|
|
6560
|
-
|
|
6341
|
+
_proto2.dayOfWeek = function dayOfWeek() {
|
|
6342
|
+
return this._dayOfWeek;
|
|
6343
|
+
};
|
|
6561
6344
|
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6345
|
+
_proto2.weekOfMonth = function weekOfMonth() {
|
|
6346
|
+
return this._weekOfMonth;
|
|
6347
|
+
};
|
|
6348
|
+
|
|
6349
|
+
_proto2.weekOfYear = function weekOfYear() {
|
|
6350
|
+
return this._weekOfYear;
|
|
6351
|
+
};
|
|
6352
|
+
|
|
6353
|
+
_proto2.weekOfWeekBasedYear = function weekOfWeekBasedYear() {
|
|
6354
|
+
return this._weekOfWeekBasedYear;
|
|
6355
|
+
};
|
|
6565
6356
|
|
|
6566
|
-
|
|
6357
|
+
_proto2.weekBasedYear = function weekBasedYear() {
|
|
6358
|
+
return this._weekBasedYear;
|
|
6359
|
+
};
|
|
6360
|
+
|
|
6361
|
+
_proto2.equals = function equals(other) {
|
|
6362
|
+
if (this === other) {
|
|
6363
|
+
return true;
|
|
6567
6364
|
}
|
|
6568
|
-
}, {
|
|
6569
|
-
key: "ofFirstDayOfWeekMinDays",
|
|
6570
|
-
value: function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
6571
|
-
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
6572
|
-
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
6573
|
-
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
6574
|
-
var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
|
|
6575
|
-
var rules = WeekFieldsCache.get(key);
|
|
6576
|
-
|
|
6577
|
-
if (rules == null) {
|
|
6578
|
-
rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
|
|
6579
|
-
WeekFieldsCache.set(key, rules);
|
|
6580
|
-
rules = WeekFieldsCache.get(key);
|
|
6581
|
-
}
|
|
6582
6365
|
|
|
6583
|
-
|
|
6366
|
+
if (other instanceof WeekFields) {
|
|
6367
|
+
return this.hashCode() === other.hashCode();
|
|
6584
6368
|
}
|
|
6585
|
-
|
|
6369
|
+
|
|
6370
|
+
return false;
|
|
6371
|
+
};
|
|
6372
|
+
|
|
6373
|
+
_proto2.hashCode = function hashCode() {
|
|
6374
|
+
return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
|
|
6375
|
+
};
|
|
6376
|
+
|
|
6377
|
+
_proto2.toString = function toString() {
|
|
6378
|
+
return "WeekFields[" + this._firstDayOfWeek + "," + this._minimalDays + "]";
|
|
6379
|
+
};
|
|
6586
6380
|
|
|
6587
6381
|
return WeekFields;
|
|
6588
6382
|
}();
|