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