@js-joda/locale_fr 4.2.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1101 -1307
- package/dist/index.js.map +1 -1
- package/dist/js-joda-locale.d.ts +12 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -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)
|
|
@@ -2899,12 +2899,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2899
2899
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Locale; });
|
|
2900
2900
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_init", function() { return _init; });
|
|
2901
2901
|
/* harmony import */ var _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format/cldr/CldrDateTimeTextProvider */ "./src/format/cldr/CldrDateTimeTextProvider.js");
|
|
2902
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2903
|
-
|
|
2904
|
-
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); } }
|
|
2905
|
-
|
|
2906
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
2907
|
-
|
|
2908
2902
|
/*
|
|
2909
2903
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
2910
2904
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -2912,64 +2906,61 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
2912
2906
|
|
|
2913
2907
|
|
|
2914
2908
|
var Locale = function () {
|
|
2915
|
-
function
|
|
2916
|
-
|
|
2917
|
-
|
|
2909
|
+
Locale.getAvailableLocales = function getAvailableLocales() {
|
|
2910
|
+
return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
|
|
2911
|
+
};
|
|
2918
2912
|
|
|
2919
|
-
|
|
2913
|
+
function Locale(language, country, localeString) {
|
|
2914
|
+
if (country === void 0) {
|
|
2915
|
+
country = '';
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
if (localeString === void 0) {
|
|
2919
|
+
localeString = '';
|
|
2920
|
+
}
|
|
2920
2921
|
|
|
2921
2922
|
this._language = language;
|
|
2922
2923
|
this._country = country;
|
|
2923
2924
|
this._localeString = localeString;
|
|
2924
2925
|
}
|
|
2925
2926
|
|
|
2926
|
-
|
|
2927
|
-
key: "language",
|
|
2928
|
-
value: function language() {
|
|
2929
|
-
return this._language;
|
|
2930
|
-
}
|
|
2931
|
-
}, {
|
|
2932
|
-
key: "country",
|
|
2933
|
-
value: function country() {
|
|
2934
|
-
return this._country;
|
|
2935
|
-
}
|
|
2936
|
-
}, {
|
|
2937
|
-
key: "localeString",
|
|
2938
|
-
value: function localeString() {
|
|
2939
|
-
if (this._localeString.length > 0) {
|
|
2940
|
-
return this._localeString;
|
|
2941
|
-
}
|
|
2927
|
+
var _proto = Locale.prototype;
|
|
2942
2928
|
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2929
|
+
_proto.language = function language() {
|
|
2930
|
+
return this._language;
|
|
2931
|
+
};
|
|
2932
|
+
|
|
2933
|
+
_proto.country = function country() {
|
|
2934
|
+
return this._country;
|
|
2935
|
+
};
|
|
2936
|
+
|
|
2937
|
+
_proto.localeString = function localeString() {
|
|
2938
|
+
if (this._localeString.length > 0) {
|
|
2939
|
+
return this._localeString;
|
|
2948
2940
|
}
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2941
|
+
|
|
2942
|
+
if (this._country.length > 0) {
|
|
2943
|
+
return this._language + "-" + this._country;
|
|
2944
|
+
} else {
|
|
2945
|
+
return this._language;
|
|
2953
2946
|
}
|
|
2954
|
-
}
|
|
2955
|
-
key: "equals",
|
|
2956
|
-
value: function equals(other) {
|
|
2957
|
-
if (!other) {
|
|
2958
|
-
return false;
|
|
2959
|
-
}
|
|
2947
|
+
};
|
|
2960
2948
|
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2949
|
+
_proto.toString = function toString() {
|
|
2950
|
+
return "Locale[" + this.localeString() + "]";
|
|
2951
|
+
};
|
|
2964
2952
|
|
|
2965
|
-
|
|
2953
|
+
_proto.equals = function equals(other) {
|
|
2954
|
+
if (!other) {
|
|
2955
|
+
return false;
|
|
2966
2956
|
}
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
|
|
2957
|
+
|
|
2958
|
+
if (!(other instanceof Locale)) {
|
|
2959
|
+
return false;
|
|
2971
2960
|
}
|
|
2972
|
-
|
|
2961
|
+
|
|
2962
|
+
return this.localeString() === other.localeString();
|
|
2963
|
+
};
|
|
2973
2964
|
|
|
2974
2965
|
return Locale;
|
|
2975
2966
|
}();
|
|
@@ -2987,6 +2978,14 @@ function _init() {
|
|
|
2987
2978
|
Locale.KOREAN = new Locale('ko');
|
|
2988
2979
|
Locale.JAPANESE = new Locale('ja', 'JP');
|
|
2989
2980
|
Locale.JAPAN = new Locale('ja', 'JP', 'ja');
|
|
2981
|
+
Locale.ITALIAN = new Locale('it');
|
|
2982
|
+
Locale.ITALY = new Locale('it', 'IT', 'it');
|
|
2983
|
+
Locale.CHINESE = new Locale('zh');
|
|
2984
|
+
Locale.ROMANIAN = new Locale('ro');
|
|
2985
|
+
Locale.SWEDISH = new Locale('sv');
|
|
2986
|
+
Locale.SWEDEN = new Locale('sv', 'SE', 'sv');
|
|
2987
|
+
Locale.HINDI = new Locale('hi');
|
|
2988
|
+
Locale.RUSSIAN = new Locale('ru');
|
|
2990
2989
|
}
|
|
2991
2990
|
|
|
2992
2991
|
/***/ }),
|
|
@@ -3042,28 +3041,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3042
3041
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3043
3042
|
/* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locale */ "./src/Locale.js");
|
|
3044
3043
|
/* harmony import */ var _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cldr/CldrDateTimeFormatterBuilder */ "./src/format/cldr/CldrDateTimeFormatterBuilder.js");
|
|
3045
|
-
function
|
|
3046
|
-
|
|
3047
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3048
|
-
|
|
3049
|
-
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); } }
|
|
3050
|
-
|
|
3051
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3052
|
-
|
|
3053
|
-
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); }
|
|
3044
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
3054
3045
|
|
|
3055
3046
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3056
3047
|
|
|
3057
|
-
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); }; }
|
|
3058
|
-
|
|
3059
|
-
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); }
|
|
3060
|
-
|
|
3061
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3062
|
-
|
|
3063
|
-
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; } }
|
|
3064
|
-
|
|
3065
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3066
|
-
|
|
3067
3048
|
/*
|
|
3068
3049
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
3069
3050
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -3074,28 +3055,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
3074
3055
|
var requireNonNull = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].assert.requireNonNull;
|
|
3075
3056
|
|
|
3076
3057
|
var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
var _super = _createSuper(LocaleDateTimeFormatter);
|
|
3058
|
+
_inheritsLoose(LocaleDateTimeFormatter, _DateTimeFormatter);
|
|
3080
3059
|
|
|
3081
3060
|
function LocaleDateTimeFormatter() {
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
return _super.apply(this, arguments);
|
|
3061
|
+
return _DateTimeFormatter.apply(this, arguments) || this;
|
|
3085
3062
|
}
|
|
3086
3063
|
|
|
3087
|
-
|
|
3088
|
-
key: "withLocale",
|
|
3089
|
-
value: function withLocale(locale) {
|
|
3090
|
-
requireNonNull(locale, 'locale');
|
|
3064
|
+
var _proto = LocaleDateTimeFormatter.prototype;
|
|
3091
3065
|
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
}
|
|
3066
|
+
_proto.withLocale = function withLocale(locale) {
|
|
3067
|
+
requireNonNull(locale, 'locale');
|
|
3095
3068
|
|
|
3096
|
-
|
|
3069
|
+
if (locale.equals(this._locale)) {
|
|
3070
|
+
return this;
|
|
3097
3071
|
}
|
|
3098
|
-
|
|
3072
|
+
|
|
3073
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
|
|
3074
|
+
};
|
|
3099
3075
|
|
|
3100
3076
|
return LocaleDateTimeFormatter;
|
|
3101
3077
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"]);
|
|
@@ -3141,12 +3117,6 @@ function _init() {
|
|
|
3141
3117
|
__webpack_require__.r(__webpack_exports__);
|
|
3142
3118
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEntry", function() { return createEntry; });
|
|
3143
3119
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleStore", function() { return LocaleStore; });
|
|
3144
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3145
|
-
|
|
3146
|
-
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); } }
|
|
3147
|
-
|
|
3148
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3149
|
-
|
|
3150
3120
|
/*
|
|
3151
3121
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
3152
3122
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -3156,7 +3126,7 @@ var createEntry = function createEntry(text, field) {
|
|
|
3156
3126
|
key: text,
|
|
3157
3127
|
value: field,
|
|
3158
3128
|
toString: function toString() {
|
|
3159
|
-
return
|
|
3129
|
+
return text + "->" + field;
|
|
3160
3130
|
}
|
|
3161
3131
|
};
|
|
3162
3132
|
};
|
|
@@ -3167,8 +3137,6 @@ var _comparator = function _comparator(obj1, obj2) {
|
|
|
3167
3137
|
|
|
3168
3138
|
var LocaleStore = function () {
|
|
3169
3139
|
function LocaleStore(valueTextMap) {
|
|
3170
|
-
_classCallCheck(this, LocaleStore);
|
|
3171
|
-
|
|
3172
3140
|
this._valueTextMap = valueTextMap;
|
|
3173
3141
|
var map = {};
|
|
3174
3142
|
var allList = [];
|
|
@@ -3192,19 +3160,17 @@ var LocaleStore = function () {
|
|
|
3192
3160
|
this._parsable = map;
|
|
3193
3161
|
}
|
|
3194
3162
|
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
}
|
|
3207
|
-
}]);
|
|
3163
|
+
var _proto = LocaleStore.prototype;
|
|
3164
|
+
|
|
3165
|
+
_proto.getText = function getText(value, style) {
|
|
3166
|
+
var map = this._valueTextMap[style];
|
|
3167
|
+
return map != null ? map[value] : null;
|
|
3168
|
+
};
|
|
3169
|
+
|
|
3170
|
+
_proto.getTextIterator = function getTextIterator(style) {
|
|
3171
|
+
var list = this._parsable[style];
|
|
3172
|
+
return list != null ? list[Symbol.iterator]() : null;
|
|
3173
|
+
};
|
|
3208
3174
|
|
|
3209
3175
|
return LocaleStore;
|
|
3210
3176
|
}();
|
|
@@ -3287,28 +3253,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3287
3253
|
/* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
|
|
3288
3254
|
/* harmony import */ var _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser/LocalizedOffsetPrinterParser */ "./src/format/parser/LocalizedOffsetPrinterParser.js");
|
|
3289
3255
|
/* harmony import */ var _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../parser/WeekFieldsPrinterParser */ "./src/format/parser/WeekFieldsPrinterParser.js");
|
|
3290
|
-
function
|
|
3291
|
-
|
|
3292
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3293
|
-
|
|
3294
|
-
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); } }
|
|
3295
|
-
|
|
3296
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3297
|
-
|
|
3298
|
-
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); }
|
|
3256
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
3299
3257
|
|
|
3300
3258
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3301
3259
|
|
|
3302
|
-
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); }; }
|
|
3303
|
-
|
|
3304
|
-
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); }
|
|
3305
|
-
|
|
3306
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3307
|
-
|
|
3308
|
-
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; } }
|
|
3309
|
-
|
|
3310
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3311
|
-
|
|
3312
3260
|
/**
|
|
3313
3261
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
3314
3262
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -3326,98 +3274,87 @@ var _jodaInternal$assert = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].asser
|
|
|
3326
3274
|
requireInstance = _jodaInternal$assert.requireInstance;
|
|
3327
3275
|
|
|
3328
3276
|
var CldrDateTimeFormatterBuilder = function (_DateTimeFormatterBui) {
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
var _super = _createSuper(CldrDateTimeFormatterBuilder);
|
|
3277
|
+
_inheritsLoose(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
|
|
3332
3278
|
|
|
3333
3279
|
function CldrDateTimeFormatterBuilder() {
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
return _super.apply(this, arguments);
|
|
3280
|
+
return _DateTimeFormatterBui.apply(this, arguments) || this;
|
|
3337
3281
|
}
|
|
3338
3282
|
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
}
|
|
3349
|
-
}
|
|
3350
|
-
}, {
|
|
3351
|
-
key: "appendTextField",
|
|
3352
|
-
value: function appendTextField(field) {
|
|
3353
|
-
return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
|
|
3283
|
+
var _proto = CldrDateTimeFormatterBuilder.prototype;
|
|
3284
|
+
|
|
3285
|
+
_proto.appendText = function appendText(field, styleOrMap) {
|
|
3286
|
+
if (styleOrMap === undefined) {
|
|
3287
|
+
return this.appendTextField(field);
|
|
3288
|
+
} else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
|
|
3289
|
+
return this.appendTextFieldStyle(field, styleOrMap);
|
|
3290
|
+
} else {
|
|
3291
|
+
return this.appendTextFieldMap(field, styleOrMap);
|
|
3354
3292
|
}
|
|
3355
|
-
}
|
|
3356
|
-
key: "appendTextFieldStyle",
|
|
3357
|
-
value: function appendTextFieldStyle(field, textStyle) {
|
|
3358
|
-
requireNonNull(field, 'field');
|
|
3359
|
-
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
|
|
3360
|
-
requireNonNull(textStyle, 'textStyle');
|
|
3361
|
-
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
3293
|
+
};
|
|
3362
3294
|
|
|
3363
|
-
|
|
3295
|
+
_proto.appendTextField = function appendTextField(field) {
|
|
3296
|
+
return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
|
|
3297
|
+
};
|
|
3364
3298
|
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
requireNonNull(field, 'field');
|
|
3371
|
-
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
|
|
3372
|
-
requireNonNull(textLookup, 'textLookup');
|
|
3373
|
-
var copy = Object.assign({}, textLookup);
|
|
3374
|
-
var map = {};
|
|
3375
|
-
map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
|
|
3376
|
-
var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
|
|
3377
|
-
var provider = {
|
|
3378
|
-
getText: function getText(field, value, style) {
|
|
3379
|
-
return store.getText(value, style);
|
|
3380
|
-
},
|
|
3381
|
-
getTextIterator: function getTextIterator(field, style) {
|
|
3382
|
-
return store.getTextIterator(style);
|
|
3383
|
-
}
|
|
3384
|
-
};
|
|
3299
|
+
_proto.appendTextFieldStyle = function appendTextFieldStyle(field, textStyle) {
|
|
3300
|
+
requireNonNull(field, 'field');
|
|
3301
|
+
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
|
|
3302
|
+
requireNonNull(textStyle, 'textStyle');
|
|
3303
|
+
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
3385
3304
|
|
|
3386
|
-
|
|
3305
|
+
this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
|
|
3387
3306
|
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3307
|
+
return this;
|
|
3308
|
+
};
|
|
3309
|
+
|
|
3310
|
+
_proto.appendTextFieldMap = function appendTextFieldMap(field, textLookup) {
|
|
3311
|
+
requireNonNull(field, 'field');
|
|
3312
|
+
requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
|
|
3313
|
+
requireNonNull(textLookup, 'textLookup');
|
|
3314
|
+
var copy = Object.assign({}, textLookup);
|
|
3315
|
+
var map = {};
|
|
3316
|
+
map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
|
|
3317
|
+
var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
|
|
3318
|
+
var provider = {
|
|
3319
|
+
getText: function getText(field, value, style) {
|
|
3320
|
+
return store.getText(value, style);
|
|
3321
|
+
},
|
|
3322
|
+
getTextIterator: function getTextIterator(field, style) {
|
|
3323
|
+
return store.getTextIterator(style);
|
|
3324
|
+
}
|
|
3325
|
+
};
|
|
3395
3326
|
|
|
3396
|
-
|
|
3327
|
+
this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
|
|
3397
3328
|
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
}, {
|
|
3401
|
-
key: "appendZoneText",
|
|
3402
|
-
value: function appendZoneText(textStyle) {
|
|
3403
|
-
this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
|
|
3329
|
+
return this;
|
|
3330
|
+
};
|
|
3404
3331
|
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
key: "appendLocalizedOffset",
|
|
3409
|
-
value: function appendLocalizedOffset(textStyle) {
|
|
3410
|
-
requireNonNull(textStyle, 'textStyle');
|
|
3332
|
+
_proto.appendWeekField = function appendWeekField(field, count) {
|
|
3333
|
+
requireNonNull(field, 'field');
|
|
3334
|
+
requireNonNull(count, 'count');
|
|
3411
3335
|
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3336
|
+
this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
|
|
3337
|
+
|
|
3338
|
+
return this;
|
|
3339
|
+
};
|
|
3415
3340
|
|
|
3416
|
-
|
|
3341
|
+
_proto.appendZoneText = function appendZoneText(textStyle) {
|
|
3342
|
+
this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
|
|
3417
3343
|
|
|
3418
|
-
|
|
3344
|
+
return this;
|
|
3345
|
+
};
|
|
3346
|
+
|
|
3347
|
+
_proto.appendLocalizedOffset = function appendLocalizedOffset(textStyle) {
|
|
3348
|
+
requireNonNull(textStyle, 'textStyle');
|
|
3349
|
+
|
|
3350
|
+
if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
|
|
3351
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
|
|
3419
3352
|
}
|
|
3420
|
-
|
|
3353
|
+
|
|
3354
|
+
this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
|
|
3355
|
+
|
|
3356
|
+
return this;
|
|
3357
|
+
};
|
|
3421
3358
|
|
|
3422
3359
|
return CldrDateTimeFormatterBuilder;
|
|
3423
3360
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"]);
|
|
@@ -3442,12 +3379,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3442
3379
|
/* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
|
|
3443
3380
|
/* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
|
|
3444
3381
|
/* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
|
|
3445
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3446
|
-
|
|
3447
|
-
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); } }
|
|
3448
|
-
|
|
3449
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3450
|
-
|
|
3451
3382
|
/*
|
|
3452
3383
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
3453
3384
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -3459,218 +3390,210 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
3459
3390
|
|
|
3460
3391
|
var CldrDateTimeTextProvider = function () {
|
|
3461
3392
|
function CldrDateTimeTextProvider() {
|
|
3462
|
-
_classCallCheck(this, CldrDateTimeTextProvider);
|
|
3463
|
-
|
|
3464
3393
|
this._cache = {};
|
|
3465
3394
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])('supplemental/likelySubtags.json');
|
|
3466
3395
|
}
|
|
3467
3396
|
|
|
3468
|
-
|
|
3469
|
-
key: "getAvailableLocales",
|
|
3470
|
-
value: function getAvailableLocales() {
|
|
3471
|
-
if (true) {
|
|
3472
|
-
return ["fr.*"];
|
|
3473
|
-
}
|
|
3397
|
+
var _proto = CldrDateTimeTextProvider.prototype;
|
|
3474
3398
|
|
|
3475
|
-
|
|
3399
|
+
_proto.getAvailableLocales = function getAvailableLocales() {
|
|
3400
|
+
if (true) {
|
|
3401
|
+
return ["fr.*"];
|
|
3476
3402
|
}
|
|
3477
|
-
}, {
|
|
3478
|
-
key: "getText",
|
|
3479
|
-
value: function getText(field, value, style, locale) {
|
|
3480
|
-
var store = this._findStore(field, locale);
|
|
3481
3403
|
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
}
|
|
3404
|
+
return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
|
|
3405
|
+
};
|
|
3485
3406
|
|
|
3486
|
-
|
|
3407
|
+
_proto.getText = function getText(field, value, style, locale) {
|
|
3408
|
+
var store = this._findStore(field, locale);
|
|
3409
|
+
|
|
3410
|
+
if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
|
|
3411
|
+
return store.getText(value, style);
|
|
3487
3412
|
}
|
|
3488
|
-
}, {
|
|
3489
|
-
key: "getTextIterator",
|
|
3490
|
-
value: function getTextIterator(field, style, locale) {
|
|
3491
|
-
var store = this._findStore(field, locale);
|
|
3492
3413
|
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
}
|
|
3414
|
+
return null;
|
|
3415
|
+
};
|
|
3496
3416
|
|
|
3497
|
-
|
|
3417
|
+
_proto.getTextIterator = function getTextIterator(field, style, locale) {
|
|
3418
|
+
var store = this._findStore(field, locale);
|
|
3419
|
+
|
|
3420
|
+
if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
|
|
3421
|
+
return store.getTextIterator(style);
|
|
3498
3422
|
}
|
|
3499
|
-
}, {
|
|
3500
|
-
key: "_findStore",
|
|
3501
|
-
value: function _findStore(field, locale) {
|
|
3502
|
-
var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
|
|
3503
|
-
var store = this._cache[key];
|
|
3504
|
-
|
|
3505
|
-
if (store === undefined) {
|
|
3506
|
-
store = this._createStore(field, locale);
|
|
3507
|
-
this._cache[key] = store;
|
|
3508
|
-
}
|
|
3509
3423
|
|
|
3510
|
-
|
|
3424
|
+
return null;
|
|
3425
|
+
};
|
|
3426
|
+
|
|
3427
|
+
_proto._findStore = function _findStore(field, locale) {
|
|
3428
|
+
var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
|
|
3429
|
+
var store = this._cache[key];
|
|
3430
|
+
|
|
3431
|
+
if (store === undefined) {
|
|
3432
|
+
store = this._createStore(field, locale);
|
|
3433
|
+
this._cache[key] = store;
|
|
3511
3434
|
}
|
|
3512
|
-
}, {
|
|
3513
|
-
key: "_createStore",
|
|
3514
|
-
value: function _createStore(field, locale) {
|
|
3515
|
-
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/".concat(locale.localeString(), "/ca-gregorian.json"));
|
|
3516
|
-
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
|
|
3517
|
-
|
|
3518
|
-
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
|
|
3519
|
-
var monthsData = cldr.main('dates/calendars/gregorian/months/format');
|
|
3520
|
-
var styleMap = {};
|
|
3521
|
-
var data = {};
|
|
3522
|
-
data[1] = monthsData.wide[1];
|
|
3523
|
-
data[2] = monthsData.wide[2];
|
|
3524
|
-
data[3] = monthsData.wide[3];
|
|
3525
|
-
data[4] = monthsData.wide[4];
|
|
3526
|
-
data[5] = monthsData.wide[5];
|
|
3527
|
-
data[6] = monthsData.wide[6];
|
|
3528
|
-
data[7] = monthsData.wide[7];
|
|
3529
|
-
data[8] = monthsData.wide[8];
|
|
3530
|
-
data[9] = monthsData.wide[9];
|
|
3531
|
-
data[10] = monthsData.wide[10];
|
|
3532
|
-
data[11] = monthsData.wide[11];
|
|
3533
|
-
data[12] = monthsData.wide[12];
|
|
3534
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
|
|
3535
|
-
data = {};
|
|
3536
|
-
data[1] = monthsData.narrow[1];
|
|
3537
|
-
data[2] = monthsData.narrow[2];
|
|
3538
|
-
data[3] = monthsData.narrow[3];
|
|
3539
|
-
data[4] = monthsData.narrow[4];
|
|
3540
|
-
data[5] = monthsData.narrow[5];
|
|
3541
|
-
data[6] = monthsData.narrow[6];
|
|
3542
|
-
data[7] = monthsData.narrow[7];
|
|
3543
|
-
data[8] = monthsData.narrow[8];
|
|
3544
|
-
data[9] = monthsData.narrow[9];
|
|
3545
|
-
data[10] = monthsData.narrow[10];
|
|
3546
|
-
data[11] = monthsData.narrow[11];
|
|
3547
|
-
data[12] = monthsData.narrow[12];
|
|
3548
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
|
|
3549
|
-
data = {};
|
|
3550
|
-
data[1] = monthsData.abbreviated[1];
|
|
3551
|
-
data[2] = monthsData.abbreviated[2];
|
|
3552
|
-
data[3] = monthsData.abbreviated[3];
|
|
3553
|
-
data[4] = monthsData.abbreviated[4];
|
|
3554
|
-
data[5] = monthsData.abbreviated[5];
|
|
3555
|
-
data[6] = monthsData.abbreviated[6];
|
|
3556
|
-
data[7] = monthsData.abbreviated[7];
|
|
3557
|
-
data[8] = monthsData.abbreviated[8];
|
|
3558
|
-
data[9] = monthsData.abbreviated[9];
|
|
3559
|
-
data[10] = monthsData.abbreviated[10];
|
|
3560
|
-
data[11] = monthsData.abbreviated[11];
|
|
3561
|
-
data[12] = monthsData.abbreviated[12];
|
|
3562
|
-
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
|
|
3563
|
-
return this._createLocaleStore(styleMap);
|
|
3564
|
-
}
|
|
3565
3435
|
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
var _styleMap = {};
|
|
3569
|
-
var _data = {};
|
|
3570
|
-
_data[1] = daysData.wide.mon;
|
|
3571
|
-
_data[2] = daysData.wide.tue;
|
|
3572
|
-
_data[3] = daysData.wide.wed;
|
|
3573
|
-
_data[4] = daysData.wide.thu;
|
|
3574
|
-
_data[5] = daysData.wide.fri;
|
|
3575
|
-
_data[6] = daysData.wide.sat;
|
|
3576
|
-
_data[7] = daysData.wide.sun;
|
|
3577
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
|
|
3578
|
-
_data = {};
|
|
3579
|
-
_data[1] = daysData.narrow.mon;
|
|
3580
|
-
_data[2] = daysData.narrow.tue;
|
|
3581
|
-
_data[3] = daysData.narrow.wed;
|
|
3582
|
-
_data[4] = daysData.narrow.thu;
|
|
3583
|
-
_data[5] = daysData.narrow.fri;
|
|
3584
|
-
_data[6] = daysData.narrow.sat;
|
|
3585
|
-
_data[7] = daysData.narrow.sun;
|
|
3586
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
|
|
3587
|
-
_data = {};
|
|
3588
|
-
_data[1] = daysData.abbreviated.mon;
|
|
3589
|
-
_data[2] = daysData.abbreviated.tue;
|
|
3590
|
-
_data[3] = daysData.abbreviated.wed;
|
|
3591
|
-
_data[4] = daysData.abbreviated.thu;
|
|
3592
|
-
_data[5] = daysData.abbreviated.fri;
|
|
3593
|
-
_data[6] = daysData.abbreviated.sat;
|
|
3594
|
-
_data[7] = daysData.abbreviated.sun;
|
|
3595
|
-
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
|
|
3596
|
-
return this._createLocaleStore(_styleMap);
|
|
3597
|
-
}
|
|
3436
|
+
return store;
|
|
3437
|
+
};
|
|
3598
3438
|
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3439
|
+
_proto._createStore = function _createStore(field, locale) {
|
|
3440
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/" + locale.localeString() + "/ca-gregorian.json");
|
|
3441
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
|
|
3442
|
+
|
|
3443
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
|
|
3444
|
+
var monthsData = cldr.main('dates/calendars/gregorian/months/format');
|
|
3445
|
+
var styleMap = {};
|
|
3446
|
+
var data = {};
|
|
3447
|
+
data[1] = monthsData.wide[1];
|
|
3448
|
+
data[2] = monthsData.wide[2];
|
|
3449
|
+
data[3] = monthsData.wide[3];
|
|
3450
|
+
data[4] = monthsData.wide[4];
|
|
3451
|
+
data[5] = monthsData.wide[5];
|
|
3452
|
+
data[6] = monthsData.wide[6];
|
|
3453
|
+
data[7] = monthsData.wide[7];
|
|
3454
|
+
data[8] = monthsData.wide[8];
|
|
3455
|
+
data[9] = monthsData.wide[9];
|
|
3456
|
+
data[10] = monthsData.wide[10];
|
|
3457
|
+
data[11] = monthsData.wide[11];
|
|
3458
|
+
data[12] = monthsData.wide[12];
|
|
3459
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
|
|
3460
|
+
data = {};
|
|
3461
|
+
data[1] = monthsData.narrow[1];
|
|
3462
|
+
data[2] = monthsData.narrow[2];
|
|
3463
|
+
data[3] = monthsData.narrow[3];
|
|
3464
|
+
data[4] = monthsData.narrow[4];
|
|
3465
|
+
data[5] = monthsData.narrow[5];
|
|
3466
|
+
data[6] = monthsData.narrow[6];
|
|
3467
|
+
data[7] = monthsData.narrow[7];
|
|
3468
|
+
data[8] = monthsData.narrow[8];
|
|
3469
|
+
data[9] = monthsData.narrow[9];
|
|
3470
|
+
data[10] = monthsData.narrow[10];
|
|
3471
|
+
data[11] = monthsData.narrow[11];
|
|
3472
|
+
data[12] = monthsData.narrow[12];
|
|
3473
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
|
|
3474
|
+
data = {};
|
|
3475
|
+
data[1] = monthsData.abbreviated[1];
|
|
3476
|
+
data[2] = monthsData.abbreviated[2];
|
|
3477
|
+
data[3] = monthsData.abbreviated[3];
|
|
3478
|
+
data[4] = monthsData.abbreviated[4];
|
|
3479
|
+
data[5] = monthsData.abbreviated[5];
|
|
3480
|
+
data[6] = monthsData.abbreviated[6];
|
|
3481
|
+
data[7] = monthsData.abbreviated[7];
|
|
3482
|
+
data[8] = monthsData.abbreviated[8];
|
|
3483
|
+
data[9] = monthsData.abbreviated[9];
|
|
3484
|
+
data[10] = monthsData.abbreviated[10];
|
|
3485
|
+
data[11] = monthsData.abbreviated[11];
|
|
3486
|
+
data[12] = monthsData.abbreviated[12];
|
|
3487
|
+
styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
|
|
3488
|
+
return this._createLocaleStore(styleMap);
|
|
3489
|
+
}
|
|
3616
3490
|
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3491
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
|
|
3492
|
+
var daysData = cldr.main('dates/calendars/gregorian/days/format');
|
|
3493
|
+
var _styleMap = {};
|
|
3494
|
+
var _data = {};
|
|
3495
|
+
_data[1] = daysData.wide.mon;
|
|
3496
|
+
_data[2] = daysData.wide.tue;
|
|
3497
|
+
_data[3] = daysData.wide.wed;
|
|
3498
|
+
_data[4] = daysData.wide.thu;
|
|
3499
|
+
_data[5] = daysData.wide.fri;
|
|
3500
|
+
_data[6] = daysData.wide.sat;
|
|
3501
|
+
_data[7] = daysData.wide.sun;
|
|
3502
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
|
|
3503
|
+
_data = {};
|
|
3504
|
+
_data[1] = daysData.narrow.mon;
|
|
3505
|
+
_data[2] = daysData.narrow.tue;
|
|
3506
|
+
_data[3] = daysData.narrow.wed;
|
|
3507
|
+
_data[4] = daysData.narrow.thu;
|
|
3508
|
+
_data[5] = daysData.narrow.fri;
|
|
3509
|
+
_data[6] = daysData.narrow.sat;
|
|
3510
|
+
_data[7] = daysData.narrow.sun;
|
|
3511
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
|
|
3512
|
+
_data = {};
|
|
3513
|
+
_data[1] = daysData.abbreviated.mon;
|
|
3514
|
+
_data[2] = daysData.abbreviated.tue;
|
|
3515
|
+
_data[3] = daysData.abbreviated.wed;
|
|
3516
|
+
_data[4] = daysData.abbreviated.thu;
|
|
3517
|
+
_data[5] = daysData.abbreviated.fri;
|
|
3518
|
+
_data[6] = daysData.abbreviated.sat;
|
|
3519
|
+
_data[7] = daysData.abbreviated.sun;
|
|
3520
|
+
_styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
|
|
3521
|
+
return this._createLocaleStore(_styleMap);
|
|
3522
|
+
}
|
|
3634
3523
|
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
_data4[2] = quartersData.abbreviated['2'];
|
|
3653
|
-
_data4[3] = quartersData.abbreviated['3'];
|
|
3654
|
-
_data4[4] = quartersData.abbreviated['4'];
|
|
3655
|
-
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
|
|
3656
|
-
return this._createLocaleStore(_styleMap4);
|
|
3657
|
-
}
|
|
3524
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
|
|
3525
|
+
var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
|
|
3526
|
+
var _styleMap2 = {};
|
|
3527
|
+
var _data2 = {};
|
|
3528
|
+
_data2[0] = dayPeriodsData.wide.am;
|
|
3529
|
+
_data2[1] = dayPeriodsData.wide.pm;
|
|
3530
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
|
|
3531
|
+
_data2 = {};
|
|
3532
|
+
_data2[0] = dayPeriodsData.narrow.am;
|
|
3533
|
+
_data2[1] = dayPeriodsData.narrow.pm;
|
|
3534
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
|
|
3535
|
+
_data2 = {};
|
|
3536
|
+
_data2[0] = dayPeriodsData.abbreviated.am;
|
|
3537
|
+
_data2[1] = dayPeriodsData.abbreviated.pm;
|
|
3538
|
+
_styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
|
|
3539
|
+
return this._createLocaleStore(_styleMap2);
|
|
3540
|
+
}
|
|
3658
3541
|
|
|
3659
|
-
|
|
3542
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
|
|
3543
|
+
var erasData = cldr.main('dates/calendars/gregorian/eras');
|
|
3544
|
+
var _styleMap3 = {};
|
|
3545
|
+
var _data3 = {};
|
|
3546
|
+
_data3[0] = erasData.eraNames['0'];
|
|
3547
|
+
_data3[1] = erasData.eraNames['1'];
|
|
3548
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
|
|
3549
|
+
_data3 = {};
|
|
3550
|
+
_data3[0] = erasData.eraNarrow['0'];
|
|
3551
|
+
_data3[1] = erasData.eraNarrow['1'];
|
|
3552
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
|
|
3553
|
+
_data3 = {};
|
|
3554
|
+
_data3[0] = erasData.eraAbbr['0'];
|
|
3555
|
+
_data3[1] = erasData.eraAbbr['1'];
|
|
3556
|
+
_styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
|
|
3557
|
+
return this._createLocaleStore(_styleMap3);
|
|
3660
3558
|
}
|
|
3661
|
-
}, {
|
|
3662
|
-
key: "_createLocaleStore",
|
|
3663
|
-
value: function _createLocaleStore(valueTextMap) {
|
|
3664
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
|
|
3665
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
|
|
3666
|
-
|
|
3667
|
-
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) {
|
|
3668
|
-
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
|
|
3669
|
-
}
|
|
3670
3559
|
|
|
3671
|
-
|
|
3560
|
+
if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
|
|
3561
|
+
var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
|
|
3562
|
+
var _styleMap4 = {};
|
|
3563
|
+
var _data4 = {};
|
|
3564
|
+
_data4[1] = quartersData.wide['1'];
|
|
3565
|
+
_data4[2] = quartersData.wide['2'];
|
|
3566
|
+
_data4[3] = quartersData.wide['3'];
|
|
3567
|
+
_data4[4] = quartersData.wide['4'];
|
|
3568
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
|
|
3569
|
+
_data4 = {};
|
|
3570
|
+
_data4[1] = quartersData.narrow['1'];
|
|
3571
|
+
_data4[2] = quartersData.narrow['2'];
|
|
3572
|
+
_data4[3] = quartersData.narrow['3'];
|
|
3573
|
+
_data4[4] = quartersData.narrow['4'];
|
|
3574
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
|
|
3575
|
+
_data4 = {};
|
|
3576
|
+
_data4[1] = quartersData.abbreviated['1'];
|
|
3577
|
+
_data4[2] = quartersData.abbreviated['2'];
|
|
3578
|
+
_data4[3] = quartersData.abbreviated['3'];
|
|
3579
|
+
_data4[4] = quartersData.abbreviated['4'];
|
|
3580
|
+
_styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
|
|
3581
|
+
return this._createLocaleStore(_styleMap4);
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
return null;
|
|
3585
|
+
};
|
|
3586
|
+
|
|
3587
|
+
_proto._createLocaleStore = function _createLocaleStore(valueTextMap) {
|
|
3588
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
|
|
3589
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
|
|
3590
|
+
|
|
3591
|
+
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) {
|
|
3592
|
+
valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
|
|
3672
3593
|
}
|
|
3673
|
-
|
|
3594
|
+
|
|
3595
|
+
return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
|
|
3596
|
+
};
|
|
3674
3597
|
|
|
3675
3598
|
return CldrDateTimeTextProvider;
|
|
3676
3599
|
}();
|
|
@@ -3692,18 +3615,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3692
3615
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
3693
3616
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3694
3617
|
/* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
|
|
3695
|
-
function
|
|
3618
|
+
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."); }
|
|
3696
3619
|
|
|
3697
3620
|
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); }
|
|
3698
3621
|
|
|
3699
3622
|
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; }
|
|
3700
3623
|
|
|
3701
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3702
|
-
|
|
3703
|
-
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); } }
|
|
3704
|
-
|
|
3705
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3706
|
-
|
|
3707
3624
|
/*
|
|
3708
3625
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
3709
3626
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -3728,8 +3645,6 @@ var resolveZoneIdTextCache = {};
|
|
|
3728
3645
|
|
|
3729
3646
|
var CldrZoneTextPrinterParser = function () {
|
|
3730
3647
|
function CldrZoneTextPrinterParser(textStyle) {
|
|
3731
|
-
_classCallCheck(this, CldrZoneTextPrinterParser);
|
|
3732
|
-
|
|
3733
3648
|
requireNonNull(textStyle, 'textStyle');
|
|
3734
3649
|
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
3735
3650
|
this._textStyle = textStyle;
|
|
@@ -3738,202 +3653,178 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3738
3653
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/metaZones.json');
|
|
3739
3654
|
}
|
|
3740
3655
|
|
|
3741
|
-
|
|
3742
|
-
key: "_cachedResolveZoneIdText",
|
|
3743
|
-
value: function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
|
|
3744
|
-
if (resolveZoneIdTextCache[cldr.locale] == null) {
|
|
3745
|
-
resolveZoneIdTextCache[cldr.locale] = {};
|
|
3746
|
-
}
|
|
3656
|
+
var _proto = CldrZoneTextPrinterParser.prototype;
|
|
3747
3657
|
|
|
3748
|
-
|
|
3658
|
+
_proto._cachedResolveZoneIdText = function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
|
|
3659
|
+
if (resolveZoneIdTextCache[cldr.locale] == null) {
|
|
3660
|
+
resolveZoneIdTextCache[cldr.locale] = {};
|
|
3661
|
+
}
|
|
3749
3662
|
|
|
3750
|
-
|
|
3751
|
-
zoneIdToStyle[zoneId] = {};
|
|
3752
|
-
}
|
|
3663
|
+
var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
|
|
3753
3664
|
|
|
3754
|
-
|
|
3665
|
+
if (zoneIdToStyle[zoneId] == null) {
|
|
3666
|
+
zoneIdToStyle[zoneId] = {};
|
|
3667
|
+
}
|
|
3755
3668
|
|
|
3756
|
-
|
|
3757
|
-
styleToType[style] = {};
|
|
3758
|
-
}
|
|
3669
|
+
var styleToType = zoneIdToStyle[zoneId];
|
|
3759
3670
|
|
|
3760
|
-
|
|
3671
|
+
if (styleToType[style] == null) {
|
|
3672
|
+
styleToType[style] = {};
|
|
3673
|
+
}
|
|
3761
3674
|
|
|
3762
|
-
|
|
3763
|
-
typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
|
|
3764
|
-
}
|
|
3675
|
+
var typeToResolvedZoneIdText = styleToType[style];
|
|
3765
3676
|
|
|
3766
|
-
|
|
3677
|
+
if (typeToResolvedZoneIdText[type] == null) {
|
|
3678
|
+
typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
|
|
3767
3679
|
}
|
|
3768
|
-
}, {
|
|
3769
|
-
key: "_resolveZoneIdText",
|
|
3770
|
-
value: function _resolveZoneIdText(cldr, zoneId, style, type) {
|
|
3771
|
-
var zoneData = cldr.main("dates/timeZoneNames/zone/".concat(zoneId, "/").concat(style, "/").concat(type));
|
|
3772
3680
|
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3681
|
+
return typeToResolvedZoneIdText[type];
|
|
3682
|
+
};
|
|
3683
|
+
|
|
3684
|
+
_proto._resolveZoneIdText = function _resolveZoneIdText(cldr, zoneId, style, type) {
|
|
3685
|
+
var zoneData = cldr.main("dates/timeZoneNames/zone/" + zoneId + "/" + style + "/" + type);
|
|
3686
|
+
|
|
3687
|
+
if (zoneData) {
|
|
3688
|
+
return zoneData;
|
|
3689
|
+
} else {
|
|
3690
|
+
var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/" + zoneId);
|
|
3691
|
+
|
|
3692
|
+
if (metazoneInfo) {
|
|
3693
|
+
var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
|
|
3694
|
+
var metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/" + type);
|
|
3777
3695
|
|
|
3778
|
-
if (
|
|
3779
|
-
|
|
3780
|
-
|
|
3696
|
+
if (metaZoneData) {
|
|
3697
|
+
return metaZoneData;
|
|
3698
|
+
} else {
|
|
3699
|
+
metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/generic");
|
|
3700
|
+
|
|
3701
|
+
if (!metaZoneData) {
|
|
3702
|
+
metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/standard");
|
|
3703
|
+
}
|
|
3781
3704
|
|
|
3782
3705
|
if (metaZoneData) {
|
|
3783
3706
|
return metaZoneData;
|
|
3784
3707
|
} else {
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
if (!metaZoneData) {
|
|
3788
|
-
metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/standard"));
|
|
3789
|
-
}
|
|
3708
|
+
var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
|
|
3709
|
+
var preferredZone = mapZones[metazone][cldr.attributes.territory];
|
|
3790
3710
|
|
|
3791
|
-
if (
|
|
3792
|
-
|
|
3711
|
+
if (preferredZone) {
|
|
3712
|
+
if (preferredZone !== zoneId) {
|
|
3713
|
+
return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
|
|
3714
|
+
}
|
|
3793
3715
|
} else {
|
|
3794
|
-
var
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
if (preferredZone !== zoneId) {
|
|
3799
|
-
return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
|
|
3800
|
-
}
|
|
3801
|
-
} else {
|
|
3802
|
-
var goldenZone = mapZones[metazone]['001'];
|
|
3803
|
-
|
|
3804
|
-
if (goldenZone !== zoneId) {
|
|
3805
|
-
return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
|
|
3806
|
-
}
|
|
3716
|
+
var goldenZone = mapZones[metazone]['001'];
|
|
3717
|
+
|
|
3718
|
+
if (goldenZone !== zoneId) {
|
|
3719
|
+
return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
|
|
3807
3720
|
}
|
|
3808
3721
|
}
|
|
3809
3722
|
}
|
|
3810
3723
|
}
|
|
3811
3724
|
}
|
|
3812
3725
|
}
|
|
3813
|
-
}
|
|
3814
|
-
key: "print",
|
|
3815
|
-
value: function print(context, buf) {
|
|
3816
|
-
var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
|
|
3817
|
-
|
|
3818
|
-
if (zone == null) {
|
|
3819
|
-
return false;
|
|
3820
|
-
}
|
|
3821
|
-
|
|
3822
|
-
if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
|
|
3823
|
-
buf.append(zone.id());
|
|
3824
|
-
return true;
|
|
3825
|
-
}
|
|
3826
|
-
|
|
3827
|
-
var daylight = false;
|
|
3828
|
-
var hasDaylightSupport = false;
|
|
3829
|
-
var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
|
|
3830
|
-
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
3831
|
-
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(context.locale().localeString(), "/timeZoneNames.json"));
|
|
3832
|
-
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
|
|
3726
|
+
};
|
|
3833
3727
|
|
|
3834
|
-
|
|
3728
|
+
_proto.print = function print(context, buf) {
|
|
3729
|
+
var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
|
|
3835
3730
|
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
buf.append(zone.id());
|
|
3840
|
-
}
|
|
3731
|
+
if (zone == null) {
|
|
3732
|
+
return false;
|
|
3733
|
+
}
|
|
3841
3734
|
|
|
3735
|
+
if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
|
|
3736
|
+
buf.append(zone.id());
|
|
3842
3737
|
return true;
|
|
3843
3738
|
}
|
|
3844
|
-
}, {
|
|
3845
|
-
key: "_resolveZoneIds",
|
|
3846
|
-
value: function _resolveZoneIds(localString) {
|
|
3847
|
-
if (this._zoneIdsLocales[localString] != null) {
|
|
3848
|
-
return this._zoneIdsLocales[localString];
|
|
3849
|
-
}
|
|
3850
3739
|
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3740
|
+
var daylight = false;
|
|
3741
|
+
var hasDaylightSupport = false;
|
|
3742
|
+
var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
|
|
3743
|
+
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
3744
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + context.locale().localeString() + "/timeZoneNames.json");
|
|
3745
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
|
|
3854
3746
|
|
|
3855
|
-
|
|
3856
|
-
_step;
|
|
3747
|
+
var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
|
|
3857
3748
|
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3749
|
+
if (text) {
|
|
3750
|
+
buf.append(text);
|
|
3751
|
+
} else {
|
|
3752
|
+
buf.append(zone.id());
|
|
3753
|
+
}
|
|
3863
3754
|
|
|
3864
|
-
|
|
3755
|
+
return true;
|
|
3756
|
+
};
|
|
3865
3757
|
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3758
|
+
_proto._resolveZoneIds = function _resolveZoneIds(localString) {
|
|
3759
|
+
if (this._zoneIdsLocales[localString] != null) {
|
|
3760
|
+
return this._zoneIdsLocales[localString];
|
|
3761
|
+
}
|
|
3869
3762
|
|
|
3870
|
-
|
|
3763
|
+
var ids = {};
|
|
3764
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + localString + "/timeZoneNames.json");
|
|
3765
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
|
|
3871
3766
|
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3767
|
+
for (var _iterator = _createForOfIteratorHelperLoose(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()), _step; !(_step = _iterator()).done;) {
|
|
3768
|
+
var id = _step.value;
|
|
3769
|
+
ids[id] = id;
|
|
3770
|
+
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
3875
3771
|
|
|
3876
|
-
|
|
3772
|
+
var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
|
|
3877
3773
|
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
}
|
|
3881
|
-
}
|
|
3882
|
-
} catch (err) {
|
|
3883
|
-
_iterator.e(err);
|
|
3884
|
-
} finally {
|
|
3885
|
-
_iterator.f();
|
|
3774
|
+
if (genericText) {
|
|
3775
|
+
ids[genericText] = id;
|
|
3886
3776
|
}
|
|
3887
3777
|
|
|
3888
|
-
var
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
};
|
|
3893
|
-
return this._zoneIdsLocales[localString];
|
|
3894
|
-
}
|
|
3895
|
-
}, {
|
|
3896
|
-
key: "parse",
|
|
3897
|
-
value: function parse(context, text, position) {
|
|
3898
|
-
for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
|
|
3899
|
-
var name = _arr[_i];
|
|
3900
|
-
|
|
3901
|
-
if (context.subSequenceEquals(text, position, name, 0, name.length)) {
|
|
3902
|
-
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
|
|
3903
|
-
return position + name.length;
|
|
3904
|
-
}
|
|
3778
|
+
var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
|
|
3779
|
+
|
|
3780
|
+
if (standardText) {
|
|
3781
|
+
ids[standardText] = id;
|
|
3905
3782
|
}
|
|
3906
3783
|
|
|
3907
|
-
var
|
|
3908
|
-
ids = _this$_resolveZoneIds.ids,
|
|
3909
|
-
sortedKeys = _this$_resolveZoneIds.sortedKeys;
|
|
3784
|
+
var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
|
|
3910
3785
|
|
|
3911
|
-
|
|
3912
|
-
|
|
3786
|
+
if (daylightText) {
|
|
3787
|
+
ids[daylightText] = id;
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3913
3790
|
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3791
|
+
var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
|
|
3792
|
+
this._zoneIdsLocales[localString] = {
|
|
3793
|
+
ids: ids,
|
|
3794
|
+
sortedKeys: sortedKeys
|
|
3795
|
+
};
|
|
3796
|
+
return this._zoneIdsLocales[localString];
|
|
3797
|
+
};
|
|
3917
3798
|
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
}
|
|
3922
|
-
}
|
|
3923
|
-
} catch (err) {
|
|
3924
|
-
_iterator2.e(err);
|
|
3925
|
-
} finally {
|
|
3926
|
-
_iterator2.f();
|
|
3927
|
-
}
|
|
3799
|
+
_proto.parse = function parse(context, text, position) {
|
|
3800
|
+
for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
|
|
3801
|
+
var name = _arr[_i];
|
|
3928
3802
|
|
|
3929
|
-
|
|
3803
|
+
if (context.subSequenceEquals(text, position, name, 0, name.length)) {
|
|
3804
|
+
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
|
|
3805
|
+
return position + name.length;
|
|
3806
|
+
}
|
|
3930
3807
|
}
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3808
|
+
|
|
3809
|
+
var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
|
|
3810
|
+
ids = _this$_resolveZoneIds.ids,
|
|
3811
|
+
sortedKeys = _this$_resolveZoneIds.sortedKeys;
|
|
3812
|
+
|
|
3813
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(sortedKeys), _step2; !(_step2 = _iterator2()).done;) {
|
|
3814
|
+
var _name = _step2.value;
|
|
3815
|
+
|
|
3816
|
+
if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
|
|
3817
|
+
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
|
|
3818
|
+
return position + _name.length;
|
|
3819
|
+
}
|
|
3935
3820
|
}
|
|
3936
|
-
|
|
3821
|
+
|
|
3822
|
+
return ~position;
|
|
3823
|
+
};
|
|
3824
|
+
|
|
3825
|
+
_proto.toString = function toString() {
|
|
3826
|
+
return "ZoneText(" + this._textStyle + ")";
|
|
3827
|
+
};
|
|
3937
3828
|
|
|
3938
3829
|
return CldrZoneTextPrinterParser;
|
|
3939
3830
|
}();
|
|
@@ -3954,12 +3845,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3954
3845
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocalizedOffsetPrinterParser; });
|
|
3955
3846
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
3956
3847
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3957
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3958
|
-
|
|
3959
|
-
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); } }
|
|
3960
|
-
|
|
3961
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3962
|
-
|
|
3963
3848
|
/**
|
|
3964
3849
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
3965
3850
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -3970,180 +3855,174 @@ var MathUtil = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].MathUtil;
|
|
|
3970
3855
|
|
|
3971
3856
|
var LocalizedOffsetPrinterParser = function () {
|
|
3972
3857
|
function LocalizedOffsetPrinterParser(textStyle) {
|
|
3973
|
-
_classCallCheck(this, LocalizedOffsetPrinterParser);
|
|
3974
|
-
|
|
3975
3858
|
this._textStyle = textStyle;
|
|
3976
3859
|
}
|
|
3977
3860
|
|
|
3978
|
-
|
|
3979
|
-
key: "textStyle",
|
|
3980
|
-
value: function textStyle() {
|
|
3981
|
-
return this._textStyle;
|
|
3982
|
-
}
|
|
3983
|
-
}, {
|
|
3984
|
-
key: "print",
|
|
3985
|
-
value: function print(context, buf) {
|
|
3986
|
-
var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
|
|
3861
|
+
var _proto = LocalizedOffsetPrinterParser.prototype;
|
|
3987
3862
|
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3863
|
+
_proto.textStyle = function textStyle() {
|
|
3864
|
+
return this._textStyle;
|
|
3865
|
+
};
|
|
3991
3866
|
|
|
3992
|
-
|
|
3867
|
+
_proto.print = function print(context, buf) {
|
|
3868
|
+
var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
|
|
3993
3869
|
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3870
|
+
if (offsetSecs == null) {
|
|
3871
|
+
return false;
|
|
3872
|
+
}
|
|
3997
3873
|
|
|
3998
|
-
|
|
3874
|
+
buf.append('GMT');
|
|
3999
3875
|
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
|
|
4004
|
-
buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
|
|
3876
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
3877
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
|
|
3878
|
+
}
|
|
4005
3879
|
|
|
4006
|
-
|
|
4007
|
-
buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
|
|
3880
|
+
var totalSecs = MathUtil.safeToInt(offsetSecs);
|
|
4008
3881
|
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
3882
|
+
if (totalSecs !== 0) {
|
|
3883
|
+
var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
|
|
3884
|
+
var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
|
|
3885
|
+
var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
|
|
3886
|
+
buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
|
|
3887
|
+
|
|
3888
|
+
if (absMinutes > 0 || absSeconds > 0) {
|
|
3889
|
+
buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
|
|
3890
|
+
|
|
3891
|
+
if (absSeconds > 0) {
|
|
3892
|
+
buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
|
|
4012
3893
|
}
|
|
4013
3894
|
}
|
|
4014
|
-
|
|
4015
|
-
return true;
|
|
4016
3895
|
}
|
|
4017
|
-
}, {
|
|
4018
|
-
key: "parse",
|
|
4019
|
-
value: function parse(context, text, position) {
|
|
4020
|
-
if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
|
|
4021
|
-
return ~position;
|
|
4022
|
-
}
|
|
4023
3896
|
|
|
4024
|
-
|
|
3897
|
+
return true;
|
|
3898
|
+
};
|
|
4025
3899
|
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
3900
|
+
_proto.parse = function parse(context, text, position) {
|
|
3901
|
+
if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
|
|
3902
|
+
return ~position;
|
|
3903
|
+
}
|
|
4029
3904
|
|
|
4030
|
-
|
|
3905
|
+
position += 3;
|
|
4031
3906
|
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
3907
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
3908
|
+
return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
|
|
3909
|
+
}
|
|
4035
3910
|
|
|
4036
|
-
|
|
3911
|
+
var end = text.length;
|
|
4037
3912
|
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
3913
|
+
if (position === end) {
|
|
3914
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
|
|
3915
|
+
}
|
|
4041
3916
|
|
|
4042
|
-
|
|
3917
|
+
var sign = text.charAt(position);
|
|
4043
3918
|
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
3919
|
+
if (sign !== '+' && sign !== '-') {
|
|
3920
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
|
|
3921
|
+
}
|
|
4047
3922
|
|
|
4048
|
-
|
|
4049
|
-
var ch = text.charAt(position);
|
|
3923
|
+
var negative = sign === '-' ? -1 : 1;
|
|
4050
3924
|
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
3925
|
+
if (position === end) {
|
|
3926
|
+
return ~position;
|
|
3927
|
+
}
|
|
3928
|
+
|
|
3929
|
+
position++;
|
|
3930
|
+
var ch = text.charAt(position);
|
|
4054
3931
|
|
|
4055
|
-
|
|
4056
|
-
|
|
3932
|
+
if (ch < '0' || ch > '9') {
|
|
3933
|
+
return ~position;
|
|
3934
|
+
}
|
|
4057
3935
|
|
|
4058
|
-
|
|
4059
|
-
|
|
3936
|
+
position++;
|
|
3937
|
+
var hour = MathUtil.parseInt(ch);
|
|
4060
3938
|
|
|
4061
|
-
|
|
4062
|
-
|
|
3939
|
+
if (position !== end) {
|
|
3940
|
+
ch = text.charAt(position);
|
|
4063
3941
|
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
}
|
|
3942
|
+
if (ch >= '0' && ch <= '9') {
|
|
3943
|
+
hour = hour * 10 + MathUtil.parseInt(ch);
|
|
4067
3944
|
|
|
4068
|
-
|
|
3945
|
+
if (hour > 23) {
|
|
3946
|
+
return ~position;
|
|
4069
3947
|
}
|
|
3948
|
+
|
|
3949
|
+
position++;
|
|
4070
3950
|
}
|
|
3951
|
+
}
|
|
4071
3952
|
|
|
4072
|
-
|
|
4073
|
-
|
|
3953
|
+
if (position === end || text.charAt(position) !== ':') {
|
|
3954
|
+
var _offset = negative * 3600 * hour;
|
|
4074
3955
|
|
|
4075
|
-
|
|
4076
|
-
|
|
3956
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
|
|
3957
|
+
}
|
|
4077
3958
|
|
|
4078
|
-
|
|
3959
|
+
position++;
|
|
4079
3960
|
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
3961
|
+
if (position > end - 2) {
|
|
3962
|
+
return ~position;
|
|
3963
|
+
}
|
|
4083
3964
|
|
|
4084
|
-
|
|
3965
|
+
ch = text.charAt(position);
|
|
4085
3966
|
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
3967
|
+
if (ch < '0' || ch > '9') {
|
|
3968
|
+
return ~position;
|
|
3969
|
+
}
|
|
4089
3970
|
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
3971
|
+
position++;
|
|
3972
|
+
var min = MathUtil.parseInt(ch);
|
|
3973
|
+
ch = text.charAt(position);
|
|
4093
3974
|
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
position++;
|
|
4099
|
-
min = min * 10 + MathUtil.parseInt(ch);
|
|
3975
|
+
if (ch < '0' || ch > '9') {
|
|
3976
|
+
return ~position;
|
|
3977
|
+
}
|
|
4100
3978
|
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
}
|
|
3979
|
+
position++;
|
|
3980
|
+
min = min * 10 + MathUtil.parseInt(ch);
|
|
4104
3981
|
|
|
4105
|
-
|
|
4106
|
-
|
|
3982
|
+
if (min > 59) {
|
|
3983
|
+
return ~position;
|
|
3984
|
+
}
|
|
4107
3985
|
|
|
4108
|
-
|
|
4109
|
-
|
|
3986
|
+
if (position === end || text.charAt(position) !== ':') {
|
|
3987
|
+
var _offset2 = negative * (3600 * hour + 60 * min);
|
|
4110
3988
|
|
|
4111
|
-
position
|
|
3989
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
|
|
3990
|
+
}
|
|
4112
3991
|
|
|
4113
|
-
|
|
4114
|
-
return ~position;
|
|
4115
|
-
}
|
|
3992
|
+
position++;
|
|
4116
3993
|
|
|
4117
|
-
|
|
3994
|
+
if (position > end - 2) {
|
|
3995
|
+
return ~position;
|
|
3996
|
+
}
|
|
4118
3997
|
|
|
4119
|
-
|
|
4120
|
-
return ~position;
|
|
4121
|
-
}
|
|
3998
|
+
ch = text.charAt(position);
|
|
4122
3999
|
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4000
|
+
if (ch < '0' || ch > '9') {
|
|
4001
|
+
return ~position;
|
|
4002
|
+
}
|
|
4126
4003
|
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4004
|
+
position++;
|
|
4005
|
+
var sec = MathUtil.parseInt(ch);
|
|
4006
|
+
ch = text.charAt(position);
|
|
4130
4007
|
|
|
4131
|
-
|
|
4132
|
-
|
|
4008
|
+
if (ch < '0' || ch > '9') {
|
|
4009
|
+
return ~position;
|
|
4010
|
+
}
|
|
4133
4011
|
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
}
|
|
4012
|
+
position++;
|
|
4013
|
+
sec = sec * 10 + MathUtil.parseInt(ch);
|
|
4137
4014
|
|
|
4138
|
-
|
|
4139
|
-
return
|
|
4140
|
-
}
|
|
4141
|
-
}, {
|
|
4142
|
-
key: "toString",
|
|
4143
|
-
value: function toString() {
|
|
4144
|
-
return "LocalizedOffset(".concat(this._textStyle, ")");
|
|
4015
|
+
if (sec > 59) {
|
|
4016
|
+
return ~position;
|
|
4145
4017
|
}
|
|
4146
|
-
|
|
4018
|
+
|
|
4019
|
+
var offset = negative * (3600 * hour + 60 * min + sec);
|
|
4020
|
+
return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
|
|
4021
|
+
};
|
|
4022
|
+
|
|
4023
|
+
_proto.toString = function toString() {
|
|
4024
|
+
return "LocalizedOffset(" + this._textStyle + ")";
|
|
4025
|
+
};
|
|
4147
4026
|
|
|
4148
4027
|
return LocalizedOffsetPrinterParser;
|
|
4149
4028
|
}();
|
|
@@ -4164,18 +4043,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4164
4043
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPrinterParser; });
|
|
4165
4044
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
4166
4045
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
4167
|
-
function
|
|
4046
|
+
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."); }
|
|
4168
4047
|
|
|
4169
4048
|
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); }
|
|
4170
4049
|
|
|
4171
4050
|
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; }
|
|
4172
4051
|
|
|
4173
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4174
|
-
|
|
4175
|
-
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); } }
|
|
4176
|
-
|
|
4177
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4178
|
-
|
|
4179
4052
|
/**
|
|
4180
4053
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
4181
4054
|
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
@@ -4185,104 +4058,86 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
4185
4058
|
|
|
4186
4059
|
var TextPrinterParser = function () {
|
|
4187
4060
|
function TextPrinterParser(field, textStyle, provider) {
|
|
4188
|
-
_classCallCheck(this, TextPrinterParser);
|
|
4189
|
-
|
|
4190
4061
|
this._field = field;
|
|
4191
4062
|
this._textStyle = textStyle;
|
|
4192
4063
|
this._provider = provider;
|
|
4193
4064
|
}
|
|
4194
4065
|
|
|
4195
|
-
|
|
4196
|
-
key: "field",
|
|
4197
|
-
value: function field() {
|
|
4198
|
-
return this._field;
|
|
4199
|
-
}
|
|
4200
|
-
}, {
|
|
4201
|
-
key: "textStyle",
|
|
4202
|
-
value: function textStyle() {
|
|
4203
|
-
return this._textStyle;
|
|
4204
|
-
}
|
|
4205
|
-
}, {
|
|
4206
|
-
key: "provider",
|
|
4207
|
-
value: function provider() {
|
|
4208
|
-
return this._provider;
|
|
4209
|
-
}
|
|
4210
|
-
}, {
|
|
4211
|
-
key: "print",
|
|
4212
|
-
value: function print(context, buf) {
|
|
4213
|
-
var value = context.getValue(this._field);
|
|
4066
|
+
var _proto = TextPrinterParser.prototype;
|
|
4214
4067
|
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4068
|
+
_proto.field = function field() {
|
|
4069
|
+
return this._field;
|
|
4070
|
+
};
|
|
4218
4071
|
|
|
4219
|
-
|
|
4072
|
+
_proto.textStyle = function textStyle() {
|
|
4073
|
+
return this._textStyle;
|
|
4074
|
+
};
|
|
4220
4075
|
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4076
|
+
_proto.provider = function provider() {
|
|
4077
|
+
return this._provider;
|
|
4078
|
+
};
|
|
4224
4079
|
|
|
4225
|
-
|
|
4226
|
-
|
|
4080
|
+
_proto.print = function print(context, buf) {
|
|
4081
|
+
var value = context.getValue(this._field);
|
|
4082
|
+
|
|
4083
|
+
if (value === null) {
|
|
4084
|
+
return false;
|
|
4227
4085
|
}
|
|
4228
|
-
}, {
|
|
4229
|
-
key: "parse",
|
|
4230
|
-
value: function parse(context, parseText, position) {
|
|
4231
|
-
var length = parseText.length;
|
|
4232
4086
|
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4087
|
+
var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
|
|
4088
|
+
|
|
4089
|
+
if (text === null) {
|
|
4090
|
+
return this._numberPrinterParser().print(context, buf);
|
|
4091
|
+
}
|
|
4236
4092
|
|
|
4237
|
-
|
|
4093
|
+
buf.append(text);
|
|
4094
|
+
return true;
|
|
4095
|
+
};
|
|
4238
4096
|
|
|
4239
|
-
|
|
4097
|
+
_proto.parse = function parse(context, parseText, position) {
|
|
4098
|
+
var length = parseText.length;
|
|
4240
4099
|
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4100
|
+
if (position < 0 || position > length) {
|
|
4101
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: " + position);
|
|
4102
|
+
}
|
|
4244
4103
|
|
|
4245
|
-
|
|
4246
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
4247
|
-
var entry = _step.value;
|
|
4248
|
-
var itText = entry.key;
|
|
4104
|
+
var style = context.isStrict() ? this._textStyle : null;
|
|
4249
4105
|
|
|
4250
|
-
|
|
4251
|
-
return context.setParsedField(this._field, entry.value, position, position + itText.length);
|
|
4252
|
-
}
|
|
4253
|
-
}
|
|
4254
|
-
} catch (err) {
|
|
4255
|
-
_iterator.e(err);
|
|
4256
|
-
} finally {
|
|
4257
|
-
_iterator.f();
|
|
4258
|
-
}
|
|
4106
|
+
var it = this._provider.getTextIterator(this._field, style, context.locale());
|
|
4259
4107
|
|
|
4260
|
-
|
|
4261
|
-
|
|
4108
|
+
if (it != null) {
|
|
4109
|
+
for (var _iterator = _createForOfIteratorHelperLoose(it), _step; !(_step = _iterator()).done;) {
|
|
4110
|
+
var entry = _step.value;
|
|
4111
|
+
var itText = entry.key;
|
|
4112
|
+
|
|
4113
|
+
if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
|
|
4114
|
+
return context.setParsedField(this._field, entry.value, position, position + itText.length);
|
|
4262
4115
|
}
|
|
4263
4116
|
}
|
|
4264
4117
|
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
}, {
|
|
4268
|
-
key: "_numberPrinterParser",
|
|
4269
|
-
value: function _numberPrinterParser() {
|
|
4270
|
-
if (this._currentNumberPrinterParser == null) {
|
|
4271
|
-
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);
|
|
4118
|
+
if (context.isStrict()) {
|
|
4119
|
+
return ~position;
|
|
4272
4120
|
}
|
|
4121
|
+
}
|
|
4122
|
+
|
|
4123
|
+
return this._numberPrinterParser().parse(context, parseText, position);
|
|
4124
|
+
};
|
|
4273
4125
|
|
|
4274
|
-
|
|
4126
|
+
_proto._numberPrinterParser = function _numberPrinterParser() {
|
|
4127
|
+
if (this._currentNumberPrinterParser == null) {
|
|
4128
|
+
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);
|
|
4275
4129
|
}
|
|
4276
|
-
}, {
|
|
4277
|
-
key: "toString",
|
|
4278
|
-
value: function toString() {
|
|
4279
|
-
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
4280
|
-
return "Text(".concat(this._field, ")");
|
|
4281
|
-
}
|
|
4282
4130
|
|
|
4283
|
-
|
|
4131
|
+
return this._currentNumberPrinterParser;
|
|
4132
|
+
};
|
|
4133
|
+
|
|
4134
|
+
_proto.toString = function toString() {
|
|
4135
|
+
if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
|
|
4136
|
+
return "Text(" + this._field + ")";
|
|
4284
4137
|
}
|
|
4285
|
-
|
|
4138
|
+
|
|
4139
|
+
return "Text(" + this._field + "," + this._textStyle + ")";
|
|
4140
|
+
};
|
|
4286
4141
|
|
|
4287
4142
|
return TextPrinterParser;
|
|
4288
4143
|
}();
|
|
@@ -4304,12 +4159,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4304
4159
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
4305
4160
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
4306
4161
|
/* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../temporal/WeekFields */ "./src/temporal/WeekFields.js");
|
|
4307
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4308
|
-
|
|
4309
|
-
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); } }
|
|
4310
|
-
|
|
4311
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4312
|
-
|
|
4313
4162
|
/*
|
|
4314
4163
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
4315
4164
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -4320,95 +4169,89 @@ var StringBuilder = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].StringBuilde
|
|
|
4320
4169
|
|
|
4321
4170
|
var WeekFieldsPrinterParser = function () {
|
|
4322
4171
|
function WeekFieldsPrinterParser(letter, count) {
|
|
4323
|
-
_classCallCheck(this, WeekFieldsPrinterParser);
|
|
4324
|
-
|
|
4325
4172
|
this._letter = letter;
|
|
4326
4173
|
this._count = count;
|
|
4327
4174
|
}
|
|
4328
4175
|
|
|
4329
|
-
|
|
4330
|
-
key: "print",
|
|
4331
|
-
value: function print(context, buf) {
|
|
4332
|
-
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
4176
|
+
var _proto = WeekFieldsPrinterParser.prototype;
|
|
4333
4177
|
|
|
4334
|
-
|
|
4178
|
+
_proto.print = function print(context, buf) {
|
|
4179
|
+
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
4335
4180
|
|
|
4336
|
-
|
|
4337
|
-
}
|
|
4338
|
-
}, {
|
|
4339
|
-
key: "parse",
|
|
4340
|
-
value: function parse(context, text, position) {
|
|
4341
|
-
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
4181
|
+
var pp = this._evaluate(weekFields);
|
|
4342
4182
|
|
|
4343
|
-
|
|
4183
|
+
return pp.print(context, buf);
|
|
4184
|
+
};
|
|
4344
4185
|
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
}, {
|
|
4348
|
-
key: "_evaluate",
|
|
4349
|
-
value: function _evaluate(weekFields) {
|
|
4350
|
-
var pp = null;
|
|
4351
|
-
|
|
4352
|
-
switch (this._letter) {
|
|
4353
|
-
case 'e':
|
|
4354
|
-
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);
|
|
4355
|
-
break;
|
|
4356
|
-
|
|
4357
|
-
case 'c':
|
|
4358
|
-
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);
|
|
4359
|
-
break;
|
|
4360
|
-
|
|
4361
|
-
case 'w':
|
|
4362
|
-
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);
|
|
4363
|
-
break;
|
|
4364
|
-
|
|
4365
|
-
case 'W':
|
|
4366
|
-
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);
|
|
4367
|
-
break;
|
|
4368
|
-
|
|
4369
|
-
case 'Y':
|
|
4370
|
-
if (this._count === 2) {
|
|
4371
|
-
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);
|
|
4372
|
-
} else {
|
|
4373
|
-
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);
|
|
4374
|
-
}
|
|
4186
|
+
_proto.parse = function parse(context, text, position) {
|
|
4187
|
+
var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
|
|
4375
4188
|
|
|
4376
|
-
|
|
4377
|
-
}
|
|
4189
|
+
var pp = this._evaluate(weekFields);
|
|
4378
4190
|
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4191
|
+
return pp.parse(context, text, position);
|
|
4192
|
+
};
|
|
4193
|
+
|
|
4194
|
+
_proto._evaluate = function _evaluate(weekFields) {
|
|
4195
|
+
var pp = null;
|
|
4196
|
+
|
|
4197
|
+
switch (this._letter) {
|
|
4198
|
+
case 'e':
|
|
4199
|
+
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);
|
|
4200
|
+
break;
|
|
4201
|
+
|
|
4202
|
+
case 'c':
|
|
4203
|
+
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);
|
|
4204
|
+
break;
|
|
4205
|
+
|
|
4206
|
+
case 'w':
|
|
4207
|
+
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);
|
|
4208
|
+
break;
|
|
4209
|
+
|
|
4210
|
+
case 'W':
|
|
4211
|
+
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);
|
|
4212
|
+
break;
|
|
4213
|
+
|
|
4214
|
+
case 'Y':
|
|
4215
|
+
if (this._count === 2) {
|
|
4216
|
+
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);
|
|
4392
4217
|
} else {
|
|
4393
|
-
|
|
4394
|
-
}
|
|
4395
|
-
} else {
|
|
4396
|
-
if (this._letter === 'c' || this._letter === 'e') {
|
|
4397
|
-
sb.append('DayOfWeek');
|
|
4398
|
-
} else if (this._letter === 'w') {
|
|
4399
|
-
sb.append('WeekOfWeekBasedYear');
|
|
4400
|
-
} else if (this._letter === 'W') {
|
|
4401
|
-
sb.append('WeekOfMonth');
|
|
4218
|
+
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);
|
|
4402
4219
|
}
|
|
4403
4220
|
|
|
4404
|
-
|
|
4405
|
-
|
|
4221
|
+
break;
|
|
4222
|
+
}
|
|
4223
|
+
|
|
4224
|
+
return pp;
|
|
4225
|
+
};
|
|
4226
|
+
|
|
4227
|
+
_proto.toString = function toString() {
|
|
4228
|
+
var sb = new StringBuilder(30);
|
|
4229
|
+
sb.append('Localized(');
|
|
4230
|
+
|
|
4231
|
+
if (this._letter === 'Y') {
|
|
4232
|
+
if (this._count === 1) {
|
|
4233
|
+
sb.append('WeekBasedYear');
|
|
4234
|
+
} else if (this._count === 2) {
|
|
4235
|
+
sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
|
|
4236
|
+
} else {
|
|
4237
|
+
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);
|
|
4238
|
+
}
|
|
4239
|
+
} else {
|
|
4240
|
+
if (this._letter === 'c' || this._letter === 'e') {
|
|
4241
|
+
sb.append('DayOfWeek');
|
|
4242
|
+
} else if (this._letter === 'w') {
|
|
4243
|
+
sb.append('WeekOfWeekBasedYear');
|
|
4244
|
+
} else if (this._letter === 'W') {
|
|
4245
|
+
sb.append('WeekOfMonth');
|
|
4406
4246
|
}
|
|
4407
4247
|
|
|
4408
|
-
sb.append('
|
|
4409
|
-
|
|
4248
|
+
sb.append(',');
|
|
4249
|
+
sb.append(this._count);
|
|
4410
4250
|
}
|
|
4411
|
-
|
|
4251
|
+
|
|
4252
|
+
sb.append(')');
|
|
4253
|
+
return sb.toString();
|
|
4254
|
+
};
|
|
4412
4255
|
|
|
4413
4256
|
return WeekFieldsPrinterParser;
|
|
4414
4257
|
}();
|
|
@@ -4497,12 +4340,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4497
4340
|
/* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
|
|
4498
4341
|
/* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cldrjs */ "./node_modules/cldrjs/dist/node_main.js");
|
|
4499
4342
|
/* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cldrjs__WEBPACK_IMPORTED_MODULE_2__);
|
|
4500
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4501
|
-
|
|
4502
|
-
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); } }
|
|
4503
|
-
|
|
4504
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4505
|
-
|
|
4506
4343
|
/*
|
|
4507
4344
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
4508
4345
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -4529,9 +4366,27 @@ var _weekDayMap = {
|
|
|
4529
4366
|
'sun': _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"].SUNDAY
|
|
4530
4367
|
};
|
|
4531
4368
|
var ComputedDayOfField = function () {
|
|
4532
|
-
function
|
|
4533
|
-
|
|
4369
|
+
ComputedDayOfField.ofDayOfWeekField = function ofDayOfWeekField(weekDef) {
|
|
4370
|
+
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);
|
|
4371
|
+
};
|
|
4372
|
+
|
|
4373
|
+
ComputedDayOfField.ofWeekOfMonthField = function ofWeekOfMonthField(weekDef) {
|
|
4374
|
+
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);
|
|
4375
|
+
};
|
|
4376
|
+
|
|
4377
|
+
ComputedDayOfField.ofWeekOfYearField = function ofWeekOfYearField(weekDef) {
|
|
4378
|
+
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);
|
|
4379
|
+
};
|
|
4380
|
+
|
|
4381
|
+
ComputedDayOfField.ofWeekOfWeekBasedYearField = function ofWeekOfWeekBasedYearField(weekDef) {
|
|
4382
|
+
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);
|
|
4383
|
+
};
|
|
4384
|
+
|
|
4385
|
+
ComputedDayOfField.ofWeekBasedYearField = function ofWeekBasedYearField(weekDef) {
|
|
4386
|
+
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);
|
|
4387
|
+
};
|
|
4534
4388
|
|
|
4389
|
+
function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
|
|
4535
4390
|
this._name = name;
|
|
4536
4391
|
this._weekDef = weekDef;
|
|
4537
4392
|
this._baseUnit = baseUnit;
|
|
@@ -4539,484 +4394,482 @@ var ComputedDayOfField = function () {
|
|
|
4539
4394
|
this._range = range;
|
|
4540
4395
|
}
|
|
4541
4396
|
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
}
|
|
4397
|
+
var _proto = ComputedDayOfField.prototype;
|
|
4398
|
+
|
|
4399
|
+
_proto.getFrom = function getFrom(temporal) {
|
|
4400
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4401
|
+
|
|
4402
|
+
var dow = this._localizedDayOfWeek(temporal, sow);
|
|
4403
|
+
|
|
4404
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4405
|
+
return dow;
|
|
4406
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4407
|
+
return this._localizedWeekOfMonth(temporal, dow);
|
|
4408
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4409
|
+
return this._localizedWeekOfYear(temporal, dow);
|
|
4410
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
4411
|
+
return this._localizedWOWBY(temporal);
|
|
4412
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4413
|
+
return this._localizedWBY(temporal);
|
|
4414
|
+
} else {
|
|
4415
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4562
4416
|
}
|
|
4563
|
-
}
|
|
4564
|
-
key: "_localizedDayOfWeek",
|
|
4565
|
-
value: function _localizedDayOfWeek(temporal, sow) {
|
|
4566
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4567
|
-
return MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4568
|
-
}
|
|
4569
|
-
}, {
|
|
4570
|
-
key: "_localizedWeekOfMonth",
|
|
4571
|
-
value: function _localizedWeekOfMonth(temporal, dow) {
|
|
4572
|
-
var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
4417
|
+
};
|
|
4573
4418
|
|
|
4574
|
-
|
|
4419
|
+
_proto._localizedDayOfWeek = function _localizedDayOfWeek(temporal, sow) {
|
|
4420
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4421
|
+
return MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4422
|
+
};
|
|
4575
4423
|
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
}, {
|
|
4579
|
-
key: "_localizedWeekOfYear",
|
|
4580
|
-
value: function _localizedWeekOfYear(temporal, dow) {
|
|
4581
|
-
var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
4424
|
+
_proto._localizedWeekOfMonth = function _localizedWeekOfMonth(temporal, dow) {
|
|
4425
|
+
var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
4582
4426
|
|
|
4583
|
-
|
|
4427
|
+
var offset = this._startOfWeekOffset(dom, dow);
|
|
4584
4428
|
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
}, {
|
|
4588
|
-
key: "_localizedWOWBY",
|
|
4589
|
-
value: function _localizedWOWBY(temporal) {
|
|
4590
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4429
|
+
return ComputedDayOfField._computeWeek(offset, dom);
|
|
4430
|
+
};
|
|
4591
4431
|
|
|
4592
|
-
|
|
4593
|
-
|
|
4432
|
+
_proto._localizedWeekOfYear = function _localizedWeekOfYear(temporal, dow) {
|
|
4433
|
+
var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
4594
4434
|
|
|
4595
|
-
|
|
4435
|
+
var offset = this._startOfWeekOffset(doy, dow);
|
|
4596
4436
|
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
return this._localizedWeekOfYear(previous, dow) + 1;
|
|
4600
|
-
} else if (woy >= 53) {
|
|
4601
|
-
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
4437
|
+
return ComputedDayOfField._computeWeek(offset, doy);
|
|
4438
|
+
};
|
|
4602
4439
|
|
|
4603
|
-
|
|
4604
|
-
|
|
4440
|
+
_proto._localizedWOWBY = function _localizedWOWBY(temporal) {
|
|
4441
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4605
4442
|
|
|
4606
|
-
|
|
4443
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4444
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4607
4445
|
|
|
4608
|
-
|
|
4609
|
-
return woy - (weekIndexOfFirstWeekNextYear - 1);
|
|
4610
|
-
}
|
|
4611
|
-
}
|
|
4446
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
4612
4447
|
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4448
|
+
if (woy === 0) {
|
|
4449
|
+
var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4450
|
+
return this._localizedWeekOfYear(previous, dow) + 1;
|
|
4451
|
+
} else if (woy >= 53) {
|
|
4452
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
4619
4453
|
|
|
4620
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4621
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4622
4454
|
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4455
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
4623
4456
|
|
|
4624
|
-
var
|
|
4457
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
4625
4458
|
|
|
4626
|
-
if (woy
|
|
4627
|
-
return
|
|
4628
|
-
} else if (woy < 53) {
|
|
4629
|
-
return year;
|
|
4459
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
4460
|
+
return woy - (weekIndexOfFirstWeekNextYear - 1);
|
|
4630
4461
|
}
|
|
4462
|
+
}
|
|
4631
4463
|
|
|
4632
|
-
|
|
4464
|
+
return woy;
|
|
4465
|
+
};
|
|
4633
4466
|
|
|
4634
|
-
|
|
4467
|
+
_proto._localizedWBY = function _localizedWBY(temporal) {
|
|
4468
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4635
4469
|
|
|
4636
|
-
|
|
4470
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4471
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4472
|
+
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4637
4473
|
|
|
4638
|
-
|
|
4639
|
-
return year + 1;
|
|
4640
|
-
}
|
|
4474
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
4641
4475
|
|
|
4476
|
+
if (woy === 0) {
|
|
4477
|
+
return year - 1;
|
|
4478
|
+
} else if (woy < 53) {
|
|
4642
4479
|
return year;
|
|
4643
4480
|
}
|
|
4644
|
-
}, {
|
|
4645
|
-
key: "_startOfWeekOffset",
|
|
4646
|
-
value: function _startOfWeekOffset(day, dow) {
|
|
4647
|
-
var weekStart = MathUtil.floorMod(day - dow, 7);
|
|
4648
|
-
var offset = -weekStart;
|
|
4649
|
-
|
|
4650
|
-
if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
|
|
4651
|
-
offset = 7 - weekStart;
|
|
4652
|
-
}
|
|
4653
4481
|
|
|
4654
|
-
|
|
4482
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
4483
|
+
|
|
4484
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
4485
|
+
|
|
4486
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
4487
|
+
|
|
4488
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
4489
|
+
return year + 1;
|
|
4655
4490
|
}
|
|
4656
|
-
}, {
|
|
4657
|
-
key: "adjustInto",
|
|
4658
|
-
value: function adjustInto(temporal, newValue) {
|
|
4659
|
-
var newVal = this._range.checkValidIntValue(newValue, this);
|
|
4660
4491
|
|
|
4661
|
-
|
|
4492
|
+
return year;
|
|
4493
|
+
};
|
|
4662
4494
|
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4495
|
+
_proto._startOfWeekOffset = function _startOfWeekOffset(day, dow) {
|
|
4496
|
+
var weekStart = MathUtil.floorMod(day - dow, 7);
|
|
4497
|
+
var offset = -weekStart;
|
|
4666
4498
|
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4499
|
+
if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
|
|
4500
|
+
offset = 7 - weekStart;
|
|
4501
|
+
}
|
|
4671
4502
|
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4675
|
-
} else {
|
|
4676
|
-
if (result.get(this) < newVal) {
|
|
4677
|
-
result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4678
|
-
}
|
|
4503
|
+
return offset;
|
|
4504
|
+
};
|
|
4679
4505
|
|
|
4680
|
-
|
|
4506
|
+
ComputedDayOfField._computeWeek = function _computeWeek(offset, day) {
|
|
4507
|
+
return MathUtil.intDiv(7 + offset + (day - 1), 7);
|
|
4508
|
+
};
|
|
4681
4509
|
|
|
4682
|
-
|
|
4510
|
+
_proto.adjustInto = function adjustInto(temporal, newValue) {
|
|
4511
|
+
var newVal = this._range.checkValidIntValue(newValue, this);
|
|
4683
4512
|
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4513
|
+
var currentVal = temporal.get(this);
|
|
4514
|
+
|
|
4515
|
+
if (newVal === currentVal) {
|
|
4516
|
+
return temporal;
|
|
4517
|
+
}
|
|
4518
|
+
|
|
4519
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4520
|
+
var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
|
|
4521
|
+
var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
|
|
4522
|
+
var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4523
|
+
|
|
4524
|
+
if (result.get(this) > newVal) {
|
|
4525
|
+
var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
|
|
4526
|
+
result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4527
|
+
} else {
|
|
4528
|
+
if (result.get(this) < newVal) {
|
|
4529
|
+
result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4687
4530
|
}
|
|
4688
4531
|
|
|
4689
|
-
|
|
4532
|
+
var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
|
|
4533
|
+
|
|
4534
|
+
result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4535
|
+
|
|
4536
|
+
if (result.get(this) > newVal) {
|
|
4537
|
+
result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
|
|
4538
|
+
}
|
|
4690
4539
|
}
|
|
4691
4540
|
|
|
4692
|
-
|
|
4693
|
-
return temporal.plus(delta, this._baseUnit);
|
|
4541
|
+
return result;
|
|
4694
4542
|
}
|
|
4695
|
-
}, {
|
|
4696
|
-
key: "resolve",
|
|
4697
|
-
value: function resolve(fieldValues, partialTemporal, resolverStyle) {
|
|
4698
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4699
4543
|
|
|
4700
|
-
|
|
4701
|
-
|
|
4544
|
+
var delta = newVal - currentVal;
|
|
4545
|
+
return temporal.plus(delta, this._baseUnit);
|
|
4546
|
+
};
|
|
4702
4547
|
|
|
4703
|
-
|
|
4548
|
+
_proto.resolve = function resolve(fieldValues, partialTemporal, resolverStyle) {
|
|
4549
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4704
4550
|
|
|
4705
|
-
|
|
4551
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4552
|
+
var value = fieldValues.remove(this);
|
|
4706
4553
|
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4554
|
+
var localDow = this._range.checkValidIntValue(value, this);
|
|
4555
|
+
|
|
4556
|
+
var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
|
|
4557
|
+
|
|
4558
|
+
fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
|
|
4559
|
+
return null;
|
|
4560
|
+
}
|
|
4710
4561
|
|
|
4711
|
-
|
|
4562
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
|
|
4563
|
+
return null;
|
|
4564
|
+
}
|
|
4565
|
+
|
|
4566
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4567
|
+
if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
|
|
4712
4568
|
return null;
|
|
4713
4569
|
}
|
|
4714
4570
|
|
|
4715
|
-
|
|
4716
|
-
if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
|
|
4717
|
-
return null;
|
|
4718
|
-
}
|
|
4571
|
+
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));
|
|
4719
4572
|
|
|
4720
|
-
|
|
4573
|
+
var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
|
|
4721
4574
|
|
|
4722
|
-
|
|
4575
|
+
var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
|
|
4576
|
+
var date;
|
|
4577
|
+
var days;
|
|
4723
4578
|
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
var
|
|
4579
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
4580
|
+
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
4581
|
+
var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
|
|
4727
4582
|
|
|
4728
|
-
|
|
4729
|
-
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
4730
|
-
var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
|
|
4583
|
+
var dateDow = this._localizedDayOfWeek(date, sow);
|
|
4731
4584
|
|
|
4732
|
-
|
|
4585
|
+
var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
|
|
4733
4586
|
|
|
4734
|
-
|
|
4587
|
+
days = weeks * 7 + (_dow - dateDow);
|
|
4588
|
+
} else {
|
|
4589
|
+
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
4735
4590
|
|
|
4736
|
-
|
|
4737
|
-
} else {
|
|
4738
|
-
date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
|
|
4591
|
+
var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
|
|
4739
4592
|
|
|
4740
|
-
|
|
4593
|
+
var _dateDow = this._localizedDayOfWeek(date, sow);
|
|
4741
4594
|
|
|
4742
|
-
|
|
4595
|
+
var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
|
|
4743
4596
|
|
|
4744
|
-
|
|
4597
|
+
days = _weeks * 7 + (_dow - _dateDow);
|
|
4598
|
+
}
|
|
4745
4599
|
|
|
4746
|
-
|
|
4600
|
+
date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
4601
|
+
|
|
4602
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
4603
|
+
if (date.getLong(this) !== fieldValues.get(this)) {
|
|
4604
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
|
|
4747
4605
|
}
|
|
4606
|
+
}
|
|
4748
4607
|
|
|
4749
|
-
|
|
4608
|
+
fieldValues.remove(this);
|
|
4609
|
+
fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
|
|
4610
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4611
|
+
return date;
|
|
4612
|
+
}
|
|
4750
4613
|
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
}
|
|
4755
|
-
}
|
|
4614
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
|
|
4615
|
+
return null;
|
|
4616
|
+
}
|
|
4756
4617
|
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
return date;
|
|
4761
|
-
}
|
|
4618
|
+
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));
|
|
4619
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4620
|
+
var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
|
|
4762
4621
|
|
|
4763
|
-
|
|
4622
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4623
|
+
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
|
|
4764
4624
|
return null;
|
|
4765
4625
|
}
|
|
4766
4626
|
|
|
4767
|
-
var
|
|
4768
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4769
|
-
var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
|
|
4627
|
+
var _value = fieldValues.remove(this);
|
|
4770
4628
|
|
|
4771
|
-
|
|
4772
|
-
if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
|
|
4773
|
-
return null;
|
|
4774
|
-
}
|
|
4629
|
+
var _date;
|
|
4775
4630
|
|
|
4776
|
-
|
|
4631
|
+
var _days;
|
|
4777
4632
|
|
|
4778
|
-
|
|
4633
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
4634
|
+
var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
4635
|
+
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
4636
|
+
_date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
|
|
4779
4637
|
|
|
4780
|
-
var
|
|
4638
|
+
var _dateDow2 = this._localizedDayOfWeek(_date, sow);
|
|
4781
4639
|
|
|
4782
|
-
|
|
4783
|
-
var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
4784
|
-
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
4785
|
-
_date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
|
|
4640
|
+
var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
|
|
4786
4641
|
|
|
4787
|
-
|
|
4642
|
+
_days = _weeks2 * 7 + (dow - _dateDow2);
|
|
4643
|
+
} else {
|
|
4644
|
+
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));
|
|
4788
4645
|
|
|
4789
|
-
|
|
4646
|
+
_date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
|
|
4790
4647
|
|
|
4791
|
-
|
|
4792
|
-
} else {
|
|
4793
|
-
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));
|
|
4648
|
+
var _dateDow3 = this._localizedDayOfWeek(_date, sow);
|
|
4794
4649
|
|
|
4795
|
-
|
|
4650
|
+
var wom = this._range.checkValidIntValue(_value, this);
|
|
4796
4651
|
|
|
4797
|
-
|
|
4652
|
+
var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
|
|
4798
4653
|
|
|
4799
|
-
|
|
4654
|
+
_days = _weeks3 * 7 + (dow - _dateDow3);
|
|
4655
|
+
}
|
|
4800
4656
|
|
|
4801
|
-
|
|
4657
|
+
_date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
4802
4658
|
|
|
4803
|
-
|
|
4659
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
4660
|
+
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)) {
|
|
4661
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
|
|
4804
4662
|
}
|
|
4663
|
+
}
|
|
4805
4664
|
|
|
4806
|
-
|
|
4665
|
+
fieldValues.remove(this);
|
|
4666
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4667
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
4668
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4669
|
+
return _date;
|
|
4670
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4671
|
+
var _value2 = fieldValues.remove(this);
|
|
4807
4672
|
|
|
4808
|
-
|
|
4809
|
-
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)) {
|
|
4810
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
|
|
4811
|
-
}
|
|
4812
|
-
}
|
|
4673
|
+
var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
|
|
4813
4674
|
|
|
4814
|
-
|
|
4815
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4816
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
|
|
4817
|
-
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4818
|
-
return _date;
|
|
4819
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4820
|
-
var _value2 = fieldValues.remove(this);
|
|
4675
|
+
var _days2;
|
|
4821
4676
|
|
|
4822
|
-
|
|
4677
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
|
|
4678
|
+
var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
|
|
4823
4679
|
|
|
4824
|
-
var
|
|
4680
|
+
var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
|
|
4825
4681
|
|
|
4826
|
-
|
|
4827
|
-
|
|
4682
|
+
_days2 = _weeks4 * 7 + (dow - _dateDow4);
|
|
4683
|
+
} else {
|
|
4684
|
+
var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
|
|
4828
4685
|
|
|
4829
|
-
|
|
4686
|
+
var woy = this._range.checkValidIntValue(_value2, this);
|
|
4830
4687
|
|
|
4831
|
-
|
|
4832
|
-
} else {
|
|
4833
|
-
var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
|
|
4688
|
+
var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
|
|
4834
4689
|
|
|
4835
|
-
|
|
4690
|
+
_days2 = _weeks5 * 7 + (dow - _dateDow5);
|
|
4691
|
+
}
|
|
4836
4692
|
|
|
4837
|
-
|
|
4693
|
+
_date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
|
|
4838
4694
|
|
|
4839
|
-
|
|
4695
|
+
if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
|
|
4696
|
+
if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
|
|
4697
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
|
|
4840
4698
|
}
|
|
4699
|
+
}
|
|
4700
|
+
|
|
4701
|
+
fieldValues.remove(this);
|
|
4702
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4703
|
+
fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4704
|
+
return _date2;
|
|
4705
|
+
} else {
|
|
4706
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4707
|
+
}
|
|
4708
|
+
};
|
|
4841
4709
|
|
|
4842
|
-
|
|
4710
|
+
_proto.name = function name() {
|
|
4711
|
+
return this._name;
|
|
4712
|
+
};
|
|
4843
4713
|
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
}
|
|
4848
|
-
}
|
|
4714
|
+
_proto.baseUnit = function baseUnit() {
|
|
4715
|
+
return this._baseUnit;
|
|
4716
|
+
};
|
|
4849
4717
|
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
return _date2;
|
|
4854
|
-
} else {
|
|
4855
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4856
|
-
}
|
|
4857
|
-
}
|
|
4858
|
-
}, {
|
|
4859
|
-
key: "name",
|
|
4860
|
-
value: function name() {
|
|
4861
|
-
return this._name;
|
|
4862
|
-
}
|
|
4863
|
-
}, {
|
|
4864
|
-
key: "baseUnit",
|
|
4865
|
-
value: function baseUnit() {
|
|
4866
|
-
return this._baseUnit;
|
|
4867
|
-
}
|
|
4868
|
-
}, {
|
|
4869
|
-
key: "rangeUnit",
|
|
4870
|
-
value: function rangeUnit() {
|
|
4871
|
-
return this._rangeUnit;
|
|
4872
|
-
}
|
|
4873
|
-
}, {
|
|
4874
|
-
key: "range",
|
|
4875
|
-
value: function range() {
|
|
4876
|
-
return this._range;
|
|
4877
|
-
}
|
|
4878
|
-
}, {
|
|
4879
|
-
key: "isDateBased",
|
|
4880
|
-
value: function isDateBased() {
|
|
4881
|
-
return true;
|
|
4882
|
-
}
|
|
4883
|
-
}, {
|
|
4884
|
-
key: "isTimeBased",
|
|
4885
|
-
value: function isTimeBased() {
|
|
4886
|
-
return false;
|
|
4887
|
-
}
|
|
4888
|
-
}, {
|
|
4889
|
-
key: "isSupportedBy",
|
|
4890
|
-
value: function isSupportedBy(temporal) {
|
|
4891
|
-
if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
|
|
4892
|
-
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4893
|
-
return true;
|
|
4894
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4895
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
4896
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4897
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
4898
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
4899
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
4900
|
-
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4901
|
-
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
4902
|
-
}
|
|
4903
|
-
}
|
|
4718
|
+
_proto.rangeUnit = function rangeUnit() {
|
|
4719
|
+
return this._rangeUnit;
|
|
4720
|
+
};
|
|
4904
4721
|
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
}
|
|
4908
|
-
key: "rangeRefinedBy",
|
|
4909
|
-
value: function rangeRefinedBy(temporal) {
|
|
4910
|
-
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4911
|
-
return this._range;
|
|
4912
|
-
}
|
|
4722
|
+
_proto.range = function range() {
|
|
4723
|
+
return this._range;
|
|
4724
|
+
};
|
|
4913
4725
|
|
|
4914
|
-
|
|
4726
|
+
_proto.isDateBased = function isDateBased() {
|
|
4727
|
+
return true;
|
|
4728
|
+
};
|
|
4729
|
+
|
|
4730
|
+
_proto.isTimeBased = function isTimeBased() {
|
|
4731
|
+
return false;
|
|
4732
|
+
};
|
|
4915
4733
|
|
|
4916
|
-
|
|
4917
|
-
|
|
4734
|
+
_proto.isSupportedBy = function isSupportedBy(temporal) {
|
|
4735
|
+
if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
|
|
4736
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4737
|
+
return true;
|
|
4738
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4739
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
|
|
4918
4740
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4919
|
-
|
|
4741
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
|
|
4920
4742
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
4921
|
-
return
|
|
4743
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
4922
4744
|
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4923
|
-
return temporal.
|
|
4924
|
-
} else {
|
|
4925
|
-
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4745
|
+
return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
|
|
4926
4746
|
}
|
|
4747
|
+
}
|
|
4927
4748
|
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4931
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4749
|
+
return false;
|
|
4750
|
+
};
|
|
4932
4751
|
|
|
4933
|
-
|
|
4752
|
+
_proto.rangeRefinedBy = function rangeRefinedBy(temporal) {
|
|
4753
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
|
|
4754
|
+
return this._range;
|
|
4755
|
+
}
|
|
4934
4756
|
|
|
4935
|
-
|
|
4936
|
-
|
|
4757
|
+
var field = null;
|
|
4758
|
+
|
|
4759
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
|
|
4760
|
+
field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
|
|
4761
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4762
|
+
field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
|
|
4763
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
|
|
4764
|
+
return this._rangeWOWBY(temporal);
|
|
4765
|
+
} else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
|
|
4766
|
+
return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4767
|
+
} else {
|
|
4768
|
+
throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
|
|
4937
4769
|
}
|
|
4938
|
-
}, {
|
|
4939
|
-
key: "_rangeWOWBY",
|
|
4940
|
-
value: function _rangeWOWBY(temporal) {
|
|
4941
|
-
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4942
4770
|
|
|
4943
|
-
|
|
4944
|
-
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4771
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4945
4772
|
|
|
4946
|
-
|
|
4773
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4774
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4947
4775
|
|
|
4948
|
-
|
|
4949
|
-
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));
|
|
4950
|
-
}
|
|
4776
|
+
var offset = this._startOfWeekOffset(temporal.get(field), dow);
|
|
4951
4777
|
|
|
4952
|
-
|
|
4778
|
+
var fieldRange = temporal.range(field);
|
|
4779
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
|
|
4780
|
+
};
|
|
4953
4781
|
|
|
4954
|
-
|
|
4955
|
-
|
|
4782
|
+
_proto._rangeWOWBY = function _rangeWOWBY(temporal) {
|
|
4783
|
+
var sow = this._weekDef.firstDayOfWeek().value();
|
|
4956
4784
|
|
|
4957
|
-
|
|
4785
|
+
var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
|
|
4786
|
+
var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
|
|
4958
4787
|
|
|
4959
|
-
|
|
4960
|
-
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));
|
|
4961
|
-
}
|
|
4788
|
+
var woy = this._localizedWeekOfYear(temporal, dow);
|
|
4962
4789
|
|
|
4963
|
-
|
|
4790
|
+
if (woy === 0) {
|
|
4791
|
+
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));
|
|
4964
4792
|
}
|
|
4965
|
-
}, {
|
|
4966
|
-
key: "displayName",
|
|
4967
|
-
value: function displayName(locale) {
|
|
4968
|
-
requireNonNull(locale, 'locale');
|
|
4969
4793
|
|
|
4970
|
-
|
|
4971
|
-
return 'Week';
|
|
4972
|
-
}
|
|
4794
|
+
var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
|
|
4973
4795
|
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
}], [{
|
|
4982
|
-
key: "ofDayOfWeekField",
|
|
4983
|
-
value: function ofDayOfWeekField(weekDef) {
|
|
4984
|
-
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);
|
|
4985
|
-
}
|
|
4986
|
-
}, {
|
|
4987
|
-
key: "ofWeekOfMonthField",
|
|
4988
|
-
value: function ofWeekOfMonthField(weekDef) {
|
|
4989
|
-
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);
|
|
4990
|
-
}
|
|
4991
|
-
}, {
|
|
4992
|
-
key: "ofWeekOfYearField",
|
|
4993
|
-
value: function ofWeekOfYearField(weekDef) {
|
|
4994
|
-
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);
|
|
4995
|
-
}
|
|
4996
|
-
}, {
|
|
4997
|
-
key: "ofWeekOfWeekBasedYearField",
|
|
4998
|
-
value: function ofWeekOfWeekBasedYearField(weekDef) {
|
|
4999
|
-
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);
|
|
5000
|
-
}
|
|
5001
|
-
}, {
|
|
5002
|
-
key: "ofWeekBasedYearField",
|
|
5003
|
-
value: function ofWeekBasedYearField(weekDef) {
|
|
5004
|
-
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);
|
|
4796
|
+
var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
|
|
4797
|
+
var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
|
|
4798
|
+
|
|
4799
|
+
var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
|
|
4800
|
+
|
|
4801
|
+
if (woy >= weekIndexOfFirstWeekNextYear) {
|
|
4802
|
+
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));
|
|
5005
4803
|
}
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
4804
|
+
|
|
4805
|
+
return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
|
|
4806
|
+
};
|
|
4807
|
+
|
|
4808
|
+
_proto.displayName = function displayName(locale) {
|
|
4809
|
+
requireNonNull(locale, 'locale');
|
|
4810
|
+
|
|
4811
|
+
if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
|
|
4812
|
+
return 'Week';
|
|
5010
4813
|
}
|
|
5011
|
-
|
|
4814
|
+
|
|
4815
|
+
return this.toString();
|
|
4816
|
+
};
|
|
4817
|
+
|
|
4818
|
+
_proto.toString = function toString() {
|
|
4819
|
+
return this._name + "[" + this._weekDef.toString() + "]";
|
|
4820
|
+
};
|
|
5012
4821
|
|
|
5013
4822
|
return ComputedDayOfField;
|
|
5014
4823
|
}();
|
|
5015
4824
|
var WeekFieldsCache = new Map();
|
|
5016
4825
|
var WeekFields = function () {
|
|
5017
|
-
function
|
|
5018
|
-
|
|
4826
|
+
WeekFields.of = function of(firstDayOrLocale, minDays) {
|
|
4827
|
+
if (minDays === undefined) {
|
|
4828
|
+
return WeekFields.ofLocale(firstDayOrLocale);
|
|
4829
|
+
} else {
|
|
4830
|
+
return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
|
|
4831
|
+
}
|
|
4832
|
+
};
|
|
4833
|
+
|
|
4834
|
+
WeekFields.ofLocale = function ofLocale(locale) {
|
|
4835
|
+
requireNonNull(locale, 'locale');
|
|
4836
|
+
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
|
|
4837
|
+
var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
|
|
4838
|
+
var worldRegion = '001';
|
|
4839
|
+
var weekData = cldr.get('supplemental/weekData');
|
|
4840
|
+
|
|
4841
|
+
var dow = _weekDayMap[weekData.firstDay[locale.country()]];
|
|
4842
|
+
|
|
4843
|
+
if (!dow) {
|
|
4844
|
+
dow = _weekDayMap[weekData.firstDay[worldRegion]];
|
|
4845
|
+
}
|
|
4846
|
+
|
|
4847
|
+
var minDays = weekData.minDays[locale.country()];
|
|
4848
|
+
|
|
4849
|
+
if (!minDays) {
|
|
4850
|
+
minDays = weekData.minDays[worldRegion];
|
|
4851
|
+
}
|
|
4852
|
+
|
|
4853
|
+
return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
|
|
4854
|
+
};
|
|
4855
|
+
|
|
4856
|
+
WeekFields.ofFirstDayOfWeekMinDays = function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
4857
|
+
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
4858
|
+
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
4859
|
+
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
4860
|
+
var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
|
|
4861
|
+
var rules = WeekFieldsCache.get(key);
|
|
4862
|
+
|
|
4863
|
+
if (rules == null) {
|
|
4864
|
+
rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
|
|
4865
|
+
WeekFieldsCache.set(key, rules);
|
|
4866
|
+
rules = WeekFieldsCache.get(key);
|
|
4867
|
+
}
|
|
5019
4868
|
|
|
4869
|
+
return rules;
|
|
4870
|
+
};
|
|
4871
|
+
|
|
4872
|
+
function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
5020
4873
|
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
5021
4874
|
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
5022
4875
|
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
@@ -5035,114 +4888,55 @@ var WeekFields = function () {
|
|
|
5035
4888
|
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/likelySubtags.json'));
|
|
5036
4889
|
}
|
|
5037
4890
|
|
|
5038
|
-
|
|
5039
|
-
key: "firstDayOfWeek",
|
|
5040
|
-
value: function firstDayOfWeek() {
|
|
5041
|
-
return this._firstDayOfWeek;
|
|
5042
|
-
}
|
|
5043
|
-
}, {
|
|
5044
|
-
key: "minimalDaysInFirstWeek",
|
|
5045
|
-
value: function minimalDaysInFirstWeek() {
|
|
5046
|
-
return this._minimalDays;
|
|
5047
|
-
}
|
|
5048
|
-
}, {
|
|
5049
|
-
key: "dayOfWeek",
|
|
5050
|
-
value: function dayOfWeek() {
|
|
5051
|
-
return this._dayOfWeek;
|
|
5052
|
-
}
|
|
5053
|
-
}, {
|
|
5054
|
-
key: "weekOfMonth",
|
|
5055
|
-
value: function weekOfMonth() {
|
|
5056
|
-
return this._weekOfMonth;
|
|
5057
|
-
}
|
|
5058
|
-
}, {
|
|
5059
|
-
key: "weekOfYear",
|
|
5060
|
-
value: function weekOfYear() {
|
|
5061
|
-
return this._weekOfYear;
|
|
5062
|
-
}
|
|
5063
|
-
}, {
|
|
5064
|
-
key: "weekOfWeekBasedYear",
|
|
5065
|
-
value: function weekOfWeekBasedYear() {
|
|
5066
|
-
return this._weekOfWeekBasedYear;
|
|
5067
|
-
}
|
|
5068
|
-
}, {
|
|
5069
|
-
key: "weekBasedYear",
|
|
5070
|
-
value: function weekBasedYear() {
|
|
5071
|
-
return this._weekBasedYear;
|
|
5072
|
-
}
|
|
5073
|
-
}, {
|
|
5074
|
-
key: "equals",
|
|
5075
|
-
value: function equals(other) {
|
|
5076
|
-
if (this === other) {
|
|
5077
|
-
return true;
|
|
5078
|
-
}
|
|
4891
|
+
var _proto2 = WeekFields.prototype;
|
|
5079
4892
|
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
4893
|
+
_proto2.firstDayOfWeek = function firstDayOfWeek() {
|
|
4894
|
+
return this._firstDayOfWeek;
|
|
4895
|
+
};
|
|
5083
4896
|
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
}
|
|
5087
|
-
key: "hashCode",
|
|
5088
|
-
value: function hashCode() {
|
|
5089
|
-
return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
|
|
5090
|
-
}
|
|
5091
|
-
}, {
|
|
5092
|
-
key: "toString",
|
|
5093
|
-
value: function toString() {
|
|
5094
|
-
return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
|
|
5095
|
-
}
|
|
5096
|
-
}], [{
|
|
5097
|
-
key: "of",
|
|
5098
|
-
value: function of(firstDayOrLocale, minDays) {
|
|
5099
|
-
if (minDays === undefined) {
|
|
5100
|
-
return WeekFields.ofLocale(firstDayOrLocale);
|
|
5101
|
-
} else {
|
|
5102
|
-
return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
|
|
5103
|
-
}
|
|
5104
|
-
}
|
|
5105
|
-
}, {
|
|
5106
|
-
key: "ofLocale",
|
|
5107
|
-
value: function ofLocale(locale) {
|
|
5108
|
-
requireNonNull(locale, 'locale');
|
|
5109
|
-
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
|
|
5110
|
-
var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
|
|
5111
|
-
var worldRegion = '001';
|
|
5112
|
-
var weekData = cldr.get('supplemental/weekData');
|
|
5113
|
-
|
|
5114
|
-
var dow = _weekDayMap[weekData.firstDay[locale.country()]];
|
|
5115
|
-
|
|
5116
|
-
if (!dow) {
|
|
5117
|
-
dow = _weekDayMap[weekData.firstDay[worldRegion]];
|
|
5118
|
-
}
|
|
4897
|
+
_proto2.minimalDaysInFirstWeek = function minimalDaysInFirstWeek() {
|
|
4898
|
+
return this._minimalDays;
|
|
4899
|
+
};
|
|
5119
4900
|
|
|
5120
|
-
|
|
4901
|
+
_proto2.dayOfWeek = function dayOfWeek() {
|
|
4902
|
+
return this._dayOfWeek;
|
|
4903
|
+
};
|
|
5121
4904
|
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
4905
|
+
_proto2.weekOfMonth = function weekOfMonth() {
|
|
4906
|
+
return this._weekOfMonth;
|
|
4907
|
+
};
|
|
4908
|
+
|
|
4909
|
+
_proto2.weekOfYear = function weekOfYear() {
|
|
4910
|
+
return this._weekOfYear;
|
|
4911
|
+
};
|
|
4912
|
+
|
|
4913
|
+
_proto2.weekOfWeekBasedYear = function weekOfWeekBasedYear() {
|
|
4914
|
+
return this._weekOfWeekBasedYear;
|
|
4915
|
+
};
|
|
5125
4916
|
|
|
5126
|
-
|
|
4917
|
+
_proto2.weekBasedYear = function weekBasedYear() {
|
|
4918
|
+
return this._weekBasedYear;
|
|
4919
|
+
};
|
|
4920
|
+
|
|
4921
|
+
_proto2.equals = function equals(other) {
|
|
4922
|
+
if (this === other) {
|
|
4923
|
+
return true;
|
|
5127
4924
|
}
|
|
5128
|
-
}, {
|
|
5129
|
-
key: "ofFirstDayOfWeekMinDays",
|
|
5130
|
-
value: function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
5131
|
-
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
5132
|
-
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
5133
|
-
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
5134
|
-
var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
|
|
5135
|
-
var rules = WeekFieldsCache.get(key);
|
|
5136
|
-
|
|
5137
|
-
if (rules == null) {
|
|
5138
|
-
rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
|
|
5139
|
-
WeekFieldsCache.set(key, rules);
|
|
5140
|
-
rules = WeekFieldsCache.get(key);
|
|
5141
|
-
}
|
|
5142
4925
|
|
|
5143
|
-
|
|
4926
|
+
if (other instanceof WeekFields) {
|
|
4927
|
+
return this.hashCode() === other.hashCode();
|
|
5144
4928
|
}
|
|
5145
|
-
|
|
4929
|
+
|
|
4930
|
+
return false;
|
|
4931
|
+
};
|
|
4932
|
+
|
|
4933
|
+
_proto2.hashCode = function hashCode() {
|
|
4934
|
+
return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
|
|
4935
|
+
};
|
|
4936
|
+
|
|
4937
|
+
_proto2.toString = function toString() {
|
|
4938
|
+
return "WeekFields[" + this._firstDayOfWeek + "," + this._minimalDays + "]";
|
|
4939
|
+
};
|
|
5146
4940
|
|
|
5147
4941
|
return WeekFields;
|
|
5148
4942
|
}();
|