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