@js-joda/locale_fr 4.1.0 → 4.4.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/LICENSE +34 -0
- package/dist/index.js +201 -164
- package/dist/index.js.map +1 -1
- package/dist/js-joda-locale.d.ts +12 -0
- package/package.json +3 -4
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/locale - 4.
|
|
1
|
+
//! @version @js-joda/locale - 4.3.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)
|
|
@@ -1293,17 +1293,17 @@ module.exports = JSON.parse("{\"supplemental\":{\"version\":{\"_unicodeVersion\"
|
|
|
1293
1293
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1294
1294
|
|
|
1295
1295
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
1296
|
-
* CLDR JavaScript Library v0.5.
|
|
1296
|
+
* CLDR JavaScript Library v0.5.4
|
|
1297
1297
|
* http://jquery.com/
|
|
1298
1298
|
*
|
|
1299
1299
|
* Copyright 2013 Rafael Xavier de Souza
|
|
1300
1300
|
* Released under the MIT license
|
|
1301
1301
|
* http://jquery.org/license
|
|
1302
1302
|
*
|
|
1303
|
-
* Date:
|
|
1303
|
+
* Date: 2020-10-22T15:56Z
|
|
1304
1304
|
*/
|
|
1305
1305
|
/*!
|
|
1306
|
-
* CLDR JavaScript Library v0.5.
|
|
1306
|
+
* CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier
|
|
1307
1307
|
* http://git.io/h4lmVg
|
|
1308
1308
|
*/
|
|
1309
1309
|
(function( root, factory ) {
|
|
@@ -1585,10 +1585,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
|
1585
1585
|
availableBundleMapQueue = Cldr._availableBundleMapQueue;
|
|
1586
1586
|
|
|
1587
1587
|
if ( availableBundleMapQueue.length ) {
|
|
1588
|
-
arrayForEach( availableBundleMapQueue, function( bundle ) {
|
|
1588
|
+
arrayForEach( availableBundleMapQueue, function( bundle, i ) {
|
|
1589
1589
|
var existing, maxBundle, minBundle, subtags;
|
|
1590
1590
|
subtags = coreSubtags( bundle );
|
|
1591
1591
|
maxBundle = coreLikelySubtags( Cldr, cldr, subtags );
|
|
1592
|
+
if ( maxBundle === undefined ) {
|
|
1593
|
+
availableBundleMapQueue.splice( i, 1 );
|
|
1594
|
+
throw new Error( "Could not find likelySubtags for " + bundle );
|
|
1595
|
+
}
|
|
1592
1596
|
minBundle = coreRemoveLikelySubtags( Cldr, cldr, maxBundle );
|
|
1593
1597
|
minBundle = minBundle.join( Cldr.localeSep );
|
|
1594
1598
|
existing = availableBundleMap[ minBundle ];
|
|
@@ -1984,17 +1988,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
|
1984
1988
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1985
1989
|
|
|
1986
1990
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
1987
|
-
* CLDR JavaScript Library v0.5.
|
|
1991
|
+
* CLDR JavaScript Library v0.5.4
|
|
1988
1992
|
* http://jquery.com/
|
|
1989
1993
|
*
|
|
1990
1994
|
* Copyright 2013 Rafael Xavier de Souza
|
|
1991
1995
|
* Released under the MIT license
|
|
1992
1996
|
* http://jquery.org/license
|
|
1993
1997
|
*
|
|
1994
|
-
* Date:
|
|
1998
|
+
* Date: 2020-10-22T15:56Z
|
|
1995
1999
|
*/
|
|
1996
2000
|
/*!
|
|
1997
|
-
* CLDR JavaScript Library v0.5.
|
|
2001
|
+
* CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier
|
|
1998
2002
|
* http://git.io/h4lmVg
|
|
1999
2003
|
*/
|
|
2000
2004
|
(function( factory ) {
|
|
@@ -2577,17 +2581,17 @@ EventEmitter = (function () {
|
|
|
2577
2581
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2578
2582
|
|
|
2579
2583
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
2580
|
-
* CLDR JavaScript Library v0.5.
|
|
2584
|
+
* CLDR JavaScript Library v0.5.4
|
|
2581
2585
|
* http://jquery.com/
|
|
2582
2586
|
*
|
|
2583
2587
|
* Copyright 2013 Rafael Xavier de Souza
|
|
2584
2588
|
* Released under the MIT license
|
|
2585
2589
|
* http://jquery.org/license
|
|
2586
2590
|
*
|
|
2587
|
-
* Date:
|
|
2591
|
+
* Date: 2020-10-22T15:56Z
|
|
2588
2592
|
*/
|
|
2589
2593
|
/*!
|
|
2590
|
-
* CLDR JavaScript Library v0.5.
|
|
2594
|
+
* CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier
|
|
2591
2595
|
* http://git.io/h4lmVg
|
|
2592
2596
|
*/
|
|
2593
2597
|
(function( factory ) {
|
|
@@ -2686,17 +2690,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2686
2690
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2687
2691
|
|
|
2688
2692
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
|
|
2689
|
-
* CLDR JavaScript Library v0.5.
|
|
2693
|
+
* CLDR JavaScript Library v0.5.4
|
|
2690
2694
|
* http://jquery.com/
|
|
2691
2695
|
*
|
|
2692
2696
|
* Copyright 2013 Rafael Xavier de Souza
|
|
2693
2697
|
* Released under the MIT license
|
|
2694
2698
|
* http://jquery.org/license
|
|
2695
2699
|
*
|
|
2696
|
-
* Date:
|
|
2700
|
+
* Date: 2020-10-22T15:56Z
|
|
2697
2701
|
*/
|
|
2698
2702
|
/*!
|
|
2699
|
-
* CLDR JavaScript Library v0.5.
|
|
2703
|
+
* CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier
|
|
2700
2704
|
* http://git.io/h4lmVg
|
|
2701
2705
|
*/
|
|
2702
2706
|
(function( factory ) {
|
|
@@ -2858,17 +2862,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2858
2862
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2859
2863
|
|
|
2860
2864
|
/**
|
|
2861
|
-
* CLDR JavaScript Library v0.5.
|
|
2865
|
+
* CLDR JavaScript Library v0.5.4
|
|
2862
2866
|
* http://jquery.com/
|
|
2863
2867
|
*
|
|
2864
2868
|
* Copyright 2013 Rafael Xavier de Souza
|
|
2865
2869
|
* Released under the MIT license
|
|
2866
2870
|
* http://jquery.org/license
|
|
2867
2871
|
*
|
|
2868
|
-
* Date:
|
|
2872
|
+
* Date: 2020-10-22T15:56Z
|
|
2869
2873
|
*/
|
|
2870
2874
|
/*!
|
|
2871
|
-
* CLDR JavaScript Library v0.5.
|
|
2875
|
+
* CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier
|
|
2872
2876
|
* http://git.io/h4lmVg
|
|
2873
2877
|
*/
|
|
2874
2878
|
|
|
@@ -2908,13 +2912,6 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
2908
2912
|
|
|
2909
2913
|
|
|
2910
2914
|
var Locale = function () {
|
|
2911
|
-
_createClass(Locale, null, [{
|
|
2912
|
-
key: "getAvailableLocales",
|
|
2913
|
-
value: function getAvailableLocales() {
|
|
2914
|
-
return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
|
|
2915
|
-
}
|
|
2916
|
-
}]);
|
|
2917
|
-
|
|
2918
2915
|
function Locale(language) {
|
|
2919
2916
|
var country = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2920
2917
|
var localeString = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
@@ -2967,6 +2964,11 @@ var Locale = function () {
|
|
|
2967
2964
|
|
|
2968
2965
|
return this.localeString() === other.localeString();
|
|
2969
2966
|
}
|
|
2967
|
+
}], [{
|
|
2968
|
+
key: "getAvailableLocales",
|
|
2969
|
+
value: function getAvailableLocales() {
|
|
2970
|
+
return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
|
|
2971
|
+
}
|
|
2970
2972
|
}]);
|
|
2971
2973
|
|
|
2972
2974
|
return Locale;
|
|
@@ -2985,6 +2987,14 @@ function _init() {
|
|
|
2985
2987
|
Locale.KOREAN = new Locale('ko');
|
|
2986
2988
|
Locale.JAPANESE = new Locale('ja', 'JP');
|
|
2987
2989
|
Locale.JAPAN = new Locale('ja', 'JP', 'ja');
|
|
2990
|
+
Locale.ITALIAN = new Locale('it');
|
|
2991
|
+
Locale.ITALY = new Locale('it', 'IT', 'it');
|
|
2992
|
+
Locale.CHINESE = new Locale('zh');
|
|
2993
|
+
Locale.ROMANIAN = new Locale('ro');
|
|
2994
|
+
Locale.SWEDISH = new Locale('sv');
|
|
2995
|
+
Locale.SWEDEN = new Locale('sv', 'SE', 'sv');
|
|
2996
|
+
Locale.HINDI = new Locale('hi');
|
|
2997
|
+
Locale.RUSSIAN = new Locale('ru');
|
|
2988
2998
|
}
|
|
2989
2999
|
|
|
2990
3000
|
/***/ }),
|
|
@@ -3000,12 +3010,14 @@ function _init() {
|
|
|
3000
3010
|
__webpack_require__.r(__webpack_exports__);
|
|
3001
3011
|
/* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Locale */ "./src/Locale.js");
|
|
3002
3012
|
/* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./temporal/WeekFields */ "./src/temporal/WeekFields.js");
|
|
3013
|
+
/* harmony import */ var _format_LocaleDateTimeFormatter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./format/LocaleDateTimeFormatter */ "./src/format/LocaleDateTimeFormatter.js");
|
|
3003
3014
|
/*
|
|
3004
3015
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
3005
3016
|
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
3006
3017
|
*/
|
|
3007
3018
|
|
|
3008
3019
|
|
|
3020
|
+
|
|
3009
3021
|
var isInit = false;
|
|
3010
3022
|
|
|
3011
3023
|
function init() {
|
|
@@ -3016,6 +3028,7 @@ function init() {
|
|
|
3016
3028
|
isInit = true;
|
|
3017
3029
|
Object(_Locale__WEBPACK_IMPORTED_MODULE_0__["_init"])();
|
|
3018
3030
|
Object(_temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["_init"])();
|
|
3031
|
+
Object(_format_LocaleDateTimeFormatter__WEBPACK_IMPORTED_MODULE_2__["_init"])();
|
|
3019
3032
|
}
|
|
3020
3033
|
|
|
3021
3034
|
init();
|
|
@@ -3026,16 +3039,18 @@ init();
|
|
|
3026
3039
|
/*!***********************************************!*\
|
|
3027
3040
|
!*** ./src/format/LocaleDateTimeFormatter.js ***!
|
|
3028
3041
|
\***********************************************/
|
|
3029
|
-
/*! exports provided: default */
|
|
3042
|
+
/*! exports provided: default, _init */
|
|
3030
3043
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3031
3044
|
|
|
3032
3045
|
"use strict";
|
|
3033
3046
|
__webpack_require__.r(__webpack_exports__);
|
|
3034
3047
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocaleDateTimeFormatter; });
|
|
3048
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_init", function() { return _init; });
|
|
3035
3049
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
3036
3050
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3037
3051
|
/* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locale */ "./src/Locale.js");
|
|
3038
|
-
|
|
3052
|
+
/* harmony import */ var _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cldr/CldrDateTimeFormatterBuilder */ "./src/format/cldr/CldrDateTimeFormatterBuilder.js");
|
|
3053
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
3039
3054
|
|
|
3040
3055
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3041
3056
|
|
|
@@ -3043,15 +3058,19 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3043
3058
|
|
|
3044
3059
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3045
3060
|
|
|
3046
|
-
function
|
|
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); }
|
|
3047
3062
|
|
|
3048
|
-
function
|
|
3063
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3049
3064
|
|
|
3050
|
-
function
|
|
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); }; }
|
|
3051
3066
|
|
|
3052
|
-
function
|
|
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); }
|
|
3053
3068
|
|
|
3054
|
-
function
|
|
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); }
|
|
3055
3074
|
|
|
3056
3075
|
/*
|
|
3057
3076
|
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
|
|
@@ -3059,15 +3078,18 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
3059
3078
|
*/
|
|
3060
3079
|
|
|
3061
3080
|
|
|
3081
|
+
|
|
3062
3082
|
var requireNonNull = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].assert.requireNonNull;
|
|
3063
3083
|
|
|
3064
3084
|
var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
|
|
3065
3085
|
_inherits(LocaleDateTimeFormatter, _DateTimeFormatter);
|
|
3066
3086
|
|
|
3087
|
+
var _super = _createSuper(LocaleDateTimeFormatter);
|
|
3088
|
+
|
|
3067
3089
|
function LocaleDateTimeFormatter() {
|
|
3068
3090
|
_classCallCheck(this, LocaleDateTimeFormatter);
|
|
3069
3091
|
|
|
3070
|
-
return
|
|
3092
|
+
return _super.apply(this, arguments);
|
|
3071
3093
|
}
|
|
3072
3094
|
|
|
3073
3095
|
_createClass(LocaleDateTimeFormatter, [{
|
|
@@ -3087,6 +3109,32 @@ var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
|
|
|
3087
3109
|
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"]);
|
|
3088
3110
|
|
|
3089
3111
|
|
|
3112
|
+
function _init() {
|
|
3113
|
+
var dow = {
|
|
3114
|
+
1: 'Mon',
|
|
3115
|
+
2: 'Tue',
|
|
3116
|
+
3: 'Wed',
|
|
3117
|
+
4: 'Thu',
|
|
3118
|
+
5: 'Fri',
|
|
3119
|
+
6: 'Sat',
|
|
3120
|
+
7: 'Sun'
|
|
3121
|
+
};
|
|
3122
|
+
var moy = {
|
|
3123
|
+
1: 'Jan',
|
|
3124
|
+
2: 'Feb',
|
|
3125
|
+
3: 'Mar',
|
|
3126
|
+
4: 'Apr',
|
|
3127
|
+
5: 'May',
|
|
3128
|
+
6: 'Jun',
|
|
3129
|
+
7: 'Jul',
|
|
3130
|
+
8: 'Aug',
|
|
3131
|
+
9: 'Sep',
|
|
3132
|
+
10: 'Oct',
|
|
3133
|
+
11: 'Nov',
|
|
3134
|
+
12: 'Dec'
|
|
3135
|
+
};
|
|
3136
|
+
LocaleDateTimeFormatter.RFC_1123_DATE_TIME = new _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__["default"]().parseCaseInsensitive().parseLenient().optionalStart().appendText(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, dow).appendLiteral(', ').optionalEnd().appendValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH, 2).appendLiteral(' ').appendText(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR, moy).appendLiteral(' ').appendValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR, 4).appendLiteral(' ').appendValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].HOUR_OF_DAY, 2).appendLiteral(':').appendValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MINUTE_OF_HOUR, 2).optionalStart().appendLiteral(':').appendValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].SECOND_OF_MINUTE, 2).optionalEnd().appendLiteral(' ').appendZoneId().toFormatter(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].SMART).withChronology(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE);
|
|
3137
|
+
}
|
|
3090
3138
|
|
|
3091
3139
|
/***/ }),
|
|
3092
3140
|
|
|
@@ -3139,7 +3187,7 @@ var LocaleStore = function () {
|
|
|
3139
3187
|
var value = valueTextMap[style][key];
|
|
3140
3188
|
|
|
3141
3189
|
if (reverse[value] === undefined) {
|
|
3142
|
-
reverse[value] = createEntry(value,
|
|
3190
|
+
reverse[value] = createEntry(value, parseInt(key));
|
|
3143
3191
|
list.push(reverse[value]);
|
|
3144
3192
|
}
|
|
3145
3193
|
});
|
|
@@ -3247,7 +3295,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3247
3295
|
/* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
|
|
3248
3296
|
/* harmony import */ var _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser/LocalizedOffsetPrinterParser */ "./src/format/parser/LocalizedOffsetPrinterParser.js");
|
|
3249
3297
|
/* harmony import */ var _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../parser/WeekFieldsPrinterParser */ "./src/format/parser/WeekFieldsPrinterParser.js");
|
|
3250
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
3298
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
3251
3299
|
|
|
3252
3300
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3253
3301
|
|
|
@@ -3255,15 +3303,19 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3255
3303
|
|
|
3256
3304
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3257
3305
|
|
|
3258
|
-
function
|
|
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); }
|
|
3259
3307
|
|
|
3260
|
-
function
|
|
3308
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3261
3309
|
|
|
3262
|
-
function
|
|
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); }; }
|
|
3263
3311
|
|
|
3264
|
-
function
|
|
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); }
|
|
3265
3313
|
|
|
3266
|
-
function
|
|
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); }
|
|
3267
3319
|
|
|
3268
3320
|
/**
|
|
3269
3321
|
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
@@ -3284,10 +3336,12 @@ var _jodaInternal$assert = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].asser
|
|
|
3284
3336
|
var CldrDateTimeFormatterBuilder = function (_DateTimeFormatterBui) {
|
|
3285
3337
|
_inherits(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
|
|
3286
3338
|
|
|
3339
|
+
var _super = _createSuper(CldrDateTimeFormatterBuilder);
|
|
3340
|
+
|
|
3287
3341
|
function CldrDateTimeFormatterBuilder() {
|
|
3288
3342
|
_classCallCheck(this, CldrDateTimeFormatterBuilder);
|
|
3289
3343
|
|
|
3290
|
-
return
|
|
3344
|
+
return _super.apply(this, arguments);
|
|
3291
3345
|
}
|
|
3292
3346
|
|
|
3293
3347
|
_createClass(CldrDateTimeFormatterBuilder, [{
|
|
@@ -3646,6 +3700,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3646
3700
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
3647
3701
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
3648
3702
|
/* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
|
|
3703
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3704
|
+
|
|
3705
|
+
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
|
+
|
|
3707
|
+
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
|
+
|
|
3649
3709
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3650
3710
|
|
|
3651
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); } }
|
|
@@ -3799,12 +3859,12 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3799
3859
|
var ids = {};
|
|
3800
3860
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(localString, "/timeZoneNames.json"));
|
|
3801
3861
|
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
|
|
3802
|
-
|
|
3803
|
-
var
|
|
3804
|
-
|
|
3862
|
+
|
|
3863
|
+
var _iterator = _createForOfIteratorHelper(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()),
|
|
3864
|
+
_step;
|
|
3805
3865
|
|
|
3806
3866
|
try {
|
|
3807
|
-
for (
|
|
3867
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3808
3868
|
var id = _step.value;
|
|
3809
3869
|
ids[id] = id;
|
|
3810
3870
|
var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
|
|
@@ -3828,18 +3888,9 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3828
3888
|
}
|
|
3829
3889
|
}
|
|
3830
3890
|
} catch (err) {
|
|
3831
|
-
|
|
3832
|
-
_iteratorError = err;
|
|
3891
|
+
_iterator.e(err);
|
|
3833
3892
|
} finally {
|
|
3834
|
-
|
|
3835
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
3836
|
-
_iterator["return"]();
|
|
3837
|
-
}
|
|
3838
|
-
} finally {
|
|
3839
|
-
if (_didIteratorError) {
|
|
3840
|
-
throw _iteratorError;
|
|
3841
|
-
}
|
|
3842
|
-
}
|
|
3893
|
+
_iterator.f();
|
|
3843
3894
|
}
|
|
3844
3895
|
|
|
3845
3896
|
var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
|
|
@@ -3865,12 +3916,11 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3865
3916
|
ids = _this$_resolveZoneIds.ids,
|
|
3866
3917
|
sortedKeys = _this$_resolveZoneIds.sortedKeys;
|
|
3867
3918
|
|
|
3868
|
-
var
|
|
3869
|
-
|
|
3870
|
-
var _iteratorError2 = undefined;
|
|
3919
|
+
var _iterator2 = _createForOfIteratorHelper(sortedKeys),
|
|
3920
|
+
_step2;
|
|
3871
3921
|
|
|
3872
3922
|
try {
|
|
3873
|
-
for (
|
|
3923
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
3874
3924
|
var _name = _step2.value;
|
|
3875
3925
|
|
|
3876
3926
|
if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
|
|
@@ -3879,18 +3929,9 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3879
3929
|
}
|
|
3880
3930
|
}
|
|
3881
3931
|
} catch (err) {
|
|
3882
|
-
|
|
3883
|
-
_iteratorError2 = err;
|
|
3932
|
+
_iterator2.e(err);
|
|
3884
3933
|
} finally {
|
|
3885
|
-
|
|
3886
|
-
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
|
|
3887
|
-
_iterator2["return"]();
|
|
3888
|
-
}
|
|
3889
|
-
} finally {
|
|
3890
|
-
if (_didIteratorError2) {
|
|
3891
|
-
throw _iteratorError2;
|
|
3892
|
-
}
|
|
3893
|
-
}
|
|
3934
|
+
_iterator2.f();
|
|
3894
3935
|
}
|
|
3895
3936
|
|
|
3896
3937
|
return ~position;
|
|
@@ -4131,6 +4172,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4131
4172
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPrinterParser; });
|
|
4132
4173
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
4133
4174
|
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
4175
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4176
|
+
|
|
4177
|
+
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
|
+
|
|
4179
|
+
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
|
+
|
|
4134
4181
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4135
4182
|
|
|
4136
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); } }
|
|
@@ -4200,12 +4247,11 @@ var TextPrinterParser = function () {
|
|
|
4200
4247
|
var it = this._provider.getTextIterator(this._field, style, context.locale());
|
|
4201
4248
|
|
|
4202
4249
|
if (it != null) {
|
|
4203
|
-
var
|
|
4204
|
-
|
|
4205
|
-
var _iteratorError = undefined;
|
|
4250
|
+
var _iterator = _createForOfIteratorHelper(it),
|
|
4251
|
+
_step;
|
|
4206
4252
|
|
|
4207
4253
|
try {
|
|
4208
|
-
for (
|
|
4254
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
4209
4255
|
var entry = _step.value;
|
|
4210
4256
|
var itText = entry.key;
|
|
4211
4257
|
|
|
@@ -4214,18 +4260,9 @@ var TextPrinterParser = function () {
|
|
|
4214
4260
|
}
|
|
4215
4261
|
}
|
|
4216
4262
|
} catch (err) {
|
|
4217
|
-
|
|
4218
|
-
_iteratorError = err;
|
|
4263
|
+
_iterator.e(err);
|
|
4219
4264
|
} finally {
|
|
4220
|
-
|
|
4221
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
4222
|
-
_iterator["return"]();
|
|
4223
|
-
}
|
|
4224
|
-
} finally {
|
|
4225
|
-
if (_didIteratorError) {
|
|
4226
|
-
throw _iteratorError;
|
|
4227
|
-
}
|
|
4228
|
-
}
|
|
4265
|
+
_iterator.f();
|
|
4229
4266
|
}
|
|
4230
4267
|
|
|
4231
4268
|
if (context.isStrict()) {
|
|
@@ -4445,6 +4482,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4445
4482
|
jsJoda.DateTimeFormatter.prototype[prop] = _format_LocaleDateTimeFormatter__WEBPACK_IMPORTED_MODULE_1__["default"].prototype[prop];
|
|
4446
4483
|
}
|
|
4447
4484
|
});
|
|
4485
|
+
jsJoda.DateTimeFormatter.RFC_1123_DATE_TIME = _format_LocaleDateTimeFormatter__WEBPACK_IMPORTED_MODULE_1__["default"].RFC_1123_DATE_TIME;
|
|
4448
4486
|
});
|
|
4449
4487
|
|
|
4450
4488
|
/***/ }),
|
|
@@ -4499,33 +4537,6 @@ var _weekDayMap = {
|
|
|
4499
4537
|
'sun': _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"].SUNDAY
|
|
4500
4538
|
};
|
|
4501
4539
|
var ComputedDayOfField = function () {
|
|
4502
|
-
_createClass(ComputedDayOfField, null, [{
|
|
4503
|
-
key: "ofDayOfWeekField",
|
|
4504
|
-
value: function ofDayOfWeekField(weekDef) {
|
|
4505
|
-
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);
|
|
4506
|
-
}
|
|
4507
|
-
}, {
|
|
4508
|
-
key: "ofWeekOfMonthField",
|
|
4509
|
-
value: function ofWeekOfMonthField(weekDef) {
|
|
4510
|
-
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);
|
|
4511
|
-
}
|
|
4512
|
-
}, {
|
|
4513
|
-
key: "ofWeekOfYearField",
|
|
4514
|
-
value: function ofWeekOfYearField(weekDef) {
|
|
4515
|
-
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);
|
|
4516
|
-
}
|
|
4517
|
-
}, {
|
|
4518
|
-
key: "ofWeekOfWeekBasedYearField",
|
|
4519
|
-
value: function ofWeekOfWeekBasedYearField(weekDef) {
|
|
4520
|
-
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);
|
|
4521
|
-
}
|
|
4522
|
-
}, {
|
|
4523
|
-
key: "ofWeekBasedYearField",
|
|
4524
|
-
value: function ofWeekBasedYearField(weekDef) {
|
|
4525
|
-
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);
|
|
4526
|
-
}
|
|
4527
|
-
}]);
|
|
4528
|
-
|
|
4529
4540
|
function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
|
|
4530
4541
|
_classCallCheck(this, ComputedDayOfField);
|
|
4531
4542
|
|
|
@@ -4976,6 +4987,31 @@ var ComputedDayOfField = function () {
|
|
|
4976
4987
|
return "".concat(this._name, "[").concat(this._weekDef.toString(), "]");
|
|
4977
4988
|
}
|
|
4978
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);
|
|
5013
|
+
}
|
|
5014
|
+
}, {
|
|
4979
5015
|
key: "_computeWeek",
|
|
4980
5016
|
value: function _computeWeek(offset, day) {
|
|
4981
5017
|
return MathUtil.intDiv(7 + offset + (day - 1), 7);
|
|
@@ -4986,57 +5022,6 @@ var ComputedDayOfField = function () {
|
|
|
4986
5022
|
}();
|
|
4987
5023
|
var WeekFieldsCache = new Map();
|
|
4988
5024
|
var WeekFields = function () {
|
|
4989
|
-
_createClass(WeekFields, null, [{
|
|
4990
|
-
key: "of",
|
|
4991
|
-
value: function of(firstDayOrLocale, minDays) {
|
|
4992
|
-
if (minDays === undefined) {
|
|
4993
|
-
return WeekFields.ofLocale(firstDayOrLocale);
|
|
4994
|
-
} else {
|
|
4995
|
-
return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
|
|
4996
|
-
}
|
|
4997
|
-
}
|
|
4998
|
-
}, {
|
|
4999
|
-
key: "ofLocale",
|
|
5000
|
-
value: function ofLocale(locale) {
|
|
5001
|
-
requireNonNull(locale, 'locale');
|
|
5002
|
-
cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
|
|
5003
|
-
var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
|
|
5004
|
-
var worldRegion = '001';
|
|
5005
|
-
var weekData = cldr.get('supplemental/weekData');
|
|
5006
|
-
|
|
5007
|
-
var dow = _weekDayMap[weekData.firstDay[locale.country()]];
|
|
5008
|
-
|
|
5009
|
-
if (!dow) {
|
|
5010
|
-
dow = _weekDayMap[weekData.firstDay[worldRegion]];
|
|
5011
|
-
}
|
|
5012
|
-
|
|
5013
|
-
var minDays = weekData.minDays[locale.country()];
|
|
5014
|
-
|
|
5015
|
-
if (!minDays) {
|
|
5016
|
-
minDays = weekData.minDays[worldRegion];
|
|
5017
|
-
}
|
|
5018
|
-
|
|
5019
|
-
return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
|
|
5020
|
-
}
|
|
5021
|
-
}, {
|
|
5022
|
-
key: "ofFirstDayOfWeekMinDays",
|
|
5023
|
-
value: function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
5024
|
-
requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
|
|
5025
|
-
requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
|
|
5026
|
-
requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
|
|
5027
|
-
var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
|
|
5028
|
-
var rules = WeekFieldsCache.get(key);
|
|
5029
|
-
|
|
5030
|
-
if (rules == null) {
|
|
5031
|
-
rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
|
|
5032
|
-
WeekFieldsCache.set(key, rules);
|
|
5033
|
-
rules = WeekFieldsCache.get(key);
|
|
5034
|
-
}
|
|
5035
|
-
|
|
5036
|
-
return rules;
|
|
5037
|
-
}
|
|
5038
|
-
}]);
|
|
5039
|
-
|
|
5040
5025
|
function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
|
|
5041
5026
|
_classCallCheck(this, WeekFields);
|
|
5042
5027
|
|
|
@@ -5116,6 +5101,55 @@ var WeekFields = function () {
|
|
|
5116
5101
|
value: function toString() {
|
|
5117
5102
|
return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
|
|
5118
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
|
+
}
|
|
5127
|
+
|
|
5128
|
+
var minDays = weekData.minDays[locale.country()];
|
|
5129
|
+
|
|
5130
|
+
if (!minDays) {
|
|
5131
|
+
minDays = weekData.minDays[worldRegion];
|
|
5132
|
+
}
|
|
5133
|
+
|
|
5134
|
+
return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
|
|
5135
|
+
}
|
|
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
|
+
|
|
5151
|
+
return rules;
|
|
5152
|
+
}
|
|
5119
5153
|
}]);
|
|
5120
5154
|
|
|
5121
5155
|
return WeekFields;
|
|
@@ -5134,6 +5168,9 @@ function _init() {
|
|
|
5134
5168
|
/*! no static exports found */
|
|
5135
5169
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5136
5170
|
|
|
5171
|
+
/* eslint-disable */
|
|
5172
|
+
// we must use es5 compatible code in this post install file
|
|
5173
|
+
|
|
5137
5174
|
/*
|
|
5138
5175
|
* @copyright (c) 2018, Philipp Thuerwaechter & Pattrick Hueper
|
|
5139
5176
|
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
|
|
@@ -5147,7 +5184,7 @@ function _init() {
|
|
|
5147
5184
|
* that cldr-data is installed in parallel!
|
|
5148
5185
|
*/
|
|
5149
5186
|
module.exports = function (cldrPath) {
|
|
5150
|
-
return __webpack_require__("./node_modules/cldr-data sync recursive ^\\.\\/.*$")(
|
|
5187
|
+
return __webpack_require__("./node_modules/cldr-data sync recursive ^\\.\\/.*$")("./".concat(cldrPath));
|
|
5151
5188
|
};
|
|
5152
5189
|
|
|
5153
5190
|
|