@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)
|
|
@@ -2467,12 +2467,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2467
2467
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Locale; });
|
|
2468
2468
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_init", function() { return _init; });
|
|
2469
2469
|
/* harmony import */ var _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format/cldr/CldrDateTimeTextProvider */ "./src/format/cldr/CldrDateTimeTextProvider.js");
|
|
2470
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2471
|
-
|
|
2472
|
-
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); } }
|
|
2473
|
-
|
|
2474
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
2475
|
-
|
|
2476
2470
|
/*
|
|
2477
2471
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
2478
2472
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -2480,64 +2474,61 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
2480
2474
|
|
|
2481
2475
|
|
|
2482
2476
|
var Locale = function () {
|
|
2483
|
-
function
|
|
2484
|
-
|
|
2485
|
-
|
|
2477
|
+
Locale.getAvailableLocales = function getAvailableLocales() {
|
|
2478
|
+
return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
|
|
2479
|
+
};
|
|
2486
2480
|
|
|
2487
|
-
|
|
2481
|
+
function Locale(language, country, localeString) {
|
|
2482
|
+
if (country === void 0) {
|
|
2483
|
+
country = '';
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
if (localeString === void 0) {
|
|
2487
|
+
localeString = '';
|
|
2488
|
+
}
|
|
2488
2489
|
|
|
2489
2490
|
this._language = language;
|
|
2490
2491
|
this._country = country;
|
|
2491
2492
|
this._localeString = localeString;
|
|
2492
2493
|
}
|
|
2493
2494
|
|
|
2494
|
-
|
|
2495
|
-
key: "language",
|
|
2496
|
-
value: function language() {
|
|
2497
|
-
return this._language;
|
|
2498
|
-
}
|
|
2499
|
-
}, {
|
|
2500
|
-
key: "country",
|
|
2501
|
-
value: function country() {
|
|
2502
|
-
return this._country;
|
|
2503
|
-
}
|
|
2504
|
-
}, {
|
|
2505
|
-
key: "localeString",
|
|
2506
|
-
value: function localeString() {
|
|
2507
|
-
if (this._localeString.length > 0) {
|
|
2508
|
-
return this._localeString;
|
|
2509
|
-
}
|
|
2495
|
+
var _proto = Locale.prototype;
|
|
2510
2496
|
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2497
|
+
_proto.language = function language() {
|
|
2498
|
+
return this._language;
|
|
2499
|
+
};
|
|
2500
|
+
|
|
2501
|
+
_proto.country = function country() {
|
|
2502
|
+
return this._country;
|
|
2503
|
+
};
|
|
2504
|
+
|
|
2505
|
+
_proto.localeString = function localeString() {
|
|
2506
|
+
if (this._localeString.length > 0) {
|
|
2507
|
+
return this._localeString;
|
|
2516
2508
|
}
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2509
|
+
|
|
2510
|
+
if (this._country.length > 0) {
|
|
2511
|
+
return this._language + "-" + this._country;
|
|
2512
|
+
} else {
|
|
2513
|
+
return this._language;
|
|
2521
2514
|
}
|
|
2522
|
-
}
|
|
2523
|
-
key: "equals",
|
|
2524
|
-
value: function equals(other) {
|
|
2525
|
-
if (!other) {
|
|
2526
|
-
return false;
|
|
2527
|
-
}
|
|
2515
|
+
};
|
|
2528
2516
|
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2517
|
+
_proto.toString = function toString() {
|
|
2518
|
+
return "Locale[" + this.localeString() + "]";
|
|
2519
|
+
};
|
|
2532
2520
|
|
|
2533
|
-
|
|
2521
|
+
_proto.equals = function equals(other) {
|
|
2522
|
+
if (!other) {
|
|
2523
|
+
return false;
|
|
2534
2524
|
}
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
|
|
2525
|
+
|
|
2526
|
+
if (!(other instanceof Locale)) {
|
|
2527
|
+
return false;
|
|
2539
2528
|
}
|
|
2540
|
-
|
|
2529
|
+
|
|
2530
|
+
return this.localeString() === other.localeString();
|
|
2531
|
+
};
|
|
2541
2532
|
|
|
2542
2533
|
return Locale;
|
|
2543
2534
|
}();
|
|
@@ -2618,28 +2609,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2618
2609
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
2619
2610
|
/* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locale */ "./src/Locale.js");
|
|
2620
2611
|
/* harmony import */ var _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cldr/CldrDateTimeFormatterBuilder */ "./src/format/cldr/CldrDateTimeFormatterBuilder.js");
|
|
2621
|
-
function
|
|
2622
|
-
|
|
2623
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2624
|
-
|
|
2625
|
-
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); } }
|
|
2626
|
-
|
|
2627
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
2628
|
-
|
|
2629
|
-
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); }
|
|
2612
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
2630
2613
|
|
|
2631
2614
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
2632
2615
|
|
|
2633
|
-
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); }; }
|
|
2634
|
-
|
|
2635
|
-
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); }
|
|
2636
|
-
|
|
2637
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
2638
|
-
|
|
2639
|
-
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; } }
|
|
2640
|
-
|
|
2641
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
2642
|
-
|
|
2643
2616
|
/*
|
|
2644
2617
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
2645
2618
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -2650,28 +2623,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
2650
2623
|
var requireNonNull = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].assert.requireNonNull;
|
|
2651
2624
|
|
|
2652
2625
|
var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
var _super = _createSuper(LocaleDateTimeFormatter);
|
|
2626
|
+
_inheritsLoose(LocaleDateTimeFormatter, _DateTimeFormatter);
|
|
2656
2627
|
|
|
2657
2628
|
function LocaleDateTimeFormatter() {
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
return _super.apply(this, arguments);
|
|
2629
|
+
return _DateTimeFormatter.apply(this, arguments) || this;
|
|
2661
2630
|
}
|
|
2662
2631
|
|
|
2663
|
-
|
|
2664
|
-
key: "withLocale",
|
|
2665
|
-
value: function withLocale(locale) {
|
|
2666
|
-
requireNonNull(locale, 'locale');
|
|
2632
|
+
var _proto = LocaleDateTimeFormatter.prototype;
|
|
2667
2633
|
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
}
|
|
2634
|
+
_proto.withLocale = function withLocale(locale) {
|
|
2635
|
+
requireNonNull(locale, 'locale');
|
|
2671
2636
|
|
|
2672
|
-
|
|
2637
|
+
if (locale.equals(this._locale)) {
|
|
2638
|
+
return this;
|
|
2673
2639
|
}
|
|
2674
|
-
|
|
2640
|
+
|
|
2641
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
|
|
2642
|
+
};
|
|
2675
2643
|
|
|
2676
2644
|
return LocaleDateTimeFormatter;
|
|
2677
2645
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"]);
|
|
@@ -2717,12 +2685,6 @@ function _init() {
|
|
|
2717
2685
|
__webpack_require__.r(__webpack_exports__);
|
|
2718
2686
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEntry", function() { return createEntry; });
|
|
2719
2687
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleStore", function() { return LocaleStore; });
|
|
2720
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2721
|
-
|
|
2722
|
-
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); } }
|
|
2723
|
-
|
|
2724
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
2725
|
-
|
|
2726
2688
|
/*
|
|
2727
2689
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
2728
2690
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -2732,7 +2694,7 @@ var createEntry = function createEntry(text, field) {
|
|
|
2732
2694
|
key: text,
|
|
2733
2695
|
value: field,
|
|
2734
2696
|
toString: function toString() {
|
|
2735
|
-
return
|
|
2697
|
+
return text + "->" + field;
|
|
2736
2698
|
}
|
|
2737
2699
|
};
|
|
2738
2700
|
};
|
|
@@ -2743,8 +2705,6 @@ var _comparator = function _comparator(obj1, obj2) {
|
|
|
2743
2705
|
|
|
2744
2706
|
var LocaleStore = function () {
|
|
2745
2707
|
function LocaleStore(valueTextMap) {
|
|
2746
|
-
_classCallCheck(this, LocaleStore);
|
|
2747
|
-
|
|
2748
2708
|
this._valueTextMap = valueTextMap;
|
|
2749
2709
|
var map = {};
|
|
2750
2710
|
var allList = [];
|
|
@@ -2768,19 +2728,17 @@ var LocaleStore = function () {
|
|
|
2768
2728
|
this._parsable = map;
|
|
2769
2729
|
}
|
|
2770
2730
|
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
}
|
|
2783
|
-
}]);
|
|
2731
|
+
var _proto = LocaleStore.prototype;
|
|
2732
|
+
|
|
2733
|
+
_proto.getText = function getText(value, style) {
|
|
2734
|
+
var map = this._valueTextMap[style];
|
|
2735
|
+
return map != null ? map[value] : null;
|
|
2736
|
+
};
|
|
2737
|
+
|
|
2738
|
+
_proto.getTextIterator = function getTextIterator(style) {
|
|
2739
|
+
var list = this._parsable[style];
|
|
2740
|
+
return list != null ? list[Symbol.iterator]() : null;
|
|
2741
|
+
};
|
|
2784
2742
|
|
|
2785
2743
|
return LocaleStore;
|
|
2786
2744
|
}();
|
|
@@ -2863,28 +2821,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2863
2821
|
/* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
|
|
2864
2822
|
/* harmony import */ var _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser/LocalizedOffsetPrinterParser */ "./src/format/parser/LocalizedOffsetPrinterParser.js");
|
|
2865
2823
|
/* harmony import */ var _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../parser/WeekFieldsPrinterParser */ "./src/format/parser/WeekFieldsPrinterParser.js");
|
|
2866
|
-
function
|
|
2867
|
-
|
|
2868
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2869
|
-
|
|
2870
|
-
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); } }
|
|
2871
|
-
|
|
2872
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
2873
|
-
|
|
2874
|
-
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); }
|
|
2824
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
2875
2825
|
|
|
2876
2826
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
2877
2827
|
|
|
2878
|
-
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); }; }
|
|
2879
|
-
|
|
2880
|
-
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); }
|
|
2881
|
-
|
|
2882
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
2883
|
-
|
|
2884
|
-
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; } }
|
|
2885
|
-
|
|
2886
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
2887
|
-
|
|
2888
2828
|
/**
|
|
2889
2829
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
2890
2830
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -2902,98 +2842,87 @@ var _jodaInternal$assert = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].asser
|
|
|
2902
2842
|
requireInstance = _jodaInternal$assert.requireInstance;
|
|
2903
2843
|
|
|
2904
2844
|
var CldrDateTimeFormatterBuilder = function (_DateTimeFormatterBui) {
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
var _super = _createSuper(CldrDateTimeFormatterBuilder);
|
|
2845
|
+
_inheritsLoose(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
|
|
2908
2846
|
|
|
2909
2847
|
function CldrDateTimeFormatterBuilder() {
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
return _super.apply(this, arguments);
|
|
2848
|
+
return _DateTimeFormatterBui.apply(this, arguments) || this;
|
|
2913
2849
|
}
|
|
2914
2850
|
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
}
|
|
2925
|
-
}
|
|
2926
|
-
}, {
|
|
2927
|
-
key: "appendTextField",
|
|
2928
|
-
value: function appendTextField(field) {
|
|
2929
|
-
return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
|
|
2851
|
+
var _proto = CldrDateTimeFormatterBuilder.prototype;
|
|
2852
|
+
|
|
2853
|
+
_proto.appendText = function appendText(field, styleOrMap) {
|
|
2854
|
+
if (styleOrMap === undefined) {
|
|
2855
|
+
return this.appendTextField(field);
|
|
2856
|
+
} else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
|
|
2857
|
+
return this.appendTextFieldStyle(field, styleOrMap);
|
|
2858
|
+
} else {
|
|
2859
|
+
return this.appendTextFieldMap(field, styleOrMap);
|
|
2930
2860
|
}
|
|
2931
|
-
}
|
|
2932
|
-
key: "appendTextFieldStyle",
|
|
2933
|
-
value: function appendTextFieldStyle(field, textStyle) {
|
|
2934
|
-
requireNonNull(field, 'field');
|
|
2935
|
-
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
|
|
2936
|
-
requireNonNull(textStyle, 'textStyle');
|
|
2937
|
-
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
2861
|
+
};
|
|
2938
2862
|
|
|
2939
|
-
|
|
2863
|
+
_proto.appendTextField = function appendTextField(field) {
|
|
2864
|
+
return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
|
|
2865
|
+
};
|
|
2940
2866
|
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
requireNonNull(field, 'field');
|
|
2947
|
-
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
|
|
2948
|
-
requireNonNull(textLookup, 'textLookup');
|
|
2949
|
-
var copy = Object.assign({}, textLookup);
|
|
2950
|
-
var map = {};
|
|
2951
|
-
map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
|
|
2952
|
-
var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
|
|
2953
|
-
var provider = {
|
|
2954
|
-
getText: function getText(field, value, style) {
|
|
2955
|
-
return store.getText(value, style);
|
|
2956
|
-
},
|
|
2957
|
-
getTextIterator: function getTextIterator(field, style) {
|
|
2958
|
-
return store.getTextIterator(style);
|
|
2959
|
-
}
|
|
2960
|
-
};
|
|
2867
|
+
_proto.appendTextFieldStyle = function appendTextFieldStyle(field, textStyle) {
|
|
2868
|
+
requireNonNull(field, 'field');
|
|
2869
|
+
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
|
|
2870
|
+
requireNonNull(textStyle, 'textStyle');
|
|
2871
|
+
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
2961
2872
|
|
|
2962
|
-
|
|
2873
|
+
this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
|
|
2963
2874
|
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2875
|
+
return this;
|
|
2876
|
+
};
|
|
2877
|
+
|
|
2878
|
+
_proto.appendTextFieldMap = function appendTextFieldMap(field, textLookup) {
|
|
2879
|
+
requireNonNull(field, 'field');
|
|
2880
|
+
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
|
|
2881
|
+
requireNonNull(textLookup, 'textLookup');
|
|
2882
|
+
var copy = Object.assign({}, textLookup);
|
|
2883
|
+
var map = {};
|
|
2884
|
+
map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
|
|
2885
|
+
var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
|
|
2886
|
+
var provider = {
|
|
2887
|
+
getText: function getText(field, value, style) {
|
|
2888
|
+
return store.getText(value, style);
|
|
2889
|
+
},
|
|
2890
|
+
getTextIterator: function getTextIterator(field, style) {
|
|
2891
|
+
return store.getTextIterator(style);
|
|
2892
|
+
}
|
|
2893
|
+
};
|
|
2971
2894
|
|
|
2972
|
-
|
|
2895
|
+
this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
|
|
2973
2896
|
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
}, {
|
|
2977
|
-
key: "appendZoneText",
|
|
2978
|
-
value: function appendZoneText(textStyle) {
|
|
2979
|
-
this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
|
|
2897
|
+
return this;
|
|
2898
|
+
};
|
|
2980
2899
|
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
key: "appendLocalizedOffset",
|
|
2985
|
-
value: function appendLocalizedOffset(textStyle) {
|
|
2986
|
-
requireNonNull(textStyle, 'textStyle');
|
|
2900
|
+
_proto.appendWeekField = function appendWeekField(field, count) {
|
|
2901
|
+
requireNonNull(field, 'field');
|
|
2902
|
+
requireNonNull(count, 'count');
|
|
2987
2903
|
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2904
|
+
this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
|
|
2905
|
+
|
|
2906
|
+
return this;
|
|
2907
|
+
};
|
|
2991
2908
|
|
|
2992
|
-
|
|
2909
|
+
_proto.appendZoneText = function appendZoneText(textStyle) {
|
|
2910
|
+
this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
|
|
2993
2911
|
|
|
2994
|
-
|
|
2912
|
+
return this;
|
|
2913
|
+
};
|
|
2914
|
+
|
|
2915
|
+
_proto.appendLocalizedOffset = function appendLocalizedOffset(textStyle) {
|
|
2916
|
+
requireNonNull(textStyle, 'textStyle');
|
|
2917
|
+
|
|
2918
|
+
if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
|
|
2919
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
|
|
2995
2920
|
}
|
|
2996
|
-
|
|
2921
|
+
|
|
2922
|
+
this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
|
|
2923
|
+
|
|
2924
|
+
return this;
|
|
2925
|
+
};
|
|
2997
2926
|
|
|
2998
2927
|
return CldrDateTimeFormatterBuilder;
|
|
2999
2928
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"]);
|
|
@@ -3018,12 +2947,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3018
2947
|
/* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
|
|
3019
2948
|
/* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
|
|
3020
2949
|
/* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
|
|
3021
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3022
|
-
|
|
3023
|
-
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); } }
|
|
3024
|
-
|
|
3025
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3026
|
-
|
|
3027
2950
|
/*
|
|
3028
2951
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
3029
2952
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -3035,218 +2958,210 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
3035
2958
|
|
|
3036
2959
|
var CldrDateTimeTextProvider = function () {
|
|
3037
2960
|
function CldrDateTimeTextProvider() {
|
|
3038
|
-
_classCallCheck(this, CldrDateTimeTextProvider);
|
|
3039
|
-
|
|
3040
2961
|
this._cache = {};
|
|
3041
2962
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])('supplemental/likelySubtags.json');
|
|
3042
2963
|
}
|
|
3043
2964
|
|
|
3044
|
-
|
|
3045
|
-
key: "getAvailableLocales",
|
|
3046
|
-
value: function getAvailableLocales() {
|
|
3047
|
-
if (true) {
|
|
3048
|
-
return ["es.*"];
|
|
3049
|
-
}
|
|
2965
|
+
var _proto = CldrDateTimeTextProvider.prototype;
|
|
3050
2966
|
|
|
3051
|
-
|
|
2967
|
+
_proto.getAvailableLocales = function getAvailableLocales() {
|
|
2968
|
+
if (true) {
|
|
2969
|
+
return ["es.*"];
|
|
3052
2970
|
}
|
|
3053
|
-
}, {
|
|
3054
|
-
key: "getText",
|
|
3055
|
-
value: function getText(field, value, style, locale) {
|
|
3056
|
-
var store = this._findStore(field, locale);
|
|
3057
2971
|
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
}
|
|
2972
|
+
return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
|
|
2973
|
+
};
|
|
3061
2974
|
|
|
3062
|
-
|
|
2975
|
+
_proto.getText = function getText(field, value, style, locale) {
|
|
2976
|
+
var store = this._findStore(field, locale);
|
|
2977
|
+
|
|
2978
|
+
if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
|
|
2979
|
+
return store.getText(value, style);
|
|
3063
2980
|
}
|
|
3064
|
-
}, {
|
|
3065
|
-
key: "getTextIterator",
|
|
3066
|
-
value: function getTextIterator(field, style, locale) {
|
|
3067
|
-
var store = this._findStore(field, locale);
|
|
3068
2981
|
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
}
|
|
2982
|
+
return null;
|
|
2983
|
+
};
|
|
3072
2984
|
|
|
3073
|
-
|
|
2985
|
+
_proto.getTextIterator = function getTextIterator(field, style, locale) {
|
|
2986
|
+
var store = this._findStore(field, locale);
|
|
2987
|
+
|
|
2988
|
+
if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
|
|
2989
|
+
return store.getTextIterator(style);
|
|
3074
2990
|
}
|
|
3075
|
-
}, {
|
|
3076
|
-
key: "_findStore",
|
|
3077
|
-
value: function _findStore(field, locale) {
|
|
3078
|
-
var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
|
|
3079
|
-
var store = this._cache[key];
|
|
3080
|
-
|
|
3081
|
-
if (store === undefined) {
|
|
3082
|
-
store = this._createStore(field, locale);
|
|
3083
|
-
this._cache[key] = store;
|
|
3084
|
-
}
|
|
3085
2991
|
|
|
3086
|
-
|
|
2992
|
+
return null;
|
|
2993
|
+
};
|
|
2994
|
+
|
|
2995
|
+
_proto._findStore = function _findStore(field, locale) {
|
|
2996
|
+
var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
|
|
2997
|
+
var store = this._cache[key];
|
|
2998
|
+
|
|
2999
|
+
if (store === undefined) {
|
|
3000
|
+
store = this._createStore(field, locale);
|
|
3001
|
+
this._cache[key] = store;
|
|
3087
3002
|
}
|
|
3088
|
-
}, {
|
|
3089
|
-
key: "_createStore",
|
|
3090
|
-
value: function _createStore(field, locale) {
|
|
3091
|
-
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/".concat(locale.localeString(), "/ca-gregorian.json"));
|
|
3092
|
-
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
|
|
3093
|
-
|
|
3094
|
-
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
|
|
3095
|
-
var monthsData = cldr.main('dates/calendars/gregorian/months/format');
|
|
3096
|
-
var styleMap = {};
|
|
3097
|
-
var data = {};
|
|
3098
|
-
data[1] = monthsData.wide[1];
|
|
3099
|
-
data[2] = monthsData.wide[2];
|
|
3100
|
-
data[3] = monthsData.wide[3];
|
|
3101
|
-
data[4] = monthsData.wide[4];
|
|
3102
|
-
data[5] = monthsData.wide[5];
|
|
3103
|
-
data[6] = monthsData.wide[6];
|
|
3104
|
-
data[7] = monthsData.wide[7];
|
|
3105
|
-
data[8] = monthsData.wide[8];
|
|
3106
|
-
data[9] = monthsData.wide[9];
|
|
3107
|
-
data[10] = monthsData.wide[10];
|
|
3108
|
-
data[11] = monthsData.wide[11];
|
|
3109
|
-
data[12] = monthsData.wide[12];
|
|
3110
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
|
|
3111
|
-
data = {};
|
|
3112
|
-
data[1] = monthsData.narrow[1];
|
|
3113
|
-
data[2] = monthsData.narrow[2];
|
|
3114
|
-
data[3] = monthsData.narrow[3];
|
|
3115
|
-
data[4] = monthsData.narrow[4];
|
|
3116
|
-
data[5] = monthsData.narrow[5];
|
|
3117
|
-
data[6] = monthsData.narrow[6];
|
|
3118
|
-
data[7] = monthsData.narrow[7];
|
|
3119
|
-
data[8] = monthsData.narrow[8];
|
|
3120
|
-
data[9] = monthsData.narrow[9];
|
|
3121
|
-
data[10] = monthsData.narrow[10];
|
|
3122
|
-
data[11] = monthsData.narrow[11];
|
|
3123
|
-
data[12] = monthsData.narrow[12];
|
|
3124
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
|
|
3125
|
-
data = {};
|
|
3126
|
-
data[1] = monthsData.abbreviated[1];
|
|
3127
|
-
data[2] = monthsData.abbreviated[2];
|
|
3128
|
-
data[3] = monthsData.abbreviated[3];
|
|
3129
|
-
data[4] = monthsData.abbreviated[4];
|
|
3130
|
-
data[5] = monthsData.abbreviated[5];
|
|
3131
|
-
data[6] = monthsData.abbreviated[6];
|
|
3132
|
-
data[7] = monthsData.abbreviated[7];
|
|
3133
|
-
data[8] = monthsData.abbreviated[8];
|
|
3134
|
-
data[9] = monthsData.abbreviated[9];
|
|
3135
|
-
data[10] = monthsData.abbreviated[10];
|
|
3136
|
-
data[11] = monthsData.abbreviated[11];
|
|
3137
|
-
data[12] = monthsData.abbreviated[12];
|
|
3138
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
|
|
3139
|
-
return this._createLocaleStore(styleMap);
|
|
3140
|
-
}
|
|
3141
3003
|
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
var _styleMap = {};
|
|
3145
|
-
var _data = {};
|
|
3146
|
-
_data[1] = daysData.wide.mon;
|
|
3147
|
-
_data[2] = daysData.wide.tue;
|
|
3148
|
-
_data[3] = daysData.wide.wed;
|
|
3149
|
-
_data[4] = daysData.wide.thu;
|
|
3150
|
-
_data[5] = daysData.wide.fri;
|
|
3151
|
-
_data[6] = daysData.wide.sat;
|
|
3152
|
-
_data[7] = daysData.wide.sun;
|
|
3153
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
|
|
3154
|
-
_data = {};
|
|
3155
|
-
_data[1] = daysData.narrow.mon;
|
|
3156
|
-
_data[2] = daysData.narrow.tue;
|
|
3157
|
-
_data[3] = daysData.narrow.wed;
|
|
3158
|
-
_data[4] = daysData.narrow.thu;
|
|
3159
|
-
_data[5] = daysData.narrow.fri;
|
|
3160
|
-
_data[6] = daysData.narrow.sat;
|
|
3161
|
-
_data[7] = daysData.narrow.sun;
|
|
3162
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
|
|
3163
|
-
_data = {};
|
|
3164
|
-
_data[1] = daysData.abbreviated.mon;
|
|
3165
|
-
_data[2] = daysData.abbreviated.tue;
|
|
3166
|
-
_data[3] = daysData.abbreviated.wed;
|
|
3167
|
-
_data[4] = daysData.abbreviated.thu;
|
|
3168
|
-
_data[5] = daysData.abbreviated.fri;
|
|
3169
|
-
_data[6] = daysData.abbreviated.sat;
|
|
3170
|
-
_data[7] = daysData.abbreviated.sun;
|
|
3171
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
|
|
3172
|
-
return this._createLocaleStore(_styleMap);
|
|
3173
|
-
}
|
|
3004
|
+
return store;
|
|
3005
|
+
};
|
|
3174
3006
|
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3007
|
+
_proto._createStore = function _createStore(field, locale) {
|
|
3008
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/" + locale.localeString() + "/ca-gregorian.json");
|
|
3009
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
|
|
3010
|
+
|
|
3011
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
|
|
3012
|
+
var monthsData = cldr.main('dates/calendars/gregorian/months/format');
|
|
3013
|
+
var styleMap = {};
|
|
3014
|
+
var data = {};
|
|
3015
|
+
data[1] = monthsData.wide[1];
|
|
3016
|
+
data[2] = monthsData.wide[2];
|
|
3017
|
+
data[3] = monthsData.wide[3];
|
|
3018
|
+
data[4] = monthsData.wide[4];
|
|
3019
|
+
data[5] = monthsData.wide[5];
|
|
3020
|
+
data[6] = monthsData.wide[6];
|
|
3021
|
+
data[7] = monthsData.wide[7];
|
|
3022
|
+
data[8] = monthsData.wide[8];
|
|
3023
|
+
data[9] = monthsData.wide[9];
|
|
3024
|
+
data[10] = monthsData.wide[10];
|
|
3025
|
+
data[11] = monthsData.wide[11];
|
|
3026
|
+
data[12] = monthsData.wide[12];
|
|
3027
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
|
|
3028
|
+
data = {};
|
|
3029
|
+
data[1] = monthsData.narrow[1];
|
|
3030
|
+
data[2] = monthsData.narrow[2];
|
|
3031
|
+
data[3] = monthsData.narrow[3];
|
|
3032
|
+
data[4] = monthsData.narrow[4];
|
|
3033
|
+
data[5] = monthsData.narrow[5];
|
|
3034
|
+
data[6] = monthsData.narrow[6];
|
|
3035
|
+
data[7] = monthsData.narrow[7];
|
|
3036
|
+
data[8] = monthsData.narrow[8];
|
|
3037
|
+
data[9] = monthsData.narrow[9];
|
|
3038
|
+
data[10] = monthsData.narrow[10];
|
|
3039
|
+
data[11] = monthsData.narrow[11];
|
|
3040
|
+
data[12] = monthsData.narrow[12];
|
|
3041
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
|
|
3042
|
+
data = {};
|
|
3043
|
+
data[1] = monthsData.abbreviated[1];
|
|
3044
|
+
data[2] = monthsData.abbreviated[2];
|
|
3045
|
+
data[3] = monthsData.abbreviated[3];
|
|
3046
|
+
data[4] = monthsData.abbreviated[4];
|
|
3047
|
+
data[5] = monthsData.abbreviated[5];
|
|
3048
|
+
data[6] = monthsData.abbreviated[6];
|
|
3049
|
+
data[7] = monthsData.abbreviated[7];
|
|
3050
|
+
data[8] = monthsData.abbreviated[8];
|
|
3051
|
+
data[9] = monthsData.abbreviated[9];
|
|
3052
|
+
data[10] = monthsData.abbreviated[10];
|
|
3053
|
+
data[11] = monthsData.abbreviated[11];
|
|
3054
|
+
data[12] = monthsData.abbreviated[12];
|
|
3055
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
|
|
3056
|
+
return this._createLocaleStore(styleMap);
|
|
3057
|
+
}
|
|
3192
3058
|
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3059
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
|
|
3060
|
+
var daysData = cldr.main('dates/calendars/gregorian/days/format');
|
|
3061
|
+
var _styleMap = {};
|
|
3062
|
+
var _data = {};
|
|
3063
|
+
_data[1] = daysData.wide.mon;
|
|
3064
|
+
_data[2] = daysData.wide.tue;
|
|
3065
|
+
_data[3] = daysData.wide.wed;
|
|
3066
|
+
_data[4] = daysData.wide.thu;
|
|
3067
|
+
_data[5] = daysData.wide.fri;
|
|
3068
|
+
_data[6] = daysData.wide.sat;
|
|
3069
|
+
_data[7] = daysData.wide.sun;
|
|
3070
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
|
|
3071
|
+
_data = {};
|
|
3072
|
+
_data[1] = daysData.narrow.mon;
|
|
3073
|
+
_data[2] = daysData.narrow.tue;
|
|
3074
|
+
_data[3] = daysData.narrow.wed;
|
|
3075
|
+
_data[4] = daysData.narrow.thu;
|
|
3076
|
+
_data[5] = daysData.narrow.fri;
|
|
3077
|
+
_data[6] = daysData.narrow.sat;
|
|
3078
|
+
_data[7] = daysData.narrow.sun;
|
|
3079
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
|
|
3080
|
+
_data = {};
|
|
3081
|
+
_data[1] = daysData.abbreviated.mon;
|
|
3082
|
+
_data[2] = daysData.abbreviated.tue;
|
|
3083
|
+
_data[3] = daysData.abbreviated.wed;
|
|
3084
|
+
_data[4] = daysData.abbreviated.thu;
|
|
3085
|
+
_data[5] = daysData.abbreviated.fri;
|
|
3086
|
+
_data[6] = daysData.abbreviated.sat;
|
|
3087
|
+
_data[7] = daysData.abbreviated.sun;
|
|
3088
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
|
|
3089
|
+
return this._createLocaleStore(_styleMap);
|
|
3090
|
+
}
|
|
3210
3091
|
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
_data4[2] = quartersData.abbreviated['2'];
|
|
3229
|
-
_data4[3] = quartersData.abbreviated['3'];
|
|
3230
|
-
_data4[4] = quartersData.abbreviated['4'];
|
|
3231
|
-
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
|
|
3232
|
-
return this._createLocaleStore(_styleMap4);
|
|
3233
|
-
}
|
|
3092
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
|
|
3093
|
+
var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
|
|
3094
|
+
var _styleMap2 = {};
|
|
3095
|
+
var _data2 = {};
|
|
3096
|
+
_data2[0] = dayPeriodsData.wide.am;
|
|
3097
|
+
_data2[1] = dayPeriodsData.wide.pm;
|
|
3098
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
|
|
3099
|
+
_data2 = {};
|
|
3100
|
+
_data2[0] = dayPeriodsData.narrow.am;
|
|
3101
|
+
_data2[1] = dayPeriodsData.narrow.pm;
|
|
3102
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
|
|
3103
|
+
_data2 = {};
|
|
3104
|
+
_data2[0] = dayPeriodsData.abbreviated.am;
|
|
3105
|
+
_data2[1] = dayPeriodsData.abbreviated.pm;
|
|
3106
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
|
|
3107
|
+
return this._createLocaleStore(_styleMap2);
|
|
3108
|
+
}
|
|
3234
3109
|
|
|
3235
|
-
|
|
3110
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
|
|
3111
|
+
var erasData = cldr.main('dates/calendars/gregorian/eras');
|
|
3112
|
+
var _styleMap3 = {};
|
|
3113
|
+
var _data3 = {};
|
|
3114
|
+
_data3[0] = erasData.eraNames['0'];
|
|
3115
|
+
_data3[1] = erasData.eraNames['1'];
|
|
3116
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
|
|
3117
|
+
_data3 = {};
|
|
3118
|
+
_data3[0] = erasData.eraNarrow['0'];
|
|
3119
|
+
_data3[1] = erasData.eraNarrow['1'];
|
|
3120
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
|
|
3121
|
+
_data3 = {};
|
|
3122
|
+
_data3[0] = erasData.eraAbbr['0'];
|
|
3123
|
+
_data3[1] = erasData.eraAbbr['1'];
|
|
3124
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
|
|
3125
|
+
return this._createLocaleStore(_styleMap3);
|
|
3236
3126
|
}
|
|
3237
|
-
}, {
|
|
3238
|
-
key: "_createLocaleStore",
|
|
3239
|
-
value: function _createLocaleStore(valueTextMap) {
|
|
3240
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
|
|
3241
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
|
|
3242
|
-
|
|
3243
|
-
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) {
|
|
3244
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
|
|
3245
|
-
}
|
|
3246
3127
|
|
|
3247
|
-
|
|
3128
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
|
|
3129
|
+
var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
|
|
3130
|
+
var _styleMap4 = {};
|
|
3131
|
+
var _data4 = {};
|
|
3132
|
+
_data4[1] = quartersData.wide['1'];
|
|
3133
|
+
_data4[2] = quartersData.wide['2'];
|
|
3134
|
+
_data4[3] = quartersData.wide['3'];
|
|
3135
|
+
_data4[4] = quartersData.wide['4'];
|
|
3136
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
|
|
3137
|
+
_data4 = {};
|
|
3138
|
+
_data4[1] = quartersData.narrow['1'];
|
|
3139
|
+
_data4[2] = quartersData.narrow['2'];
|
|
3140
|
+
_data4[3] = quartersData.narrow['3'];
|
|
3141
|
+
_data4[4] = quartersData.narrow['4'];
|
|
3142
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
|
|
3143
|
+
_data4 = {};
|
|
3144
|
+
_data4[1] = quartersData.abbreviated['1'];
|
|
3145
|
+
_data4[2] = quartersData.abbreviated['2'];
|
|
3146
|
+
_data4[3] = quartersData.abbreviated['3'];
|
|
3147
|
+
_data4[4] = quartersData.abbreviated['4'];
|
|
3148
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
|
|
3149
|
+
return this._createLocaleStore(_styleMap4);
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
return null;
|
|
3153
|
+
};
|
|
3154
|
+
|
|
3155
|
+
_proto._createLocaleStore = function _createLocaleStore(valueTextMap) {
|
|
3156
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
|
|
3157
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
|
|
3158
|
+
|
|
3159
|
+
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) {
|
|
3160
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
|
|
3248
3161
|
}
|
|
3249
|
-
|
|
3162
|
+
|
|
3163
|
+
return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
|
|
3164
|
+
};
|
|
3250
3165
|
|
|
3251
3166
|
return CldrDateTimeTextProvider;
|
|
3252
3167
|
}();
|
|
@@ -3268,18 +3183,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3268
3183
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
3269
3184
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3270
3185
|
/* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
|
|
3271
|
-
function
|
|
3186
|
+
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."); }
|
|
3272
3187
|
|
|
3273
3188
|
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); }
|
|
3274
3189
|
|
|
3275
3190
|
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; }
|
|
3276
3191
|
|
|
3277
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3278
|
-
|
|
3279
|
-
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); } }
|
|
3280
|
-
|
|
3281
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3282
|
-
|
|
3283
3192
|
/*
|
|
3284
3193
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
3285
3194
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -3304,8 +3213,6 @@ var resolveZoneIdTextCache = {};
|
|
|
3304
3213
|
|
|
3305
3214
|
var CldrZoneTextPrinterParser = function () {
|
|
3306
3215
|
function CldrZoneTextPrinterParser(textStyle) {
|
|
3307
|
-
_classCallCheck(this, CldrZoneTextPrinterParser);
|
|
3308
|
-
|
|
3309
3216
|
requireNonNull(textStyle, 'textStyle');
|
|
3310
3217
|
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
3311
3218
|
this._textStyle = textStyle;
|
|
@@ -3314,202 +3221,178 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3314
3221
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/metaZones.json');
|
|
3315
3222
|
}
|
|
3316
3223
|
|
|
3317
|
-
|
|
3318
|
-
key: "_cachedResolveZoneIdText",
|
|
3319
|
-
value: function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
|
|
3320
|
-
if (resolveZoneIdTextCache[cldr.locale] == null) {
|
|
3321
|
-
resolveZoneIdTextCache[cldr.locale] = {};
|
|
3322
|
-
}
|
|
3224
|
+
var _proto = CldrZoneTextPrinterParser.prototype;
|
|
3323
3225
|
|
|
3324
|
-
|
|
3226
|
+
_proto._cachedResolveZoneIdText = function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
|
|
3227
|
+
if (resolveZoneIdTextCache[cldr.locale] == null) {
|
|
3228
|
+
resolveZoneIdTextCache[cldr.locale] = {};
|
|
3229
|
+
}
|
|
3325
3230
|
|
|
3326
|
-
|
|
3327
|
-
zoneIdToStyle[zoneId] = {};
|
|
3328
|
-
}
|
|
3231
|
+
var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
|
|
3329
3232
|
|
|
3330
|
-
|
|
3233
|
+
if (zoneIdToStyle[zoneId] == null) {
|
|
3234
|
+
zoneIdToStyle[zoneId] = {};
|
|
3235
|
+
}
|
|
3331
3236
|
|
|
3332
|
-
|
|
3333
|
-
styleToType[style] = {};
|
|
3334
|
-
}
|
|
3237
|
+
var styleToType = zoneIdToStyle[zoneId];
|
|
3335
3238
|
|
|
3336
|
-
|
|
3239
|
+
if (styleToType[style] == null) {
|
|
3240
|
+
styleToType[style] = {};
|
|
3241
|
+
}
|
|
3337
3242
|
|
|
3338
|
-
|
|
3339
|
-
typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
|
|
3340
|
-
}
|
|
3243
|
+
var typeToResolvedZoneIdText = styleToType[style];
|
|
3341
3244
|
|
|
3342
|
-
|
|
3245
|
+
if (typeToResolvedZoneIdText[type] == null) {
|
|
3246
|
+
typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
|
|
3343
3247
|
}
|
|
3344
|
-
}, {
|
|
3345
|
-
key: "_resolveZoneIdText",
|
|
3346
|
-
value: function _resolveZoneIdText(cldr, zoneId, style, type) {
|
|
3347
|
-
var zoneData = cldr.main("dates/timeZoneNames/zone/".concat(zoneId, "/").concat(style, "/").concat(type));
|
|
3348
3248
|
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3249
|
+
return typeToResolvedZoneIdText[type];
|
|
3250
|
+
};
|
|
3251
|
+
|
|
3252
|
+
_proto._resolveZoneIdText = function _resolveZoneIdText(cldr, zoneId, style, type) {
|
|
3253
|
+
var zoneData = cldr.main("dates/timeZoneNames/zone/" + zoneId + "/" + style + "/" + type);
|
|
3254
|
+
|
|
3255
|
+
if (zoneData) {
|
|
3256
|
+
return zoneData;
|
|
3257
|
+
} else {
|
|
3258
|
+
var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/" + zoneId);
|
|
3259
|
+
|
|
3260
|
+
if (metazoneInfo) {
|
|
3261
|
+
var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
|
|
3262
|
+
var metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/" + type);
|
|
3353
3263
|
|
|
3354
|
-
if (
|
|
3355
|
-
|
|
3356
|
-
|
|
3264
|
+
if (metaZoneData) {
|
|
3265
|
+
return metaZoneData;
|
|
3266
|
+
} else {
|
|
3267
|
+
metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/generic");
|
|
3268
|
+
|
|
3269
|
+
if (!metaZoneData) {
|
|
3270
|
+
metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/standard");
|
|
3271
|
+
}
|
|
3357
3272
|
|
|
3358
3273
|
if (metaZoneData) {
|
|
3359
3274
|
return metaZoneData;
|
|
3360
3275
|
} else {
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
if (!metaZoneData) {
|
|
3364
|
-
metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/standard"));
|
|
3365
|
-
}
|
|
3276
|
+
var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
|
|
3277
|
+
var preferredZone = mapZones[metazone][cldr.attributes.territory];
|
|
3366
3278
|
|
|
3367
|
-
if (
|
|
3368
|
-
|
|
3279
|
+
if (preferredZone) {
|
|
3280
|
+
if (preferredZone !== zoneId) {
|
|
3281
|
+
return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
|
|
3282
|
+
}
|
|
3369
3283
|
} else {
|
|
3370
|
-
var
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
if (preferredZone !== zoneId) {
|
|
3375
|
-
return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
|
|
3376
|
-
}
|
|
3377
|
-
} else {
|
|
3378
|
-
var goldenZone = mapZones[metazone]['001'];
|
|
3379
|
-
|
|
3380
|
-
if (goldenZone !== zoneId) {
|
|
3381
|
-
return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
|
|
3382
|
-
}
|
|
3284
|
+
var goldenZone = mapZones[metazone]['001'];
|
|
3285
|
+
|
|
3286
|
+
if (goldenZone !== zoneId) {
|
|
3287
|
+
return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
|
|
3383
3288
|
}
|
|
3384
3289
|
}
|
|
3385
3290
|
}
|
|
3386
3291
|
}
|
|
3387
3292
|
}
|
|
3388
3293
|
}
|
|
3389
|
-
}
|
|
3390
|
-
key: "print",
|
|
3391
|
-
value: function print(context, buf) {
|
|
3392
|
-
var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
|
|
3393
|
-
|
|
3394
|
-
if (zone == null) {
|
|
3395
|
-
return false;
|
|
3396
|
-
}
|
|
3397
|
-
|
|
3398
|
-
if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
|
|
3399
|
-
buf.append(zone.id());
|
|
3400
|
-
return true;
|
|
3401
|
-
}
|
|
3402
|
-
|
|
3403
|
-
var daylight = false;
|
|
3404
|
-
var hasDaylightSupport = false;
|
|
3405
|
-
var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
|
|
3406
|
-
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
3407
|
-
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(context.locale().localeString(), "/timeZoneNames.json"));
|
|
3408
|
-
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
|
|
3294
|
+
};
|
|
3409
3295
|
|
|
3410
|
-
|
|
3296
|
+
_proto.print = function print(context, buf) {
|
|
3297
|
+
var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
|
|
3411
3298
|
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
buf.append(zone.id());
|
|
3416
|
-
}
|
|
3299
|
+
if (zone == null) {
|
|
3300
|
+
return false;
|
|
3301
|
+
}
|
|
3417
3302
|
|
|
3303
|
+
if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
|
|
3304
|
+
buf.append(zone.id());
|
|
3418
3305
|
return true;
|
|
3419
3306
|
}
|
|
3420
|
-
}, {
|
|
3421
|
-
key: "_resolveZoneIds",
|
|
3422
|
-
value: function _resolveZoneIds(localString) {
|
|
3423
|
-
if (this._zoneIdsLocales[localString] != null) {
|
|
3424
|
-
return this._zoneIdsLocales[localString];
|
|
3425
|
-
}
|
|
3426
3307
|
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3308
|
+
var daylight = false;
|
|
3309
|
+
var hasDaylightSupport = false;
|
|
3310
|
+
var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
|
|
3311
|
+
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
3312
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + context.locale().localeString() + "/timeZoneNames.json");
|
|
3313
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
|
|
3430
3314
|
|
|
3431
|
-
|
|
3432
|
-
_step;
|
|
3315
|
+
var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
|
|
3433
3316
|
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3317
|
+
if (text) {
|
|
3318
|
+
buf.append(text);
|
|
3319
|
+
} else {
|
|
3320
|
+
buf.append(zone.id());
|
|
3321
|
+
}
|
|
3439
3322
|
|
|
3440
|
-
|
|
3323
|
+
return true;
|
|
3324
|
+
};
|
|
3441
3325
|
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3326
|
+
_proto._resolveZoneIds = function _resolveZoneIds(localString) {
|
|
3327
|
+
if (this._zoneIdsLocales[localString] != null) {
|
|
3328
|
+
return this._zoneIdsLocales[localString];
|
|
3329
|
+
}
|
|
3445
3330
|
|
|
3446
|
-
|
|
3331
|
+
var ids = {};
|
|
3332
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + localString + "/timeZoneNames.json");
|
|
3333
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
|
|
3447
3334
|
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3335
|
+
for (var _iterator = _createForOfIteratorHelperLoose(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()), _step; !(_step = _iterator()).done;) {
|
|
3336
|
+
var id = _step.value;
|
|
3337
|
+
ids[id] = id;
|
|
3338
|
+
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
3451
3339
|
|
|
3452
|
-
|
|
3340
|
+
var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
|
|
3453
3341
|
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
}
|
|
3457
|
-
}
|
|
3458
|
-
} catch (err) {
|
|
3459
|
-
_iterator.e(err);
|
|
3460
|
-
} finally {
|
|
3461
|
-
_iterator.f();
|
|
3342
|
+
if (genericText) {
|
|
3343
|
+
ids[genericText] = id;
|
|
3462
3344
|
}
|
|
3463
3345
|
|
|
3464
|
-
var
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
};
|
|
3469
|
-
return this._zoneIdsLocales[localString];
|
|
3470
|
-
}
|
|
3471
|
-
}, {
|
|
3472
|
-
key: "parse",
|
|
3473
|
-
value: function parse(context, text, position) {
|
|
3474
|
-
for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
|
|
3475
|
-
var name = _arr[_i];
|
|
3476
|
-
|
|
3477
|
-
if (context.subSequenceEquals(text, position, name, 0, name.length)) {
|
|
3478
|
-
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
|
|
3479
|
-
return position + name.length;
|
|
3480
|
-
}
|
|
3346
|
+
var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
|
|
3347
|
+
|
|
3348
|
+
if (standardText) {
|
|
3349
|
+
ids[standardText] = id;
|
|
3481
3350
|
}
|
|
3482
3351
|
|
|
3483
|
-
var
|
|
3484
|
-
ids = _this$_resolveZoneIds.ids,
|
|
3485
|
-
sortedKeys = _this$_resolveZoneIds.sortedKeys;
|
|
3352
|
+
var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
|
|
3486
3353
|
|
|
3487
|
-
|
|
3488
|
-
|
|
3354
|
+
if (daylightText) {
|
|
3355
|
+
ids[daylightText] = id;
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3489
3358
|
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3359
|
+
var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
|
|
3360
|
+
this._zoneIdsLocales[localString] = {
|
|
3361
|
+
ids: ids,
|
|
3362
|
+
sortedKeys: sortedKeys
|
|
3363
|
+
};
|
|
3364
|
+
return this._zoneIdsLocales[localString];
|
|
3365
|
+
};
|
|
3493
3366
|
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
}
|
|
3498
|
-
}
|
|
3499
|
-
} catch (err) {
|
|
3500
|
-
_iterator2.e(err);
|
|
3501
|
-
} finally {
|
|
3502
|
-
_iterator2.f();
|
|
3503
|
-
}
|
|
3367
|
+
_proto.parse = function parse(context, text, position) {
|
|
3368
|
+
for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
|
|
3369
|
+
var name = _arr[_i];
|
|
3504
3370
|
|
|
3505
|
-
|
|
3371
|
+
if (context.subSequenceEquals(text, position, name, 0, name.length)) {
|
|
3372
|
+
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
|
|
3373
|
+
return position + name.length;
|
|
3374
|
+
}
|
|
3506
3375
|
}
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3376
|
+
|
|
3377
|
+
var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
|
|
3378
|
+
ids = _this$_resolveZoneIds.ids,
|
|
3379
|
+
sortedKeys = _this$_resolveZoneIds.sortedKeys;
|
|
3380
|
+
|
|
3381
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(sortedKeys), _step2; !(_step2 = _iterator2()).done;) {
|
|
3382
|
+
var _name = _step2.value;
|
|
3383
|
+
|
|
3384
|
+
if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
|
|
3385
|
+
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
|
|
3386
|
+
return position + _name.length;
|
|
3387
|
+
}
|
|
3511
3388
|
}
|
|
3512
|
-
|
|
3389
|
+
|
|
3390
|
+
return ~position;
|
|
3391
|
+
};
|
|
3392
|
+
|
|
3393
|
+
_proto.toString = function toString() {
|
|
3394
|
+
return "ZoneText(" + this._textStyle + ")";
|
|
3395
|
+
};
|
|
3513
3396
|
|
|
3514
3397
|
return CldrZoneTextPrinterParser;
|
|
3515
3398
|
}();
|
|
@@ -3530,12 +3413,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3530
3413
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocalizedOffsetPrinterParser; });
|
|
3531
3414
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
3532
3415
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3533
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3534
|
-
|
|
3535
|
-
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); } }
|
|
3536
|
-
|
|
3537
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3538
|
-
|
|
3539
3416
|
/**
|
|
3540
3417
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
3541
3418
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -3546,180 +3423,174 @@ var MathUtil = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].MathUtil;
|
|
|
3546
3423
|
|
|
3547
3424
|
var LocalizedOffsetPrinterParser = function () {
|
|
3548
3425
|
function LocalizedOffsetPrinterParser(textStyle) {
|
|
3549
|
-
_classCallCheck(this, LocalizedOffsetPrinterParser);
|
|
3550
|
-
|
|
3551
3426
|
this._textStyle = textStyle;
|
|
3552
3427
|
}
|
|
3553
3428
|
|
|
3554
|
-
|
|
3555
|
-
key: "textStyle",
|
|
3556
|
-
value: function textStyle() {
|
|
3557
|
-
return this._textStyle;
|
|
3558
|
-
}
|
|
3559
|
-
}, {
|
|
3560
|
-
key: "print",
|
|
3561
|
-
value: function print(context, buf) {
|
|
3562
|
-
var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
|
|
3429
|
+
var _proto = LocalizedOffsetPrinterParser.prototype;
|
|
3563
3430
|
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3431
|
+
_proto.textStyle = function textStyle() {
|
|
3432
|
+
return this._textStyle;
|
|
3433
|
+
};
|
|
3567
3434
|
|
|
3568
|
-
|
|
3435
|
+
_proto.print = function print(context, buf) {
|
|
3436
|
+
var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
|
|
3569
3437
|
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3438
|
+
if (offsetSecs == null) {
|
|
3439
|
+
return false;
|
|
3440
|
+
}
|
|
3573
3441
|
|
|
3574
|
-
|
|
3442
|
+
buf.append('GMT');
|
|
3575
3443
|
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
|
|
3580
|
-
buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
|
|
3444
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
3445
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
|
|
3446
|
+
}
|
|
3581
3447
|
|
|
3582
|
-
|
|
3583
|
-
buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
|
|
3448
|
+
var totalSecs = MathUtil.safeToInt(offsetSecs);
|
|
3584
3449
|
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3450
|
+
if (totalSecs !== 0) {
|
|
3451
|
+
var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
|
|
3452
|
+
var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
|
|
3453
|
+
var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
|
|
3454
|
+
buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
|
|
3455
|
+
|
|
3456
|
+
if (absMinutes > 0 || absSeconds > 0) {
|
|
3457
|
+
buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
|
|
3458
|
+
|
|
3459
|
+
if (absSeconds > 0) {
|
|
3460
|
+
buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
|
|
3588
3461
|
}
|
|
3589
3462
|
}
|
|
3590
|
-
|
|
3591
|
-
return true;
|
|
3592
3463
|
}
|
|
3593
|
-
}, {
|
|
3594
|
-
key: "parse",
|
|
3595
|
-
value: function parse(context, text, position) {
|
|
3596
|
-
if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
|
|
3597
|
-
return ~position;
|
|
3598
|
-
}
|
|
3599
3464
|
|
|
3600
|
-
|
|
3465
|
+
return true;
|
|
3466
|
+
};
|
|
3601
3467
|
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3468
|
+
_proto.parse = function parse(context, text, position) {
|
|
3469
|
+
if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
|
|
3470
|
+
return ~position;
|
|
3471
|
+
}
|
|
3605
3472
|
|
|
3606
|
-
|
|
3473
|
+
position += 3;
|
|
3607
3474
|
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3475
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
3476
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
|
|
3477
|
+
}
|
|
3611
3478
|
|
|
3612
|
-
|
|
3479
|
+
var end = text.length;
|
|
3613
3480
|
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3481
|
+
if (position === end) {
|
|
3482
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
|
|
3483
|
+
}
|
|
3617
3484
|
|
|
3618
|
-
|
|
3485
|
+
var sign = text.charAt(position);
|
|
3619
3486
|
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3487
|
+
if (sign !== '+' && sign !== '-') {
|
|
3488
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
|
|
3489
|
+
}
|
|
3623
3490
|
|
|
3624
|
-
|
|
3625
|
-
var ch = text.charAt(position);
|
|
3491
|
+
var negative = sign === '-' ? -1 : 1;
|
|
3626
3492
|
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3493
|
+
if (position === end) {
|
|
3494
|
+
return ~position;
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
position++;
|
|
3498
|
+
var ch = text.charAt(position);
|
|
3630
3499
|
|
|
3631
|
-
|
|
3632
|
-
|
|
3500
|
+
if (ch < '0' || ch > '9') {
|
|
3501
|
+
return ~position;
|
|
3502
|
+
}
|
|
3633
3503
|
|
|
3634
|
-
|
|
3635
|
-
|
|
3504
|
+
position++;
|
|
3505
|
+
var hour = MathUtil.parseInt(ch);
|
|
3636
3506
|
|
|
3637
|
-
|
|
3638
|
-
|
|
3507
|
+
if (position !== end) {
|
|
3508
|
+
ch = text.charAt(position);
|
|
3639
3509
|
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
}
|
|
3510
|
+
if (ch >= '0' && ch <= '9') {
|
|
3511
|
+
hour = hour * 10 + MathUtil.parseInt(ch);
|
|
3643
3512
|
|
|
3644
|
-
|
|
3513
|
+
if (hour > 23) {
|
|
3514
|
+
return ~position;
|
|
3645
3515
|
}
|
|
3516
|
+
|
|
3517
|
+
position++;
|
|
3646
3518
|
}
|
|
3519
|
+
}
|
|
3647
3520
|
|
|
3648
|
-
|
|
3649
|
-
|
|
3521
|
+
if (position === end || text.charAt(position) !== ':') {
|
|
3522
|
+
var _offset = negative * 3600 * hour;
|
|
3650
3523
|
|
|
3651
|
-
|
|
3652
|
-
|
|
3524
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
|
|
3525
|
+
}
|
|
3653
3526
|
|
|
3654
|
-
|
|
3527
|
+
position++;
|
|
3655
3528
|
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3529
|
+
if (position > end - 2) {
|
|
3530
|
+
return ~position;
|
|
3531
|
+
}
|
|
3659
3532
|
|
|
3660
|
-
|
|
3533
|
+
ch = text.charAt(position);
|
|
3661
3534
|
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3535
|
+
if (ch < '0' || ch > '9') {
|
|
3536
|
+
return ~position;
|
|
3537
|
+
}
|
|
3665
3538
|
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3539
|
+
position++;
|
|
3540
|
+
var min = MathUtil.parseInt(ch);
|
|
3541
|
+
ch = text.charAt(position);
|
|
3669
3542
|
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
position++;
|
|
3675
|
-
min = min * 10 + MathUtil.parseInt(ch);
|
|
3543
|
+
if (ch < '0' || ch > '9') {
|
|
3544
|
+
return ~position;
|
|
3545
|
+
}
|
|
3676
3546
|
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
}
|
|
3547
|
+
position++;
|
|
3548
|
+
min = min * 10 + MathUtil.parseInt(ch);
|
|
3680
3549
|
|
|
3681
|
-
|
|
3682
|
-
|
|
3550
|
+
if (min > 59) {
|
|
3551
|
+
return ~position;
|
|
3552
|
+
}
|
|
3683
3553
|
|
|
3684
|
-
|
|
3685
|
-
|
|
3554
|
+
if (position === end || text.charAt(position) !== ':') {
|
|
3555
|
+
var _offset2 = negative * (3600 * hour + 60 * min);
|
|
3686
3556
|
|
|
3687
|
-
position
|
|
3557
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
|
|
3558
|
+
}
|
|
3688
3559
|
|
|
3689
|
-
|
|
3690
|
-
return ~position;
|
|
3691
|
-
}
|
|
3560
|
+
position++;
|
|
3692
3561
|
|
|
3693
|
-
|
|
3562
|
+
if (position > end - 2) {
|
|
3563
|
+
return ~position;
|
|
3564
|
+
}
|
|
3694
3565
|
|
|
3695
|
-
|
|
3696
|
-
return ~position;
|
|
3697
|
-
}
|
|
3566
|
+
ch = text.charAt(position);
|
|
3698
3567
|
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3568
|
+
if (ch < '0' || ch > '9') {
|
|
3569
|
+
return ~position;
|
|
3570
|
+
}
|
|
3702
3571
|
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3572
|
+
position++;
|
|
3573
|
+
var sec = MathUtil.parseInt(ch);
|
|
3574
|
+
ch = text.charAt(position);
|
|
3706
3575
|
|
|
3707
|
-
|
|
3708
|
-
|
|
3576
|
+
if (ch < '0' || ch > '9') {
|
|
3577
|
+
return ~position;
|
|
3578
|
+
}
|
|
3709
3579
|
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
}
|
|
3580
|
+
position++;
|
|
3581
|
+
sec = sec * 10 + MathUtil.parseInt(ch);
|
|
3713
3582
|
|
|
3714
|
-
|
|
3715
|
-
return
|
|
3716
|
-
}
|
|
3717
|
-
}, {
|
|
3718
|
-
key: "toString",
|
|
3719
|
-
value: function toString() {
|
|
3720
|
-
return "LocalizedOffset(".concat(this._textStyle, ")");
|
|
3583
|
+
if (sec > 59) {
|
|
3584
|
+
return ~position;
|
|
3721
3585
|
}
|
|
3722
|
-
|
|
3586
|
+
|
|
3587
|
+
var offset = negative * (3600 * hour + 60 * min + sec);
|
|
3588
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
|
|
3589
|
+
};
|
|
3590
|
+
|
|
3591
|
+
_proto.toString = function toString() {
|
|
3592
|
+
return "LocalizedOffset(" + this._textStyle + ")";
|
|
3593
|
+
};
|
|
3723
3594
|
|
|
3724
3595
|
return LocalizedOffsetPrinterParser;
|
|
3725
3596
|
}();
|
|
@@ -3740,18 +3611,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3740
3611
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPrinterParser; });
|
|
3741
3612
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
3742
3613
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3743
|
-
function
|
|
3614
|
+
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."); }
|
|
3744
3615
|
|
|
3745
3616
|
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); }
|
|
3746
3617
|
|
|
3747
3618
|
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; }
|
|
3748
3619
|
|
|
3749
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3750
|
-
|
|
3751
|
-
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); } }
|
|
3752
|
-
|
|
3753
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3754
|
-
|
|
3755
3620
|
/**
|
|
3756
3621
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
3757
3622
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -3761,104 +3626,86 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
3761
3626
|
|
|
3762
3627
|
var TextPrinterParser = function () {
|
|
3763
3628
|
function TextPrinterParser(field, textStyle, provider) {
|
|
3764
|
-
_classCallCheck(this, TextPrinterParser);
|
|
3765
|
-
|
|
3766
3629
|
this._field = field;
|
|
3767
3630
|
this._textStyle = textStyle;
|
|
3768
3631
|
this._provider = provider;
|
|
3769
3632
|
}
|
|
3770
3633
|
|
|
3771
|
-
|
|
3772
|
-
key: "field",
|
|
3773
|
-
value: function field() {
|
|
3774
|
-
return this._field;
|
|
3775
|
-
}
|
|
3776
|
-
}, {
|
|
3777
|
-
key: "textStyle",
|
|
3778
|
-
value: function textStyle() {
|
|
3779
|
-
return this._textStyle;
|
|
3780
|
-
}
|
|
3781
|
-
}, {
|
|
3782
|
-
key: "provider",
|
|
3783
|
-
value: function provider() {
|
|
3784
|
-
return this._provider;
|
|
3785
|
-
}
|
|
3786
|
-
}, {
|
|
3787
|
-
key: "print",
|
|
3788
|
-
value: function print(context, buf) {
|
|
3789
|
-
var value = context.getValue(this._field);
|
|
3634
|
+
var _proto = TextPrinterParser.prototype;
|
|
3790
3635
|
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3636
|
+
_proto.field = function field() {
|
|
3637
|
+
return this._field;
|
|
3638
|
+
};
|
|
3794
3639
|
|
|
3795
|
-
|
|
3640
|
+
_proto.textStyle = function textStyle() {
|
|
3641
|
+
return this._textStyle;
|
|
3642
|
+
};
|
|
3796
3643
|
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3644
|
+
_proto.provider = function provider() {
|
|
3645
|
+
return this._provider;
|
|
3646
|
+
};
|
|
3800
3647
|
|
|
3801
|
-
|
|
3802
|
-
|
|
3648
|
+
_proto.print = function print(context, buf) {
|
|
3649
|
+
var value = context.getValue(this._field);
|
|
3650
|
+
|
|
3651
|
+
if (value === null) {
|
|
3652
|
+
return false;
|
|
3803
3653
|
}
|
|
3804
|
-
}, {
|
|
3805
|
-
key: "parse",
|
|
3806
|
-
value: function parse(context, parseText, position) {
|
|
3807
|
-
var length = parseText.length;
|
|
3808
3654
|
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3655
|
+
var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
|
|
3656
|
+
|
|
3657
|
+
if (text === null) {
|
|
3658
|
+
return this._numberPrinterParser().print(context, buf);
|
|
3659
|
+
}
|
|
3812
3660
|
|
|
3813
|
-
|
|
3661
|
+
buf.append(text);
|
|
3662
|
+
return true;
|
|
3663
|
+
};
|
|
3814
3664
|
|
|
3815
|
-
|
|
3665
|
+
_proto.parse = function parse(context, parseText, position) {
|
|
3666
|
+
var length = parseText.length;
|
|
3816
3667
|
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3668
|
+
if (position < 0 || position > length) {
|
|
3669
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: " + position);
|
|
3670
|
+
}
|
|
3820
3671
|
|
|
3821
|
-
|
|
3822
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3823
|
-
var entry = _step.value;
|
|
3824
|
-
var itText = entry.key;
|
|
3672
|
+
var style = context.isStrict() ? this._textStyle : null;
|
|
3825
3673
|
|
|
3826
|
-
|
|
3827
|
-
return context.setParsedField(this._field, entry.value, position, position + itText.length);
|
|
3828
|
-
}
|
|
3829
|
-
}
|
|
3830
|
-
} catch (err) {
|
|
3831
|
-
_iterator.e(err);
|
|
3832
|
-
} finally {
|
|
3833
|
-
_iterator.f();
|
|
3834
|
-
}
|
|
3674
|
+
var it = this._provider.getTextIterator(this._field, style, context.locale());
|
|
3835
3675
|
|
|
3836
|
-
|
|
3837
|
-
|
|
3676
|
+
if (it != null) {
|
|
3677
|
+
for (var _iterator = _createForOfIteratorHelperLoose(it), _step; !(_step = _iterator()).done;) {
|
|
3678
|
+
var entry = _step.value;
|
|
3679
|
+
var itText = entry.key;
|
|
3680
|
+
|
|
3681
|
+
if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
|
|
3682
|
+
return context.setParsedField(this._field, entry.value, position, position + itText.length);
|
|
3838
3683
|
}
|
|
3839
3684
|
}
|
|
3840
3685
|
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
}, {
|
|
3844
|
-
key: "_numberPrinterParser",
|
|
3845
|
-
value: function _numberPrinterParser() {
|
|
3846
|
-
if (this._currentNumberPrinterParser == null) {
|
|
3847
|
-
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);
|
|
3686
|
+
if (context.isStrict()) {
|
|
3687
|
+
return ~position;
|
|
3848
3688
|
}
|
|
3689
|
+
}
|
|
3690
|
+
|
|
3691
|
+
return this._numberPrinterParser().parse(context, parseText, position);
|
|
3692
|
+
};
|
|
3849
3693
|
|
|
3850
|
-
|
|
3694
|
+
_proto._numberPrinterParser = function _numberPrinterParser() {
|
|
3695
|
+
if (this._currentNumberPrinterParser == null) {
|
|
3696
|
+
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);
|
|
3851
3697
|
}
|
|
3852
|
-
}, {
|
|
3853
|
-
key: "toString",
|
|
3854
|
-
value: function toString() {
|
|
3855
|
-
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
3856
|
-
return "Text(".concat(this._field, ")");
|
|
3857
|
-
}
|
|
3858
3698
|
|
|
3859
|
-
|
|
3699
|
+
return this._currentNumberPrinterParser;
|
|
3700
|
+
};
|
|
3701
|
+
|
|
3702
|
+
_proto.toString = function toString() {
|
|
3703
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
3704
|
+
return "Text(" + this._field + ")";
|
|
3860
3705
|
}
|
|
3861
|
-
|
|
3706
|
+
|
|
3707
|
+
return "Text(" + this._field + "," + this._textStyle + ")";
|
|
3708
|
+
};
|
|
3862
3709
|
|
|
3863
3710
|
return TextPrinterParser;
|
|
3864
3711
|
}();
|
|
@@ -3880,12 +3727,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3880
3727
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
3881
3728
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3882
3729
|
/* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../temporal/WeekFields */ "./src/temporal/WeekFields.js");
|
|
3883
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3884
|
-
|
|
3885
|
-
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); } }
|
|
3886
|
-
|
|
3887
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3888
|
-
|
|
3889
3730
|
/*
|
|
3890
3731
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
3891
3732
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -3896,95 +3737,89 @@ var StringBuilder = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].StringBuilde
|
|
|
3896
3737
|
|
|
3897
3738
|
var WeekFieldsPrinterParser = function () {
|
|
3898
3739
|
function WeekFieldsPrinterParser(letter, count) {
|
|
3899
|
-
_classCallCheck(this, WeekFieldsPrinterParser);
|
|
3900
|
-
|
|
3901
3740
|
this._letter = letter;
|
|
3902
3741
|
this._count = count;
|
|
3903
3742
|
}
|
|
3904
3743
|
|
|
3905
|
-
|
|
3906
|
-
key: "print",
|
|
3907
|
-
value: function print(context, buf) {
|
|
3908
|
-
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
3744
|
+
var _proto = WeekFieldsPrinterParser.prototype;
|
|
3909
3745
|
|
|
3910
|
-
|
|
3746
|
+
_proto.print = function print(context, buf) {
|
|
3747
|
+
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
3911
3748
|
|
|
3912
|
-
|
|
3913
|
-
}
|
|
3914
|
-
}, {
|
|
3915
|
-
key: "parse",
|
|
3916
|
-
value: function parse(context, text, position) {
|
|
3917
|
-
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
3749
|
+
var pp = this._evaluate(weekFields);
|
|
3918
3750
|
|
|
3919
|
-
|
|
3751
|
+
return pp.print(context, buf);
|
|
3752
|
+
};
|
|
3920
3753
|
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
}, {
|
|
3924
|
-
key: "_evaluate",
|
|
3925
|
-
value: function _evaluate(weekFields) {
|
|
3926
|
-
var pp = null;
|
|
3927
|
-
|
|
3928
|
-
switch (this._letter) {
|
|
3929
|
-
case 'e':
|
|
3930
|
-
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);
|
|
3931
|
-
break;
|
|
3932
|
-
|
|
3933
|
-
case 'c':
|
|
3934
|
-
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);
|
|
3935
|
-
break;
|
|
3936
|
-
|
|
3937
|
-
case 'w':
|
|
3938
|
-
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);
|
|
3939
|
-
break;
|
|
3940
|
-
|
|
3941
|
-
case 'W':
|
|
3942
|
-
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);
|
|
3943
|
-
break;
|
|
3944
|
-
|
|
3945
|
-
case 'Y':
|
|
3946
|
-
if (this._count === 2) {
|
|
3947
|
-
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);
|
|
3948
|
-
} else {
|
|
3949
|
-
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);
|
|
3950
|
-
}
|
|
3754
|
+
_proto.parse = function parse(context, text, position) {
|
|
3755
|
+
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
3951
3756
|
|
|
3952
|
-
|
|
3953
|
-
}
|
|
3757
|
+
var pp = this._evaluate(weekFields);
|
|
3954
3758
|
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3759
|
+
return pp.parse(context, text, position);
|
|
3760
|
+
};
|
|
3761
|
+
|
|
3762
|
+
_proto._evaluate = function _evaluate(weekFields) {
|
|
3763
|
+
var pp = null;
|
|
3764
|
+
|
|
3765
|
+
switch (this._letter) {
|
|
3766
|
+
case 'e':
|
|
3767
|
+
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);
|
|
3768
|
+
break;
|
|
3769
|
+
|
|
3770
|
+
case 'c':
|
|
3771
|
+
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);
|
|
3772
|
+
break;
|
|
3773
|
+
|
|
3774
|
+
case 'w':
|
|
3775
|
+
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);
|
|
3776
|
+
break;
|
|
3777
|
+
|
|
3778
|
+
case 'W':
|
|
3779
|
+
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);
|
|
3780
|
+
break;
|
|
3781
|
+
|
|
3782
|
+
case 'Y':
|
|
3783
|
+
if (this._count === 2) {
|
|
3784
|
+
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);
|
|
3968
3785
|
} else {
|
|
3969
|
-
|
|
3970
|
-
}
|
|
3971
|
-
} else {
|
|
3972
|
-
if (this._letter === 'c' || this._letter === 'e') {
|
|
3973
|
-
sb.append('DayOfWeek');
|
|
3974
|
-
} else if (this._letter === 'w') {
|
|
3975
|
-
sb.append('WeekOfWeekBasedYear');
|
|
3976
|
-
} else if (this._letter === 'W') {
|
|
3977
|
-
sb.append('WeekOfMonth');
|
|
3786
|
+
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);
|
|
3978
3787
|
}
|
|
3979
3788
|
|
|
3980
|
-
|
|
3981
|
-
|
|
3789
|
+
break;
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
return pp;
|
|
3793
|
+
};
|
|
3794
|
+
|
|
3795
|
+
_proto.toString = function toString() {
|
|
3796
|
+
var sb = new StringBuilder(30);
|
|
3797
|
+
sb.append('Localized(');
|
|
3798
|
+
|
|
3799
|
+
if (this._letter === 'Y') {
|
|
3800
|
+
if (this._count === 1) {
|
|
3801
|
+
sb.append('WeekBasedYear');
|
|
3802
|
+
} else if (this._count === 2) {
|
|
3803
|
+
sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
|
|
3804
|
+
} else {
|
|
3805
|
+
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);
|
|
3806
|
+
}
|
|
3807
|
+
} else {
|
|
3808
|
+
if (this._letter === 'c' || this._letter === 'e') {
|
|
3809
|
+
sb.append('DayOfWeek');
|
|
3810
|
+
} else if (this._letter === 'w') {
|
|
3811
|
+
sb.append('WeekOfWeekBasedYear');
|
|
3812
|
+
} else if (this._letter === 'W') {
|
|
3813
|
+
sb.append('WeekOfMonth');
|
|
3982
3814
|
}
|
|
3983
3815
|
|
|
3984
|
-
sb.append('
|
|
3985
|
-
|
|
3816
|
+
sb.append(',');
|
|
3817
|
+
sb.append(this._count);
|
|
3986
3818
|
}
|
|
3987
|
-
|
|
3819
|
+
|
|
3820
|
+
sb.append(')');
|
|
3821
|
+
return sb.toString();
|
|
3822
|
+
};
|
|
3988
3823
|
|
|
3989
3824
|
return WeekFieldsPrinterParser;
|
|
3990
3825
|
}();
|
|
@@ -4073,12 +3908,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4073
3908
|
/* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
|
|
4074
3909
|
/* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cldrjs */ "./node_modules/cldrjs/dist/node_main.js");
|
|
4075
3910
|
/* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cldrjs__WEBPACK_IMPORTED_MODULE_2__);
|
|
4076
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4077
|
-
|
|
4078
|
-
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); } }
|
|
4079
|
-
|
|
4080
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4081
|
-
|
|
4082
3911
|
/*
|
|
4083
3912
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
4084
3913
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -4105,9 +3934,27 @@ var _weekDayMap = {
|
|
|
4105
3934
|
'sun': _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"].SUNDAY
|
|
4106
3935
|
};
|
|
4107
3936
|
var ComputedDayOfField = function () {
|
|
4108
|
-
function
|
|
4109
|
-
|
|
3937
|
+
ComputedDayOfField.ofDayOfWeekField = function ofDayOfWeekField(weekDef) {
|
|
3938
|
+
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);
|
|
3939
|
+
};
|
|
3940
|
+
|
|
3941
|
+
ComputedDayOfField.ofWeekOfMonthField = function ofWeekOfMonthField(weekDef) {
|
|
3942
|
+
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);
|
|
3943
|
+
};
|
|
3944
|
+
|
|
3945
|
+
ComputedDayOfField.ofWeekOfYearField = function ofWeekOfYearField(weekDef) {
|
|
3946
|
+
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);
|
|
3947
|
+
};
|
|
3948
|
+
|
|
3949
|
+
ComputedDayOfField.ofWeekOfWeekBasedYearField = function ofWeekOfWeekBasedYearField(weekDef) {
|
|
3950
|
+
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);
|
|
3951
|
+
};
|
|
3952
|
+
|
|
3953
|
+
ComputedDayOfField.ofWeekBasedYearField = function ofWeekBasedYearField(weekDef) {
|
|
3954
|
+
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);
|
|
3955
|
+
};
|
|
4110
3956
|
|
|
3957
|
+
function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
|
|
4111
3958
|
this._name = name;
|
|
4112
3959
|
this._weekDef = weekDef;
|
|
4113
3960
|
this._baseUnit = baseUnit;
|
|
@@ -4115,484 +3962,482 @@ var ComputedDayOfField = function () {
|
|
|
4115
3962
|
this._range = range;
|
|
4116
3963
|
}
|
|
4117
3964
|
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
}
|
|
3965
|
+
var _proto = ComputedDayOfField.prototype;
|
|
3966
|
+
|
|
3967
|
+
_proto.getFrom = function getFrom(temporal) {
|
|
3968
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
3969
|
+
|
|
3970
|
+
var dow = this._localizedDayOfWeek(temporal, sow);
|
|
3971
|
+
|
|
3972
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
3973
|
+
return dow;
|
|
3974
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
3975
|
+
return this._localizedWeekOfMonth(temporal, dow);
|
|
3976
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
3977
|
+
return this._localizedWeekOfYear(temporal, dow);
|
|
3978
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
3979
|
+
return this._localizedWOWBY(temporal);
|
|
3980
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
3981
|
+
return this._localizedWBY(temporal);
|
|
3982
|
+
} else {
|
|
3983
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4138
3984
|
}
|
|
4139
|
-
}
|
|
4140
|
-
key: "_localizedDayOfWeek",
|
|
4141
|
-
value: function _localizedDayOfWeek(temporal, sow) {
|
|
4142
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4143
|
-
return MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4144
|
-
}
|
|
4145
|
-
}, {
|
|
4146
|
-
key: "_localizedWeekOfMonth",
|
|
4147
|
-
value: function _localizedWeekOfMonth(temporal, dow) {
|
|
4148
|
-
var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
3985
|
+
};
|
|
4149
3986
|
|
|
4150
|
-
|
|
3987
|
+
_proto._localizedDayOfWeek = function _localizedDayOfWeek(temporal, sow) {
|
|
3988
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
3989
|
+
return MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
3990
|
+
};
|
|
4151
3991
|
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
}, {
|
|
4155
|
-
key: "_localizedWeekOfYear",
|
|
4156
|
-
value: function _localizedWeekOfYear(temporal, dow) {
|
|
4157
|
-
var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
3992
|
+
_proto._localizedWeekOfMonth = function _localizedWeekOfMonth(temporal, dow) {
|
|
3993
|
+
var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
4158
3994
|
|
|
4159
|
-
|
|
3995
|
+
var offset = this._startOfWeekOffset(dom, dow);
|
|
4160
3996
|
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
}, {
|
|
4164
|
-
key: "_localizedWOWBY",
|
|
4165
|
-
value: function _localizedWOWBY(temporal) {
|
|
4166
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
3997
|
+
return ComputedDayOfField._computeWeek(offset, dom);
|
|
3998
|
+
};
|
|
4167
3999
|
|
|
4168
|
-
|
|
4169
|
-
|
|
4000
|
+
_proto._localizedWeekOfYear = function _localizedWeekOfYear(temporal, dow) {
|
|
4001
|
+
var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
4170
4002
|
|
|
4171
|
-
|
|
4003
|
+
var offset = this._startOfWeekOffset(doy, dow);
|
|
4172
4004
|
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
return this._localizedWeekOfYear(previous, dow) + 1;
|
|
4176
|
-
} else if (woy >= 53) {
|
|
4177
|
-
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
4005
|
+
return ComputedDayOfField._computeWeek(offset, doy);
|
|
4006
|
+
};
|
|
4178
4007
|
|
|
4179
|
-
|
|
4180
|
-
|
|
4008
|
+
_proto._localizedWOWBY = function _localizedWOWBY(temporal) {
|
|
4009
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4181
4010
|
|
|
4182
|
-
|
|
4011
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4012
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4183
4013
|
|
|
4184
|
-
|
|
4185
|
-
return woy - (weekIndexOfFirstWeekNextYear - 1);
|
|
4186
|
-
}
|
|
4187
|
-
}
|
|
4014
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
4188
4015
|
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4016
|
+
if (woy === 0) {
|
|
4017
|
+
var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4018
|
+
return this._localizedWeekOfYear(previous, dow) + 1;
|
|
4019
|
+
} else if (woy >= 53) {
|
|
4020
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
4195
4021
|
|
|
4196
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4197
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4198
4022
|
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4023
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
4199
4024
|
|
|
4200
|
-
var
|
|
4025
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
4201
4026
|
|
|
4202
|
-
if (woy
|
|
4203
|
-
return
|
|
4204
|
-
} else if (woy < 53) {
|
|
4205
|
-
return year;
|
|
4027
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
4028
|
+
return woy - (weekIndexOfFirstWeekNextYear - 1);
|
|
4206
4029
|
}
|
|
4030
|
+
}
|
|
4207
4031
|
|
|
4208
|
-
|
|
4032
|
+
return woy;
|
|
4033
|
+
};
|
|
4209
4034
|
|
|
4210
|
-
|
|
4035
|
+
_proto._localizedWBY = function _localizedWBY(temporal) {
|
|
4036
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4211
4037
|
|
|
4212
|
-
|
|
4038
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4039
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4040
|
+
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4213
4041
|
|
|
4214
|
-
|
|
4215
|
-
return year + 1;
|
|
4216
|
-
}
|
|
4042
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
4217
4043
|
|
|
4044
|
+
if (woy === 0) {
|
|
4045
|
+
return year - 1;
|
|
4046
|
+
} else if (woy < 53) {
|
|
4218
4047
|
return year;
|
|
4219
4048
|
}
|
|
4220
|
-
}, {
|
|
4221
|
-
key: "_startOfWeekOffset",
|
|
4222
|
-
value: function _startOfWeekOffset(day, dow) {
|
|
4223
|
-
var weekStart = MathUtil.floorMod(day - dow, 7);
|
|
4224
|
-
var offset = -weekStart;
|
|
4225
|
-
|
|
4226
|
-
if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
|
|
4227
|
-
offset = 7 - weekStart;
|
|
4228
|
-
}
|
|
4229
4049
|
|
|
4230
|
-
|
|
4050
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
4051
|
+
|
|
4052
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
4053
|
+
|
|
4054
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
4055
|
+
|
|
4056
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
4057
|
+
return year + 1;
|
|
4231
4058
|
}
|
|
4232
|
-
}, {
|
|
4233
|
-
key: "adjustInto",
|
|
4234
|
-
value: function adjustInto(temporal, newValue) {
|
|
4235
|
-
var newVal = this._range.checkValidIntValue(newValue, this);
|
|
4236
4059
|
|
|
4237
|
-
|
|
4060
|
+
return year;
|
|
4061
|
+
};
|
|
4238
4062
|
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4063
|
+
_proto._startOfWeekOffset = function _startOfWeekOffset(day, dow) {
|
|
4064
|
+
var weekStart = MathUtil.floorMod(day - dow, 7);
|
|
4065
|
+
var offset = -weekStart;
|
|
4242
4066
|
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4067
|
+
if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
|
|
4068
|
+
offset = 7 - weekStart;
|
|
4069
|
+
}
|
|
4247
4070
|
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4251
|
-
} else {
|
|
4252
|
-
if (result.get(this) < newVal) {
|
|
4253
|
-
result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4254
|
-
}
|
|
4071
|
+
return offset;
|
|
4072
|
+
};
|
|
4255
4073
|
|
|
4256
|
-
|
|
4074
|
+
ComputedDayOfField._computeWeek = function _computeWeek(offset, day) {
|
|
4075
|
+
return MathUtil.intDiv(7 + offset + (day - 1), 7);
|
|
4076
|
+
};
|
|
4257
4077
|
|
|
4258
|
-
|
|
4078
|
+
_proto.adjustInto = function adjustInto(temporal, newValue) {
|
|
4079
|
+
var newVal = this._range.checkValidIntValue(newValue, this);
|
|
4259
4080
|
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4081
|
+
var currentVal = temporal.get(this);
|
|
4082
|
+
|
|
4083
|
+
if (newVal === currentVal) {
|
|
4084
|
+
return temporal;
|
|
4085
|
+
}
|
|
4086
|
+
|
|
4087
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4088
|
+
var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
|
|
4089
|
+
var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
|
|
4090
|
+
var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4091
|
+
|
|
4092
|
+
if (result.get(this) > newVal) {
|
|
4093
|
+
var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
|
|
4094
|
+
result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4095
|
+
} else {
|
|
4096
|
+
if (result.get(this) < newVal) {
|
|
4097
|
+
result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4263
4098
|
}
|
|
4264
4099
|
|
|
4265
|
-
|
|
4100
|
+
var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
|
|
4101
|
+
|
|
4102
|
+
result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4103
|
+
|
|
4104
|
+
if (result.get(this) > newVal) {
|
|
4105
|
+
result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4106
|
+
}
|
|
4266
4107
|
}
|
|
4267
4108
|
|
|
4268
|
-
|
|
4269
|
-
return temporal.plus(delta, this._baseUnit);
|
|
4109
|
+
return result;
|
|
4270
4110
|
}
|
|
4271
|
-
}, {
|
|
4272
|
-
key: "resolve",
|
|
4273
|
-
value: function resolve(fieldValues, partialTemporal, resolverStyle) {
|
|
4274
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4275
4111
|
|
|
4276
|
-
|
|
4277
|
-
|
|
4112
|
+
var delta = newVal - currentVal;
|
|
4113
|
+
return temporal.plus(delta, this._baseUnit);
|
|
4114
|
+
};
|
|
4278
4115
|
|
|
4279
|
-
|
|
4116
|
+
_proto.resolve = function resolve(fieldValues, partialTemporal, resolverStyle) {
|
|
4117
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4280
4118
|
|
|
4281
|
-
|
|
4119
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4120
|
+
var value = fieldValues.remove(this);
|
|
4282
4121
|
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4122
|
+
var localDow = this._range.checkValidIntValue(value, this);
|
|
4123
|
+
|
|
4124
|
+
var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
|
|
4125
|
+
|
|
4126
|
+
fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
|
|
4127
|
+
return null;
|
|
4128
|
+
}
|
|
4286
4129
|
|
|
4287
|
-
|
|
4130
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
|
|
4131
|
+
return null;
|
|
4132
|
+
}
|
|
4133
|
+
|
|
4134
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4135
|
+
if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
|
|
4288
4136
|
return null;
|
|
4289
4137
|
}
|
|
4290
4138
|
|
|
4291
|
-
|
|
4292
|
-
if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
|
|
4293
|
-
return null;
|
|
4294
|
-
}
|
|
4139
|
+
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));
|
|
4295
4140
|
|
|
4296
|
-
|
|
4141
|
+
var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
|
|
4297
4142
|
|
|
4298
|
-
|
|
4143
|
+
var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
|
|
4144
|
+
var date;
|
|
4145
|
+
var days;
|
|
4299
4146
|
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
var
|
|
4147
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
4148
|
+
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
4149
|
+
var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
|
|
4303
4150
|
|
|
4304
|
-
|
|
4305
|
-
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
4306
|
-
var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
|
|
4151
|
+
var dateDow = this._localizedDayOfWeek(date, sow);
|
|
4307
4152
|
|
|
4308
|
-
|
|
4153
|
+
var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
|
|
4309
4154
|
|
|
4310
|
-
|
|
4155
|
+
days = weeks * 7 + (_dow - dateDow);
|
|
4156
|
+
} else {
|
|
4157
|
+
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
4311
4158
|
|
|
4312
|
-
|
|
4313
|
-
} else {
|
|
4314
|
-
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
4159
|
+
var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
|
|
4315
4160
|
|
|
4316
|
-
|
|
4161
|
+
var _dateDow = this._localizedDayOfWeek(date, sow);
|
|
4317
4162
|
|
|
4318
|
-
|
|
4163
|
+
var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
|
|
4319
4164
|
|
|
4320
|
-
|
|
4165
|
+
days = _weeks * 7 + (_dow - _dateDow);
|
|
4166
|
+
}
|
|
4321
4167
|
|
|
4322
|
-
|
|
4168
|
+
date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
4169
|
+
|
|
4170
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
4171
|
+
if (date.getLong(this) !== fieldValues.get(this)) {
|
|
4172
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
|
|
4323
4173
|
}
|
|
4174
|
+
}
|
|
4324
4175
|
|
|
4325
|
-
|
|
4176
|
+
fieldValues.remove(this);
|
|
4177
|
+
fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
|
|
4178
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4179
|
+
return date;
|
|
4180
|
+
}
|
|
4326
4181
|
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
}
|
|
4331
|
-
}
|
|
4182
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
|
|
4183
|
+
return null;
|
|
4184
|
+
}
|
|
4332
4185
|
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
return date;
|
|
4337
|
-
}
|
|
4186
|
+
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));
|
|
4187
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4188
|
+
var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
|
|
4338
4189
|
|
|
4339
|
-
|
|
4190
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4191
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
|
|
4340
4192
|
return null;
|
|
4341
4193
|
}
|
|
4342
4194
|
|
|
4343
|
-
var
|
|
4344
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4345
|
-
var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
|
|
4195
|
+
var _value = fieldValues.remove(this);
|
|
4346
4196
|
|
|
4347
|
-
|
|
4348
|
-
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
|
|
4349
|
-
return null;
|
|
4350
|
-
}
|
|
4197
|
+
var _date;
|
|
4351
4198
|
|
|
4352
|
-
|
|
4199
|
+
var _days;
|
|
4353
4200
|
|
|
4354
|
-
|
|
4201
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
4202
|
+
var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
4203
|
+
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
4204
|
+
_date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
|
|
4355
4205
|
|
|
4356
|
-
var
|
|
4206
|
+
var _dateDow2 = this._localizedDayOfWeek(_date, sow);
|
|
4357
4207
|
|
|
4358
|
-
|
|
4359
|
-
var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
4360
|
-
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
4361
|
-
_date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
|
|
4208
|
+
var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
|
|
4362
4209
|
|
|
4363
|
-
|
|
4210
|
+
_days = _weeks2 * 7 + (dow - _dateDow2);
|
|
4211
|
+
} else {
|
|
4212
|
+
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));
|
|
4364
4213
|
|
|
4365
|
-
|
|
4214
|
+
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
|
|
4366
4215
|
|
|
4367
|
-
|
|
4368
|
-
} else {
|
|
4369
|
-
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));
|
|
4216
|
+
var _dateDow3 = this._localizedDayOfWeek(_date, sow);
|
|
4370
4217
|
|
|
4371
|
-
|
|
4218
|
+
var wom = this._range.checkValidIntValue(_value, this);
|
|
4372
4219
|
|
|
4373
|
-
|
|
4220
|
+
var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
|
|
4374
4221
|
|
|
4375
|
-
|
|
4222
|
+
_days = _weeks3 * 7 + (dow - _dateDow3);
|
|
4223
|
+
}
|
|
4376
4224
|
|
|
4377
|
-
|
|
4225
|
+
_date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
4378
4226
|
|
|
4379
|
-
|
|
4227
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
4228
|
+
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)) {
|
|
4229
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
|
|
4380
4230
|
}
|
|
4231
|
+
}
|
|
4381
4232
|
|
|
4382
|
-
|
|
4233
|
+
fieldValues.remove(this);
|
|
4234
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4235
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
4236
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4237
|
+
return _date;
|
|
4238
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4239
|
+
var _value2 = fieldValues.remove(this);
|
|
4383
4240
|
|
|
4384
|
-
|
|
4385
|
-
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)) {
|
|
4386
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
|
|
4387
|
-
}
|
|
4388
|
-
}
|
|
4241
|
+
var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
4389
4242
|
|
|
4390
|
-
|
|
4391
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4392
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
4393
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4394
|
-
return _date;
|
|
4395
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4396
|
-
var _value2 = fieldValues.remove(this);
|
|
4243
|
+
var _days2;
|
|
4397
4244
|
|
|
4398
|
-
|
|
4245
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
4246
|
+
var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
|
|
4399
4247
|
|
|
4400
|
-
var
|
|
4248
|
+
var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
|
|
4401
4249
|
|
|
4402
|
-
|
|
4403
|
-
|
|
4250
|
+
_days2 = _weeks4 * 7 + (dow - _dateDow4);
|
|
4251
|
+
} else {
|
|
4252
|
+
var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
|
|
4404
4253
|
|
|
4405
|
-
|
|
4254
|
+
var woy = this._range.checkValidIntValue(_value2, this);
|
|
4406
4255
|
|
|
4407
|
-
|
|
4408
|
-
} else {
|
|
4409
|
-
var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
|
|
4256
|
+
var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
|
|
4410
4257
|
|
|
4411
|
-
|
|
4258
|
+
_days2 = _weeks5 * 7 + (dow - _dateDow5);
|
|
4259
|
+
}
|
|
4412
4260
|
|
|
4413
|
-
|
|
4261
|
+
_date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
4414
4262
|
|
|
4415
|
-
|
|
4263
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
4264
|
+
if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
|
|
4265
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
|
|
4416
4266
|
}
|
|
4267
|
+
}
|
|
4268
|
+
|
|
4269
|
+
fieldValues.remove(this);
|
|
4270
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4271
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4272
|
+
return _date2;
|
|
4273
|
+
} else {
|
|
4274
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4275
|
+
}
|
|
4276
|
+
};
|
|
4417
4277
|
|
|
4418
|
-
|
|
4278
|
+
_proto.name = function name() {
|
|
4279
|
+
return this._name;
|
|
4280
|
+
};
|
|
4419
4281
|
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
}
|
|
4424
|
-
}
|
|
4282
|
+
_proto.baseUnit = function baseUnit() {
|
|
4283
|
+
return this._baseUnit;
|
|
4284
|
+
};
|
|
4425
4285
|
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
return _date2;
|
|
4430
|
-
} else {
|
|
4431
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4432
|
-
}
|
|
4433
|
-
}
|
|
4434
|
-
}, {
|
|
4435
|
-
key: "name",
|
|
4436
|
-
value: function name() {
|
|
4437
|
-
return this._name;
|
|
4438
|
-
}
|
|
4439
|
-
}, {
|
|
4440
|
-
key: "baseUnit",
|
|
4441
|
-
value: function baseUnit() {
|
|
4442
|
-
return this._baseUnit;
|
|
4443
|
-
}
|
|
4444
|
-
}, {
|
|
4445
|
-
key: "rangeUnit",
|
|
4446
|
-
value: function rangeUnit() {
|
|
4447
|
-
return this._rangeUnit;
|
|
4448
|
-
}
|
|
4449
|
-
}, {
|
|
4450
|
-
key: "range",
|
|
4451
|
-
value: function range() {
|
|
4452
|
-
return this._range;
|
|
4453
|
-
}
|
|
4454
|
-
}, {
|
|
4455
|
-
key: "isDateBased",
|
|
4456
|
-
value: function isDateBased() {
|
|
4457
|
-
return true;
|
|
4458
|
-
}
|
|
4459
|
-
}, {
|
|
4460
|
-
key: "isTimeBased",
|
|
4461
|
-
value: function isTimeBased() {
|
|
4462
|
-
return false;
|
|
4463
|
-
}
|
|
4464
|
-
}, {
|
|
4465
|
-
key: "isSupportedBy",
|
|
4466
|
-
value: function isSupportedBy(temporal) {
|
|
4467
|
-
if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
|
|
4468
|
-
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4469
|
-
return true;
|
|
4470
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4471
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
4472
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4473
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
4474
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
4475
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
4476
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4477
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
4478
|
-
}
|
|
4479
|
-
}
|
|
4286
|
+
_proto.rangeUnit = function rangeUnit() {
|
|
4287
|
+
return this._rangeUnit;
|
|
4288
|
+
};
|
|
4480
4289
|
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
}
|
|
4484
|
-
key: "rangeRefinedBy",
|
|
4485
|
-
value: function rangeRefinedBy(temporal) {
|
|
4486
|
-
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4487
|
-
return this._range;
|
|
4488
|
-
}
|
|
4290
|
+
_proto.range = function range() {
|
|
4291
|
+
return this._range;
|
|
4292
|
+
};
|
|
4489
4293
|
|
|
4490
|
-
|
|
4294
|
+
_proto.isDateBased = function isDateBased() {
|
|
4295
|
+
return true;
|
|
4296
|
+
};
|
|
4297
|
+
|
|
4298
|
+
_proto.isTimeBased = function isTimeBased() {
|
|
4299
|
+
return false;
|
|
4300
|
+
};
|
|
4491
4301
|
|
|
4492
|
-
|
|
4493
|
-
|
|
4302
|
+
_proto.isSupportedBy = function isSupportedBy(temporal) {
|
|
4303
|
+
if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
|
|
4304
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4305
|
+
return true;
|
|
4306
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4307
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
4494
4308
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4495
|
-
|
|
4309
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
4496
4310
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
4497
|
-
return
|
|
4311
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
4498
4312
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4499
|
-
return temporal.
|
|
4500
|
-
} else {
|
|
4501
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4313
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
4502
4314
|
}
|
|
4315
|
+
}
|
|
4503
4316
|
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4507
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4317
|
+
return false;
|
|
4318
|
+
};
|
|
4508
4319
|
|
|
4509
|
-
|
|
4320
|
+
_proto.rangeRefinedBy = function rangeRefinedBy(temporal) {
|
|
4321
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4322
|
+
return this._range;
|
|
4323
|
+
}
|
|
4510
4324
|
|
|
4511
|
-
|
|
4512
|
-
|
|
4325
|
+
var field = null;
|
|
4326
|
+
|
|
4327
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4328
|
+
field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
|
|
4329
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4330
|
+
field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
|
|
4331
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
4332
|
+
return this._rangeWOWBY(temporal);
|
|
4333
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4334
|
+
return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4335
|
+
} else {
|
|
4336
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4513
4337
|
}
|
|
4514
|
-
}, {
|
|
4515
|
-
key: "_rangeWOWBY",
|
|
4516
|
-
value: function _rangeWOWBY(temporal) {
|
|
4517
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4518
4338
|
|
|
4519
|
-
|
|
4520
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4339
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4521
4340
|
|
|
4522
|
-
|
|
4341
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4342
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4523
4343
|
|
|
4524
|
-
|
|
4525
|
-
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));
|
|
4526
|
-
}
|
|
4344
|
+
var offset = this._startOfWeekOffset(temporal.get(field), dow);
|
|
4527
4345
|
|
|
4528
|
-
|
|
4346
|
+
var fieldRange = temporal.range(field);
|
|
4347
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
|
|
4348
|
+
};
|
|
4529
4349
|
|
|
4530
|
-
|
|
4531
|
-
|
|
4350
|
+
_proto._rangeWOWBY = function _rangeWOWBY(temporal) {
|
|
4351
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4532
4352
|
|
|
4533
|
-
|
|
4353
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4354
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4534
4355
|
|
|
4535
|
-
|
|
4536
|
-
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));
|
|
4537
|
-
}
|
|
4356
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
4538
4357
|
|
|
4539
|
-
|
|
4358
|
+
if (woy === 0) {
|
|
4359
|
+
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));
|
|
4540
4360
|
}
|
|
4541
|
-
}, {
|
|
4542
|
-
key: "displayName",
|
|
4543
|
-
value: function displayName(locale) {
|
|
4544
|
-
requireNonNull(locale, 'locale');
|
|
4545
4361
|
|
|
4546
|
-
|
|
4547
|
-
return 'Week';
|
|
4548
|
-
}
|
|
4362
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
4549
4363
|
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
}], [{
|
|
4558
|
-
key: "ofDayOfWeekField",
|
|
4559
|
-
value: function ofDayOfWeekField(weekDef) {
|
|
4560
|
-
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);
|
|
4561
|
-
}
|
|
4562
|
-
}, {
|
|
4563
|
-
key: "ofWeekOfMonthField",
|
|
4564
|
-
value: function ofWeekOfMonthField(weekDef) {
|
|
4565
|
-
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);
|
|
4566
|
-
}
|
|
4567
|
-
}, {
|
|
4568
|
-
key: "ofWeekOfYearField",
|
|
4569
|
-
value: function ofWeekOfYearField(weekDef) {
|
|
4570
|
-
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);
|
|
4571
|
-
}
|
|
4572
|
-
}, {
|
|
4573
|
-
key: "ofWeekOfWeekBasedYearField",
|
|
4574
|
-
value: function ofWeekOfWeekBasedYearField(weekDef) {
|
|
4575
|
-
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);
|
|
4576
|
-
}
|
|
4577
|
-
}, {
|
|
4578
|
-
key: "ofWeekBasedYearField",
|
|
4579
|
-
value: function ofWeekBasedYearField(weekDef) {
|
|
4580
|
-
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);
|
|
4364
|
+
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4365
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
4366
|
+
|
|
4367
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
4368
|
+
|
|
4369
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
4370
|
+
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));
|
|
4581
4371
|
}
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4372
|
+
|
|
4373
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
|
|
4374
|
+
};
|
|
4375
|
+
|
|
4376
|
+
_proto.displayName = function displayName(locale) {
|
|
4377
|
+
requireNonNull(locale, 'locale');
|
|
4378
|
+
|
|
4379
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4380
|
+
return 'Week';
|
|
4586
4381
|
}
|
|
4587
|
-
|
|
4382
|
+
|
|
4383
|
+
return this.toString();
|
|
4384
|
+
};
|
|
4385
|
+
|
|
4386
|
+
_proto.toString = function toString() {
|
|
4387
|
+
return this._name + "[" + this._weekDef.toString() + "]";
|
|
4388
|
+
};
|
|
4588
4389
|
|
|
4589
4390
|
return ComputedDayOfField;
|
|
4590
4391
|
}();
|
|
4591
4392
|
var WeekFieldsCache = new Map();
|
|
4592
4393
|
var WeekFields = function () {
|
|
4593
|
-
function
|
|
4594
|
-
|
|
4394
|
+
WeekFields.of = function of(firstDayOrLocale, minDays) {
|
|
4395
|
+
if (minDays === undefined) {
|
|
4396
|
+
return WeekFields.ofLocale(firstDayOrLocale);
|
|
4397
|
+
} else {
|
|
4398
|
+
return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
|
|
4399
|
+
}
|
|
4400
|
+
};
|
|
4401
|
+
|
|
4402
|
+
WeekFields.ofLocale = function ofLocale(locale) {
|
|
4403
|
+
requireNonNull(locale, 'locale');
|
|
4404
|
+
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
|
|
4405
|
+
var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
|
|
4406
|
+
var worldRegion = '001';
|
|
4407
|
+
var weekData = cldr.get('supplemental/weekData');
|
|
4408
|
+
|
|
4409
|
+
var dow = _weekDayMap[weekData.firstDay[locale.country()]];
|
|
4410
|
+
|
|
4411
|
+
if (!dow) {
|
|
4412
|
+
dow = _weekDayMap[weekData.firstDay[worldRegion]];
|
|
4413
|
+
}
|
|
4414
|
+
|
|
4415
|
+
var minDays = weekData.minDays[locale.country()];
|
|
4416
|
+
|
|
4417
|
+
if (!minDays) {
|
|
4418
|
+
minDays = weekData.minDays[worldRegion];
|
|
4419
|
+
}
|
|
4420
|
+
|
|
4421
|
+
return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
|
|
4422
|
+
};
|
|
4423
|
+
|
|
4424
|
+
WeekFields.ofFirstDayOfWeekMinDays = function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
4425
|
+
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
4426
|
+
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
4427
|
+
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
4428
|
+
var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
|
|
4429
|
+
var rules = WeekFieldsCache.get(key);
|
|
4430
|
+
|
|
4431
|
+
if (rules == null) {
|
|
4432
|
+
rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
|
|
4433
|
+
WeekFieldsCache.set(key, rules);
|
|
4434
|
+
rules = WeekFieldsCache.get(key);
|
|
4435
|
+
}
|
|
4595
4436
|
|
|
4437
|
+
return rules;
|
|
4438
|
+
};
|
|
4439
|
+
|
|
4440
|
+
function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
4596
4441
|
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
4597
4442
|
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
4598
4443
|
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
@@ -4611,114 +4456,55 @@ var WeekFields = function () {
|
|
|
4611
4456
|
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/likelySubtags.json'));
|
|
4612
4457
|
}
|
|
4613
4458
|
|
|
4614
|
-
|
|
4615
|
-
key: "firstDayOfWeek",
|
|
4616
|
-
value: function firstDayOfWeek() {
|
|
4617
|
-
return this._firstDayOfWeek;
|
|
4618
|
-
}
|
|
4619
|
-
}, {
|
|
4620
|
-
key: "minimalDaysInFirstWeek",
|
|
4621
|
-
value: function minimalDaysInFirstWeek() {
|
|
4622
|
-
return this._minimalDays;
|
|
4623
|
-
}
|
|
4624
|
-
}, {
|
|
4625
|
-
key: "dayOfWeek",
|
|
4626
|
-
value: function dayOfWeek() {
|
|
4627
|
-
return this._dayOfWeek;
|
|
4628
|
-
}
|
|
4629
|
-
}, {
|
|
4630
|
-
key: "weekOfMonth",
|
|
4631
|
-
value: function weekOfMonth() {
|
|
4632
|
-
return this._weekOfMonth;
|
|
4633
|
-
}
|
|
4634
|
-
}, {
|
|
4635
|
-
key: "weekOfYear",
|
|
4636
|
-
value: function weekOfYear() {
|
|
4637
|
-
return this._weekOfYear;
|
|
4638
|
-
}
|
|
4639
|
-
}, {
|
|
4640
|
-
key: "weekOfWeekBasedYear",
|
|
4641
|
-
value: function weekOfWeekBasedYear() {
|
|
4642
|
-
return this._weekOfWeekBasedYear;
|
|
4643
|
-
}
|
|
4644
|
-
}, {
|
|
4645
|
-
key: "weekBasedYear",
|
|
4646
|
-
value: function weekBasedYear() {
|
|
4647
|
-
return this._weekBasedYear;
|
|
4648
|
-
}
|
|
4649
|
-
}, {
|
|
4650
|
-
key: "equals",
|
|
4651
|
-
value: function equals(other) {
|
|
4652
|
-
if (this === other) {
|
|
4653
|
-
return true;
|
|
4654
|
-
}
|
|
4459
|
+
var _proto2 = WeekFields.prototype;
|
|
4655
4460
|
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4461
|
+
_proto2.firstDayOfWeek = function firstDayOfWeek() {
|
|
4462
|
+
return this._firstDayOfWeek;
|
|
4463
|
+
};
|
|
4659
4464
|
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
}
|
|
4663
|
-
key: "hashCode",
|
|
4664
|
-
value: function hashCode() {
|
|
4665
|
-
return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
|
|
4666
|
-
}
|
|
4667
|
-
}, {
|
|
4668
|
-
key: "toString",
|
|
4669
|
-
value: function toString() {
|
|
4670
|
-
return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
|
|
4671
|
-
}
|
|
4672
|
-
}], [{
|
|
4673
|
-
key: "of",
|
|
4674
|
-
value: function of(firstDayOrLocale, minDays) {
|
|
4675
|
-
if (minDays === undefined) {
|
|
4676
|
-
return WeekFields.ofLocale(firstDayOrLocale);
|
|
4677
|
-
} else {
|
|
4678
|
-
return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
|
|
4679
|
-
}
|
|
4680
|
-
}
|
|
4681
|
-
}, {
|
|
4682
|
-
key: "ofLocale",
|
|
4683
|
-
value: function ofLocale(locale) {
|
|
4684
|
-
requireNonNull(locale, 'locale');
|
|
4685
|
-
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
|
|
4686
|
-
var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
|
|
4687
|
-
var worldRegion = '001';
|
|
4688
|
-
var weekData = cldr.get('supplemental/weekData');
|
|
4689
|
-
|
|
4690
|
-
var dow = _weekDayMap[weekData.firstDay[locale.country()]];
|
|
4691
|
-
|
|
4692
|
-
if (!dow) {
|
|
4693
|
-
dow = _weekDayMap[weekData.firstDay[worldRegion]];
|
|
4694
|
-
}
|
|
4465
|
+
_proto2.minimalDaysInFirstWeek = function minimalDaysInFirstWeek() {
|
|
4466
|
+
return this._minimalDays;
|
|
4467
|
+
};
|
|
4695
4468
|
|
|
4696
|
-
|
|
4469
|
+
_proto2.dayOfWeek = function dayOfWeek() {
|
|
4470
|
+
return this._dayOfWeek;
|
|
4471
|
+
};
|
|
4697
4472
|
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4473
|
+
_proto2.weekOfMonth = function weekOfMonth() {
|
|
4474
|
+
return this._weekOfMonth;
|
|
4475
|
+
};
|
|
4476
|
+
|
|
4477
|
+
_proto2.weekOfYear = function weekOfYear() {
|
|
4478
|
+
return this._weekOfYear;
|
|
4479
|
+
};
|
|
4480
|
+
|
|
4481
|
+
_proto2.weekOfWeekBasedYear = function weekOfWeekBasedYear() {
|
|
4482
|
+
return this._weekOfWeekBasedYear;
|
|
4483
|
+
};
|
|
4701
4484
|
|
|
4702
|
-
|
|
4485
|
+
_proto2.weekBasedYear = function weekBasedYear() {
|
|
4486
|
+
return this._weekBasedYear;
|
|
4487
|
+
};
|
|
4488
|
+
|
|
4489
|
+
_proto2.equals = function equals(other) {
|
|
4490
|
+
if (this === other) {
|
|
4491
|
+
return true;
|
|
4703
4492
|
}
|
|
4704
|
-
}, {
|
|
4705
|
-
key: "ofFirstDayOfWeekMinDays",
|
|
4706
|
-
value: function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
4707
|
-
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
4708
|
-
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
4709
|
-
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
4710
|
-
var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
|
|
4711
|
-
var rules = WeekFieldsCache.get(key);
|
|
4712
|
-
|
|
4713
|
-
if (rules == null) {
|
|
4714
|
-
rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
|
|
4715
|
-
WeekFieldsCache.set(key, rules);
|
|
4716
|
-
rules = WeekFieldsCache.get(key);
|
|
4717
|
-
}
|
|
4718
4493
|
|
|
4719
|
-
|
|
4494
|
+
if (other instanceof WeekFields) {
|
|
4495
|
+
return this.hashCode() === other.hashCode();
|
|
4720
4496
|
}
|
|
4721
|
-
|
|
4497
|
+
|
|
4498
|
+
return false;
|
|
4499
|
+
};
|
|
4500
|
+
|
|
4501
|
+
_proto2.hashCode = function hashCode() {
|
|
4502
|
+
return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
|
|
4503
|
+
};
|
|
4504
|
+
|
|
4505
|
+
_proto2.toString = function toString() {
|
|
4506
|
+
return "WeekFields[" + this._firstDayOfWeek + "," + this._minimalDays + "]";
|
|
4507
|
+
};
|
|
4722
4508
|
|
|
4723
4509
|
return WeekFields;
|
|
4724
4510
|
}();
|