@js-joda/locale_fr 4.0.1 → 4.1.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 +40 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! @version @js-joda/locale - 4.0
|
|
1
|
+
//! @version @js-joda/locale - 4.1.0+36.0.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)
|
|
@@ -3116,7 +3116,7 @@ var createEntry = function createEntry(text, field) {
|
|
|
3116
3116
|
key: text,
|
|
3117
3117
|
value: field,
|
|
3118
3118
|
toString: function toString() {
|
|
3119
|
-
return text
|
|
3119
|
+
return "".concat(text, "->").concat(field);
|
|
3120
3120
|
}
|
|
3121
3121
|
};
|
|
3122
3122
|
};
|
|
@@ -3681,6 +3681,7 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3681
3681
|
requireNonNull(textStyle, 'textStyle');
|
|
3682
3682
|
requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
|
|
3683
3683
|
this._textStyle = textStyle;
|
|
3684
|
+
this._zoneIdsLocales = {};
|
|
3684
3685
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/likelySubtags.json');
|
|
3685
3686
|
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/metaZones.json');
|
|
3686
3687
|
}
|
|
@@ -3789,11 +3790,15 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3789
3790
|
return true;
|
|
3790
3791
|
}
|
|
3791
3792
|
}, {
|
|
3792
|
-
key: "
|
|
3793
|
-
value: function
|
|
3793
|
+
key: "_resolveZoneIds",
|
|
3794
|
+
value: function _resolveZoneIds(localString) {
|
|
3795
|
+
if (this._zoneIdsLocales[localString] != null) {
|
|
3796
|
+
return this._zoneIdsLocales[localString];
|
|
3797
|
+
}
|
|
3798
|
+
|
|
3794
3799
|
var ids = {};
|
|
3795
|
-
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(
|
|
3796
|
-
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(
|
|
3800
|
+
Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(localString, "/timeZoneNames.json"));
|
|
3801
|
+
var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
|
|
3797
3802
|
var _iteratorNormalCompletion = true;
|
|
3798
3803
|
var _didIteratorError = false;
|
|
3799
3804
|
var _iteratorError = undefined;
|
|
@@ -3838,17 +3843,39 @@ var CldrZoneTextPrinterParser = function () {
|
|
|
3838
3843
|
}
|
|
3839
3844
|
|
|
3840
3845
|
var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
|
|
3846
|
+
this._zoneIdsLocales[localString] = {
|
|
3847
|
+
ids: ids,
|
|
3848
|
+
sortedKeys: sortedKeys
|
|
3849
|
+
};
|
|
3850
|
+
return this._zoneIdsLocales[localString];
|
|
3851
|
+
}
|
|
3852
|
+
}, {
|
|
3853
|
+
key: "parse",
|
|
3854
|
+
value: function parse(context, text, position) {
|
|
3855
|
+
for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
|
|
3856
|
+
var name = _arr[_i];
|
|
3857
|
+
|
|
3858
|
+
if (context.subSequenceEquals(text, position, name, 0, name.length)) {
|
|
3859
|
+
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
|
|
3860
|
+
return position + name.length;
|
|
3861
|
+
}
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
|
|
3865
|
+
ids = _this$_resolveZoneIds.ids,
|
|
3866
|
+
sortedKeys = _this$_resolveZoneIds.sortedKeys;
|
|
3867
|
+
|
|
3841
3868
|
var _iteratorNormalCompletion2 = true;
|
|
3842
3869
|
var _didIteratorError2 = false;
|
|
3843
3870
|
var _iteratorError2 = undefined;
|
|
3844
3871
|
|
|
3845
3872
|
try {
|
|
3846
3873
|
for (var _iterator2 = sortedKeys[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
3847
|
-
var
|
|
3874
|
+
var _name = _step2.value;
|
|
3848
3875
|
|
|
3849
|
-
if (context.subSequenceEquals(text, position,
|
|
3850
|
-
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[
|
|
3851
|
-
return position +
|
|
3876
|
+
if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
|
|
3877
|
+
context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
|
|
3878
|
+
return position + _name.length;
|
|
3852
3879
|
}
|
|
3853
3880
|
}
|
|
3854
3881
|
} catch (err) {
|
|
@@ -4946,7 +4973,7 @@ var ComputedDayOfField = function () {
|
|
|
4946
4973
|
}, {
|
|
4947
4974
|
key: "toString",
|
|
4948
4975
|
value: function toString() {
|
|
4949
|
-
return this._name
|
|
4976
|
+
return "".concat(this._name, "[").concat(this._weekDef.toString(), "]");
|
|
4950
4977
|
}
|
|
4951
4978
|
}], [{
|
|
4952
4979
|
key: "_computeWeek",
|
|
@@ -5087,7 +5114,7 @@ var WeekFields = function () {
|
|
|
5087
5114
|
}, {
|
|
5088
5115
|
key: "toString",
|
|
5089
5116
|
value: function toString() {
|
|
5090
|
-
return
|
|
5117
|
+
return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
|
|
5091
5118
|
}
|
|
5092
5119
|
}]);
|
|
5093
5120
|
|
|
@@ -5120,7 +5147,7 @@ function _init() {
|
|
|
5120
5147
|
* that cldr-data is installed in parallel!
|
|
5121
5148
|
*/
|
|
5122
5149
|
module.exports = function (cldrPath) {
|
|
5123
|
-
return __webpack_require__("./node_modules/cldr-data sync recursive ^\\.\\/.*$")(
|
|
5150
|
+
return __webpack_require__("./node_modules/cldr-data sync recursive ^\\.\\/.*$")(`./${ cldrPath}`);
|
|
5124
5151
|
};
|
|
5125
5152
|
|
|
5126
5153
|
|