@js-joda/timezone 2.11.0 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -1
- package/dist/js-joda-timezone-10-year-range.esm.js +1339 -0
- package/dist/js-joda-timezone-10-year-range.esm.js.map +1 -0
- package/dist/js-joda-timezone-10-year-range.js +1340 -690
- package/dist/js-joda-timezone-10-year-range.js.map +1 -1
- package/dist/js-joda-timezone-10-year-range.min.js +5 -1
- package/dist/js-joda-timezone-1970-2030.esm.js +1339 -0
- package/dist/js-joda-timezone-1970-2030.esm.js.map +1 -0
- package/dist/js-joda-timezone-1970-2030.js +1340 -690
- package/dist/js-joda-timezone-1970-2030.js.map +1 -1
- package/dist/js-joda-timezone-1970-2030.min.js +5 -1
- package/dist/js-joda-timezone-2012-2022.esm.js +1339 -0
- package/dist/js-joda-timezone-2012-2022.esm.js.map +1 -0
- package/dist/js-joda-timezone-2012-2022.js +1340 -690
- package/dist/js-joda-timezone-2012-2022.js.map +1 -1
- package/dist/js-joda-timezone-2012-2022.min.js +5 -1
- package/dist/js-joda-timezone-empty.esm.js +483 -0
- package/dist/js-joda-timezone-empty.esm.js.map +1 -0
- package/dist/js-joda-timezone-empty.js +391 -565
- package/dist/js-joda-timezone-empty.js.map +1 -1
- package/dist/js-joda-timezone-empty.min.js +5 -1
- package/dist/js-joda-timezone.esm.js +1339 -0
- package/dist/js-joda-timezone.esm.js.map +1 -0
- package/dist/js-joda-timezone.js +1340 -690
- package/dist/js-joda-timezone.js.map +1 -1
- package/dist/js-joda-timezone.min.js +5 -1
- package/package.json +4 -4
- package/src/license-preamble.js +0 -2
|
@@ -1,663 +1,489 @@
|
|
|
1
|
-
//! @version @js-joda/timezone-2.
|
|
1
|
+
//! @version @js-joda/timezone - 2.12.1
|
|
2
2
|
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
3
|
+
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
3
4
|
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
5
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
6
|
-
module.exports = factory(require("@js-joda/core"));
|
|
7
|
-
else if(typeof define === 'function' && define.amd)
|
|
8
|
-
define(["@js-joda/core"], factory);
|
|
9
|
-
else if(typeof exports === 'object')
|
|
10
|
-
exports["JSJodaTimezone"] = factory(require("@js-joda/core"));
|
|
11
|
-
else
|
|
12
|
-
root["JSJodaTimezone"] = factory(root["JSJoda"]);
|
|
13
|
-
})(this, function(__WEBPACK_EXTERNAL_MODULE__js_joda_core__) {
|
|
14
|
-
return /******/ (function(modules) { // webpackBootstrap
|
|
15
|
-
/******/ // The module cache
|
|
16
|
-
/******/ var installedModules = {};
|
|
17
|
-
/******/
|
|
18
|
-
/******/ // The require function
|
|
19
|
-
/******/ function __webpack_require__(moduleId) {
|
|
20
|
-
/******/
|
|
21
|
-
/******/ // Check if module is in cache
|
|
22
|
-
/******/ if(installedModules[moduleId]) {
|
|
23
|
-
/******/ return installedModules[moduleId].exports;
|
|
24
|
-
/******/ }
|
|
25
|
-
/******/ // Create a new module (and put it into the cache)
|
|
26
|
-
/******/ var module = installedModules[moduleId] = {
|
|
27
|
-
/******/ i: moduleId,
|
|
28
|
-
/******/ l: false,
|
|
29
|
-
/******/ exports: {}
|
|
30
|
-
/******/ };
|
|
31
|
-
/******/
|
|
32
|
-
/******/ // Execute the module function
|
|
33
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
34
|
-
/******/
|
|
35
|
-
/******/ // Flag the module as loaded
|
|
36
|
-
/******/ module.l = true;
|
|
37
|
-
/******/
|
|
38
|
-
/******/ // Return the exports of the module
|
|
39
|
-
/******/ return module.exports;
|
|
40
|
-
/******/ }
|
|
41
|
-
/******/
|
|
42
|
-
/******/
|
|
43
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
44
|
-
/******/ __webpack_require__.m = modules;
|
|
45
|
-
/******/
|
|
46
|
-
/******/ // expose the module cache
|
|
47
|
-
/******/ __webpack_require__.c = installedModules;
|
|
48
|
-
/******/
|
|
49
|
-
/******/ // define getter function for harmony exports
|
|
50
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
51
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
52
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
53
|
-
/******/ }
|
|
54
|
-
/******/ };
|
|
55
|
-
/******/
|
|
56
|
-
/******/ // define __esModule on exports
|
|
57
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
58
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
59
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
60
|
-
/******/ }
|
|
61
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
62
|
-
/******/ };
|
|
63
|
-
/******/
|
|
64
|
-
/******/ // create a fake namespace object
|
|
65
|
-
/******/ // mode & 1: value is a module id, require it
|
|
66
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
67
|
-
/******/ // mode & 4: return value when already ns object
|
|
68
|
-
/******/ // mode & 8|1: behave like require
|
|
69
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
70
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
71
|
-
/******/ if(mode & 8) return value;
|
|
72
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
73
|
-
/******/ var ns = Object.create(null);
|
|
74
|
-
/******/ __webpack_require__.r(ns);
|
|
75
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
76
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
77
|
-
/******/ return ns;
|
|
78
|
-
/******/ };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
81
|
-
/******/ __webpack_require__.n = function(module) {
|
|
82
|
-
/******/ var getter = module && module.__esModule ?
|
|
83
|
-
/******/ function getDefault() { return module['default']; } :
|
|
84
|
-
/******/ function getModuleExports() { return module; };
|
|
85
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
86
|
-
/******/ return getter;
|
|
87
|
-
/******/ };
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
90
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
91
|
-
/******/
|
|
92
|
-
/******/ // __webpack_public_path__
|
|
93
|
-
/******/ __webpack_require__.p = "";
|
|
94
|
-
/******/
|
|
95
|
-
/******/
|
|
96
|
-
/******/ // Load entry module and return exports
|
|
97
|
-
/******/ return __webpack_require__(__webpack_require__.s = "./src/js-joda-timezone-empty.js");
|
|
98
|
-
/******/ })
|
|
99
|
-
/************************************************************************/
|
|
100
|
-
/******/ ({
|
|
101
|
-
|
|
102
|
-
/***/ "./src/MomentZoneRules.js":
|
|
103
|
-
/*!********************************!*\
|
|
104
|
-
!*** ./src/MomentZoneRules.js ***!
|
|
105
|
-
\********************************/
|
|
106
|
-
/*! exports provided: MomentZoneRules */
|
|
107
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
108
|
-
|
|
109
|
-
"use strict";
|
|
110
|
-
__webpack_require__.r(__webpack_exports__);
|
|
111
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MomentZoneRules", function() { return MomentZoneRules; });
|
|
112
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
113
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
114
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
115
|
-
|
|
116
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
117
|
-
|
|
118
|
-
/*
|
|
119
|
-
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
120
|
-
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
121
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
var MomentZoneRules = function (_ZoneRules) {
|
|
125
|
-
_inheritsLoose(MomentZoneRules, _ZoneRules);
|
|
126
|
-
|
|
127
|
-
function MomentZoneRules(tzdbInfo) {
|
|
128
|
-
var _this;
|
|
129
|
-
|
|
130
|
-
_this = _ZoneRules.call(this) || this;
|
|
131
|
-
_this._tzdbInfo = tzdbInfo;
|
|
132
|
-
_this._ldtUntils = new LDTUntils(_this._tzdbInfo.untils, _this._tzdbInfo.offsets);
|
|
133
|
-
return _this;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
var _proto = MomentZoneRules.prototype;
|
|
137
|
-
|
|
138
|
-
_proto.isFixedOffset = function isFixedOffset() {
|
|
139
|
-
return this._tzdbInfo.offsets.length === 1;
|
|
140
|
-
};
|
|
141
5
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
6
|
+
(function (global, factory) {
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('@js-joda/core')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['@js-joda/core'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JSJoda));
|
|
10
|
+
})(this, (function (core) { 'use strict';
|
|
146
11
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
};
|
|
12
|
+
function _inheritsLoose(subClass, superClass) {
|
|
13
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
14
|
+
subClass.prototype.constructor = subClass;
|
|
151
15
|
|
|
152
|
-
|
|
153
|
-
|
|
16
|
+
_setPrototypeOf(subClass, superClass);
|
|
17
|
+
}
|
|
154
18
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
19
|
+
function _setPrototypeOf(o, p) {
|
|
20
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
21
|
+
o.__proto__ = p;
|
|
22
|
+
return o;
|
|
23
|
+
};
|
|
158
24
|
|
|
159
|
-
return
|
|
160
|
-
}
|
|
25
|
+
return _setPrototypeOf(o, p);
|
|
26
|
+
}
|
|
161
27
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
29
|
+
if (!o) return;
|
|
30
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
31
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
32
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
33
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
34
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
35
|
+
}
|
|
165
36
|
|
|
166
|
-
|
|
167
|
-
|
|
37
|
+
function _arrayLikeToArray(arr, len) {
|
|
38
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
168
39
|
|
|
169
|
-
|
|
40
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
170
41
|
|
|
171
|
-
|
|
172
|
-
|
|
42
|
+
return arr2;
|
|
43
|
+
}
|
|
173
44
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
45
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
46
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
47
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
48
|
+
|
|
49
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
50
|
+
if (it) o = it;
|
|
51
|
+
var i = 0;
|
|
52
|
+
return function () {
|
|
53
|
+
if (i >= o.length) return {
|
|
54
|
+
done: true
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
done: false,
|
|
58
|
+
value: o[i++]
|
|
59
|
+
};
|
|
60
|
+
};
|
|
179
61
|
}
|
|
180
62
|
|
|
181
|
-
|
|
182
|
-
}
|
|
63
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
64
|
+
}
|
|
183
65
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
66
|
+
var MomentZoneRules = function (_ZoneRules) {
|
|
67
|
+
_inheritsLoose(MomentZoneRules, _ZoneRules);
|
|
187
68
|
|
|
188
|
-
|
|
189
|
-
|
|
69
|
+
function MomentZoneRules(tzdbInfo) {
|
|
70
|
+
var _this;
|
|
190
71
|
|
|
191
|
-
|
|
192
|
-
|
|
72
|
+
_this = _ZoneRules.call(this) || this;
|
|
73
|
+
_this._tzdbInfo = tzdbInfo;
|
|
74
|
+
_this._ldtUntils = new LDTUntils(_this._tzdbInfo.untils, _this._tzdbInfo.offsets);
|
|
75
|
+
return _this;
|
|
193
76
|
}
|
|
194
77
|
|
|
195
|
-
|
|
196
|
-
};
|
|
78
|
+
var _proto = MomentZoneRules.prototype;
|
|
197
79
|
|
|
198
|
-
|
|
199
|
-
|
|
80
|
+
_proto.isFixedOffset = function isFixedOffset() {
|
|
81
|
+
return this._tzdbInfo.offsets.length === 1;
|
|
82
|
+
};
|
|
200
83
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
84
|
+
_proto.offsetOfInstant = function offsetOfInstant(instant) {
|
|
85
|
+
var epochMilli = instant.toEpochMilli();
|
|
86
|
+
return this.offsetOfEpochMilli(epochMilli);
|
|
87
|
+
};
|
|
204
88
|
|
|
205
|
-
|
|
206
|
-
|
|
89
|
+
_proto.offsetOfEpochMilli = function offsetOfEpochMilli(epochMilli) {
|
|
90
|
+
var index = binarySearch(this._tzdbInfo.untils, epochMilli);
|
|
91
|
+
return core.ZoneOffset.ofTotalSeconds(this._offsetByIndexInSeconds(index));
|
|
92
|
+
};
|
|
207
93
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
};
|
|
94
|
+
_proto.offsetOfLocalDateTime = function offsetOfLocalDateTime(localDateTime) {
|
|
95
|
+
var info = this._offsetInfo(localDateTime);
|
|
211
96
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
97
|
+
if (info instanceof core.ZoneOffsetTransition) {
|
|
98
|
+
return info.offsetBefore();
|
|
99
|
+
}
|
|
215
100
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
};
|
|
101
|
+
return info;
|
|
102
|
+
};
|
|
219
103
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
});
|
|
224
|
-
};
|
|
104
|
+
_proto._offsetInfo = function _offsetInfo(localDateTime) {
|
|
105
|
+
var index = ldtBinarySearch(this._ldtUntils, localDateTime);
|
|
106
|
+
var offsetIndex = index >> 1;
|
|
225
107
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
};
|
|
108
|
+
if (index % 2 === 1) {
|
|
109
|
+
var ldtBefore = this._ldtUntils.get(Math.max(index - 1, 0));
|
|
229
110
|
|
|
230
|
-
|
|
231
|
-
notSupported('ZoneRules.previousTransition');
|
|
232
|
-
};
|
|
111
|
+
var ldtAfter = this._ldtUntils.get(Math.min(index, this._ldtUntils.size - 1));
|
|
233
112
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
};
|
|
113
|
+
var offsetBefore = core.ZoneOffset.ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
|
|
114
|
+
var offsetAfter = core.ZoneOffset.ofTotalSeconds(this._offsetByIndexInSeconds(Math.min(offsetIndex + 1, this._tzdbInfo.offsets.length - 1)));
|
|
237
115
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
116
|
+
if (offsetBefore.compareTo(offsetAfter) > 0) {
|
|
117
|
+
return core.ZoneOffsetTransition.of(ldtBefore, offsetBefore, offsetAfter);
|
|
118
|
+
} else {
|
|
119
|
+
return core.ZoneOffsetTransition.of(ldtAfter, offsetBefore, offsetAfter);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
241
122
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
return true;
|
|
245
|
-
}
|
|
123
|
+
return core.ZoneOffset.ofTotalSeconds(this._offsetByIndexInSeconds(offsetIndex));
|
|
124
|
+
};
|
|
246
125
|
|
|
247
|
-
|
|
248
|
-
return this._tzdbInfo
|
|
249
|
-
}
|
|
126
|
+
_proto._offsetByIndexInSeconds = function _offsetByIndexInSeconds(index) {
|
|
127
|
+
return -offsetInSeconds(this._tzdbInfo.offsets[index]);
|
|
128
|
+
};
|
|
250
129
|
|
|
251
|
-
|
|
252
|
-
|
|
130
|
+
_proto.validOffsets = function validOffsets(localDateTime) {
|
|
131
|
+
var info = this._offsetInfo(localDateTime);
|
|
253
132
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
133
|
+
if (info instanceof core.ZoneOffsetTransition) {
|
|
134
|
+
return info.validOffsets();
|
|
135
|
+
}
|
|
257
136
|
|
|
258
|
-
|
|
259
|
-
}
|
|
137
|
+
return [info];
|
|
138
|
+
};
|
|
260
139
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
this._tzdbUntils = _tzdbUntils;
|
|
264
|
-
this._tzdbOffsets = tzdbOffsets;
|
|
265
|
-
this._ldtUntils = [];
|
|
266
|
-
this.size = this._tzdbUntils.length * 2;
|
|
267
|
-
}
|
|
140
|
+
_proto.transition = function transition(localDateTime) {
|
|
141
|
+
var info = this._offsetInfo(localDateTime);
|
|
268
142
|
|
|
269
|
-
|
|
143
|
+
if (info instanceof core.ZoneOffsetTransition) {
|
|
144
|
+
return info;
|
|
145
|
+
}
|
|
270
146
|
|
|
271
|
-
|
|
272
|
-
|
|
147
|
+
return null;
|
|
148
|
+
};
|
|
273
149
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
150
|
+
_proto.standardOffset = function standardOffset(instant) {
|
|
151
|
+
notSupported('ZoneRules.standardOffset');
|
|
152
|
+
};
|
|
277
153
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
var ldt1 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone1);
|
|
282
|
-
var nextIndex = Math.min(index + 1, this._tzdbOffsets.length - 1);
|
|
283
|
-
var offset2 = offsetInSeconds(this._tzdbOffsets[nextIndex]);
|
|
284
|
-
var zone2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"].ofTotalSeconds(-offset2);
|
|
285
|
-
var ldt2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDateTime"].ofInstant(instant, zone2);
|
|
286
|
-
|
|
287
|
-
if (offset1 > offset2) {
|
|
288
|
-
return [ldt1, ldt2];
|
|
289
|
-
} else {
|
|
290
|
-
return [ldt2, ldt1];
|
|
291
|
-
}
|
|
292
|
-
};
|
|
154
|
+
_proto.daylightSavings = function daylightSavings(instant) {
|
|
155
|
+
notSupported('ZoneRules.daylightSavings');
|
|
156
|
+
};
|
|
293
157
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
158
|
+
_proto.isDaylightSavings = function isDaylightSavings(instant) {
|
|
159
|
+
notSupported('ZoneRules.isDaylightSavings');
|
|
160
|
+
};
|
|
298
161
|
|
|
299
|
-
|
|
300
|
-
|
|
162
|
+
_proto.isValidOffset = function isValidOffset(localDateTime, offset) {
|
|
163
|
+
return this.validOffsets(localDateTime).some(function (o) {
|
|
164
|
+
return o.equals(offset);
|
|
165
|
+
});
|
|
166
|
+
};
|
|
301
167
|
|
|
302
|
-
|
|
303
|
-
|
|
168
|
+
_proto.nextTransition = function nextTransition(instant) {
|
|
169
|
+
notSupported('ZoneRules.nextTransition');
|
|
170
|
+
};
|
|
304
171
|
|
|
305
|
-
|
|
306
|
-
|
|
172
|
+
_proto.previousTransition = function previousTransition(instant) {
|
|
173
|
+
notSupported('ZoneRules.previousTransition');
|
|
174
|
+
};
|
|
307
175
|
|
|
308
|
-
|
|
309
|
-
|
|
176
|
+
_proto.transitions = function transitions() {
|
|
177
|
+
notSupported('ZoneRules.transitions');
|
|
178
|
+
};
|
|
310
179
|
|
|
311
|
-
function
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
mid;
|
|
180
|
+
_proto.transitionRules = function transitionRules() {
|
|
181
|
+
notSupported('ZoneRules.transitionRules');
|
|
182
|
+
};
|
|
315
183
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
hi = mid;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
184
|
+
_proto.equals = function equals(other) {
|
|
185
|
+
if (this === other) {
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
323
188
|
|
|
324
|
-
|
|
325
|
-
|
|
189
|
+
if (other instanceof MomentZoneRules) {
|
|
190
|
+
return this._tzdbInfo === other._tzdbInfo;
|
|
191
|
+
}
|
|
326
192
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
193
|
+
return false;
|
|
194
|
+
};
|
|
330
195
|
|
|
331
|
-
function
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
} else {
|
|
335
|
-
return Math.floor(r);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
196
|
+
_proto.toString = function toString() {
|
|
197
|
+
return this._tzdbInfo.name;
|
|
198
|
+
};
|
|
338
199
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
lo = -1,
|
|
342
|
-
mid;
|
|
200
|
+
return MomentZoneRules;
|
|
201
|
+
}(core.ZoneRules);
|
|
343
202
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
203
|
+
var LDTUntils = function () {
|
|
204
|
+
function LDTUntils(_tzdbUntils, tzdbOffsets) {
|
|
205
|
+
this._tzdbUntils = _tzdbUntils;
|
|
206
|
+
this._tzdbOffsets = tzdbOffsets;
|
|
207
|
+
this._ldtUntils = [];
|
|
208
|
+
this.size = this._tzdbUntils.length * 2;
|
|
349
209
|
}
|
|
350
|
-
}
|
|
351
210
|
|
|
352
|
-
|
|
353
|
-
}
|
|
211
|
+
var _proto2 = LDTUntils.prototype;
|
|
354
212
|
|
|
355
|
-
function
|
|
356
|
-
|
|
357
|
-
}
|
|
213
|
+
_proto2._generateTupple = function _generateTupple(index) {
|
|
214
|
+
var epochMillis = this._tzdbUntils[index];
|
|
358
215
|
|
|
359
|
-
|
|
216
|
+
if (epochMillis === Infinity) {
|
|
217
|
+
return [core.LocalDateTime.MAX, core.LocalDateTime.MAX];
|
|
218
|
+
}
|
|
360
219
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
220
|
+
var instant = core.Instant.ofEpochMilli(epochMillis);
|
|
221
|
+
var offset1 = offsetInSeconds(this._tzdbOffsets[index]);
|
|
222
|
+
var zone1 = core.ZoneOffset.ofTotalSeconds(-offset1);
|
|
223
|
+
var ldt1 = core.LocalDateTime.ofInstant(instant, zone1);
|
|
224
|
+
var nextIndex = Math.min(index + 1, this._tzdbOffsets.length - 1);
|
|
225
|
+
var offset2 = offsetInSeconds(this._tzdbOffsets[nextIndex]);
|
|
226
|
+
var zone2 = core.ZoneOffset.ofTotalSeconds(-offset2);
|
|
227
|
+
var ldt2 = core.LocalDateTime.ofInstant(instant, zone2);
|
|
228
|
+
|
|
229
|
+
if (offset1 > offset2) {
|
|
230
|
+
return [ldt1, ldt2];
|
|
231
|
+
} else {
|
|
232
|
+
return [ldt2, ldt1];
|
|
233
|
+
}
|
|
234
|
+
};
|
|
367
235
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
373
|
-
/* harmony import */ var _MomentZoneRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MomentZoneRules */ "./src/MomentZoneRules.js");
|
|
374
|
-
/* harmony import */ var _unpack__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unpack */ "./src/unpack.js");
|
|
375
|
-
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."); }
|
|
236
|
+
_proto2._getTupple = function _getTupple(index) {
|
|
237
|
+
if (this._ldtUntils[index] == null) {
|
|
238
|
+
this._ldtUntils[index] = this._generateTupple(index);
|
|
239
|
+
}
|
|
376
240
|
|
|
377
|
-
|
|
241
|
+
return this._ldtUntils[index];
|
|
242
|
+
};
|
|
378
243
|
|
|
379
|
-
|
|
244
|
+
_proto2.get = function get(index) {
|
|
245
|
+
var ldtTupple = this._getTupple(index >> 1);
|
|
380
246
|
|
|
381
|
-
|
|
247
|
+
return ldtTupple[index % 2];
|
|
248
|
+
};
|
|
382
249
|
|
|
383
|
-
|
|
250
|
+
return LDTUntils;
|
|
251
|
+
}();
|
|
384
252
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
*/
|
|
253
|
+
function ldtBinarySearch(array, value) {
|
|
254
|
+
var hi = array.size - 1,
|
|
255
|
+
lo = -1,
|
|
256
|
+
mid;
|
|
390
257
|
|
|
258
|
+
while (hi - lo > 1) {
|
|
259
|
+
if (!value.isBefore(array.get(mid = hi + lo >> 1))) {
|
|
260
|
+
lo = mid;
|
|
261
|
+
} else {
|
|
262
|
+
hi = mid;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
391
265
|
|
|
266
|
+
return hi;
|
|
267
|
+
}
|
|
392
268
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
var zones = {};
|
|
397
|
-
var links = {};
|
|
398
|
-
var MomentZoneRulesProvider = function (_ZoneRulesProvider) {
|
|
399
|
-
_inheritsLoose(MomentZoneRulesProvider, _ZoneRulesProvider);
|
|
269
|
+
function offsetInSeconds(tzdbOffset) {
|
|
270
|
+
return roundDown(+tzdbOffset * 60);
|
|
271
|
+
}
|
|
400
272
|
|
|
401
|
-
function
|
|
402
|
-
|
|
273
|
+
function roundDown(r) {
|
|
274
|
+
if (r < 0) {
|
|
275
|
+
return Math.ceil(r);
|
|
276
|
+
} else {
|
|
277
|
+
return Math.floor(r);
|
|
278
|
+
}
|
|
403
279
|
}
|
|
404
280
|
|
|
405
|
-
|
|
406
|
-
var
|
|
281
|
+
function binarySearch(array, value) {
|
|
282
|
+
var hi = array.length - 1,
|
|
283
|
+
lo = -1,
|
|
284
|
+
mid;
|
|
407
285
|
|
|
408
|
-
|
|
409
|
-
|
|
286
|
+
while (hi - lo > 1) {
|
|
287
|
+
if (array[mid = hi + lo >> 1] <= value) {
|
|
288
|
+
lo = mid;
|
|
289
|
+
} else {
|
|
290
|
+
hi = mid;
|
|
291
|
+
}
|
|
410
292
|
}
|
|
411
293
|
|
|
412
|
-
return
|
|
413
|
-
}
|
|
294
|
+
return hi;
|
|
295
|
+
}
|
|
414
296
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
}
|
|
297
|
+
function notSupported(msg) {
|
|
298
|
+
throw new Error("not supported: " + msg);
|
|
299
|
+
}
|
|
418
300
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
301
|
+
function charCodeToInt(charCode) {
|
|
302
|
+
if (charCode > 96) {
|
|
303
|
+
return charCode - 87;
|
|
304
|
+
} else if (charCode > 64) {
|
|
305
|
+
return charCode - 29;
|
|
306
|
+
}
|
|
422
307
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
};
|
|
308
|
+
return charCode - 48;
|
|
309
|
+
}
|
|
426
310
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
311
|
+
function unpackBase60(string) {
|
|
312
|
+
var i = 0,
|
|
313
|
+
parts = string.split('.'),
|
|
314
|
+
whole = parts[0],
|
|
315
|
+
fractional = parts[1] || '',
|
|
316
|
+
multiplier = 1,
|
|
317
|
+
num,
|
|
318
|
+
out = 0,
|
|
319
|
+
sign = 1;
|
|
320
|
+
|
|
321
|
+
if (string.charCodeAt(0) === 45) {
|
|
322
|
+
i = 1;
|
|
323
|
+
sign = -1;
|
|
324
|
+
}
|
|
430
325
|
|
|
431
|
-
for (
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
AVAILABLE_ZONE_IDS.push(tzdbZoneInfo.name);
|
|
435
|
-
zones[tzdbZoneInfo.name] = tzdbZoneInfo;
|
|
436
|
-
links[tzdbZoneInfo.name] = tzdbZoneInfo.name;
|
|
326
|
+
for (i; i < whole.length; i++) {
|
|
327
|
+
num = charCodeToInt(whole.charCodeAt(i));
|
|
328
|
+
out = 60 * out + num;
|
|
437
329
|
}
|
|
438
330
|
|
|
439
|
-
for (
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
links[link[1]] = link[0];
|
|
331
|
+
for (i = 0; i < fractional.length; i++) {
|
|
332
|
+
multiplier = multiplier / 60;
|
|
333
|
+
num = charCodeToInt(fractional.charCodeAt(i));
|
|
334
|
+
out += num * multiplier;
|
|
444
335
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
return MomentZoneRulesProvider;
|
|
448
|
-
}(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"]);
|
|
449
|
-
|
|
450
|
-
/***/ }),
|
|
451
|
-
|
|
452
|
-
/***/ "./src/auto-plug.js":
|
|
453
|
-
/*!**************************!*\
|
|
454
|
-
!*** ./src/auto-plug.js ***!
|
|
455
|
-
\**************************/
|
|
456
|
-
/*! exports provided: default */
|
|
457
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
458
|
-
|
|
459
|
-
"use strict";
|
|
460
|
-
__webpack_require__.r(__webpack_exports__);
|
|
461
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoPlug; });
|
|
462
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
|
|
463
|
-
/* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
464
|
-
/* harmony import */ var _plug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./plug */ "./src/plug.js");
|
|
465
|
-
/*
|
|
466
|
-
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
467
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
468
|
-
*/
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
function autoPlug() {
|
|
472
|
-
Object(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["use"])(_plug__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/***/ }),
|
|
476
|
-
|
|
477
|
-
/***/ "./src/js-joda-timezone-empty.js":
|
|
478
|
-
/*!***************************************!*\
|
|
479
|
-
!*** ./src/js-joda-timezone-empty.js ***!
|
|
480
|
-
\***************************************/
|
|
481
|
-
/*! no exports provided */
|
|
482
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
483
|
-
|
|
484
|
-
"use strict";
|
|
485
|
-
__webpack_require__.r(__webpack_exports__);
|
|
486
|
-
/* harmony import */ var _auto_plug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./auto-plug */ "./src/auto-plug.js");
|
|
487
|
-
/*
|
|
488
|
-
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
489
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
490
|
-
*/
|
|
491
|
-
|
|
492
|
-
Object(_auto_plug__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
493
|
-
|
|
494
|
-
/***/ }),
|
|
495
|
-
|
|
496
|
-
/***/ "./src/plug.js":
|
|
497
|
-
/*!*********************!*\
|
|
498
|
-
!*** ./src/plug.js ***!
|
|
499
|
-
\*********************/
|
|
500
|
-
/*! exports provided: default */
|
|
501
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
502
|
-
|
|
503
|
-
"use strict";
|
|
504
|
-
__webpack_require__.r(__webpack_exports__);
|
|
505
|
-
/* harmony import */ var _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MomentZoneRulesProvider */ "./src/MomentZoneRulesProvider.js");
|
|
506
|
-
/* harmony import */ var _system_default_zone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./system-default-zone */ "./src/system-default-zone.js");
|
|
507
|
-
/*
|
|
508
|
-
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
509
|
-
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
510
|
-
*/
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
/* harmony default export */ __webpack_exports__["default"] = (function (jsJoda) {
|
|
514
|
-
jsJoda.ZoneRulesProvider.getRules = _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__["MomentZoneRulesProvider"].getRules;
|
|
515
|
-
jsJoda.ZoneRulesProvider.getAvailableZoneIds = _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__["MomentZoneRulesProvider"].getAvailableZoneIds;
|
|
516
|
-
jsJoda.ZoneRulesProvider.getTzdbData = _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__["MomentZoneRulesProvider"].getTzdbData;
|
|
517
|
-
jsJoda.ZoneRulesProvider.loadTzdbData = _MomentZoneRulesProvider__WEBPACK_IMPORTED_MODULE_0__["MomentZoneRulesProvider"].loadTzdbData;
|
|
518
|
-
Object(_system_default_zone__WEBPACK_IMPORTED_MODULE_1__["default"])(jsJoda.ZoneId);
|
|
519
|
-
return jsJoda;
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
/***/ }),
|
|
523
|
-
|
|
524
|
-
/***/ "./src/system-default-zone.js":
|
|
525
|
-
/*!************************************!*\
|
|
526
|
-
!*** ./src/system-default-zone.js ***!
|
|
527
|
-
\************************************/
|
|
528
|
-
/*! exports provided: default */
|
|
529
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
530
|
-
|
|
531
|
-
"use strict";
|
|
532
|
-
__webpack_require__.r(__webpack_exports__);
|
|
533
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return extendSystemDefaultZoneId; });
|
|
534
|
-
function getResolvedZoneId(ZoneId) {
|
|
535
|
-
try {
|
|
536
|
-
var resolvedTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
537
|
-
return ZoneId.of(resolvedTimeZone);
|
|
538
|
-
} catch (err) {}
|
|
539
|
-
|
|
540
|
-
return null;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
function extendSystemDefaultZoneId(ZoneId) {
|
|
544
|
-
var resolvedZoneId = getResolvedZoneId(ZoneId);
|
|
545
|
-
|
|
546
|
-
if (resolvedZoneId == null) {
|
|
547
|
-
return;
|
|
336
|
+
|
|
337
|
+
return out * sign;
|
|
548
338
|
}
|
|
549
339
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
/***/ }),
|
|
556
|
-
|
|
557
|
-
/***/ "./src/unpack.js":
|
|
558
|
-
/*!***********************!*\
|
|
559
|
-
!*** ./src/unpack.js ***!
|
|
560
|
-
\***********************/
|
|
561
|
-
/*! exports provided: unpack */
|
|
562
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
563
|
-
|
|
564
|
-
"use strict";
|
|
565
|
-
__webpack_require__.r(__webpack_exports__);
|
|
566
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unpack", function() { return unpack; });
|
|
567
|
-
function charCodeToInt(charCode) {
|
|
568
|
-
if (charCode > 96) {
|
|
569
|
-
return charCode - 87;
|
|
570
|
-
} else if (charCode > 64) {
|
|
571
|
-
return charCode - 29;
|
|
340
|
+
function arrayToInt(array) {
|
|
341
|
+
for (var i = 0; i < array.length; i++) {
|
|
342
|
+
array[i] = unpackBase60(array[i]);
|
|
343
|
+
}
|
|
572
344
|
}
|
|
573
345
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
whole = parts[0],
|
|
581
|
-
fractional = parts[1] || '',
|
|
582
|
-
multiplier = 1,
|
|
583
|
-
num,
|
|
584
|
-
out = 0,
|
|
585
|
-
sign = 1;
|
|
586
|
-
|
|
587
|
-
if (string.charCodeAt(0) === 45) {
|
|
588
|
-
i = 1;
|
|
589
|
-
sign = -1;
|
|
346
|
+
function intToUntil(array, length) {
|
|
347
|
+
for (var i = 0; i < length; i++) {
|
|
348
|
+
array[i] = Math.round((array[i - 1] || 0) + array[i] * 60000);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
array[length - 1] = Infinity;
|
|
590
352
|
}
|
|
591
353
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
354
|
+
function mapIndices(source, indices) {
|
|
355
|
+
var out = [],
|
|
356
|
+
i;
|
|
357
|
+
|
|
358
|
+
for (i = 0; i < indices.length; i++) {
|
|
359
|
+
out[i] = source[indices[i]];
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return out;
|
|
595
363
|
}
|
|
596
364
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
365
|
+
function unpack(string) {
|
|
366
|
+
var data = string.split('|'),
|
|
367
|
+
offsets = data[2].split(' '),
|
|
368
|
+
indices = data[3].split(''),
|
|
369
|
+
untils = data[4].split(' ');
|
|
370
|
+
arrayToInt(offsets);
|
|
371
|
+
arrayToInt(indices);
|
|
372
|
+
arrayToInt(untils);
|
|
373
|
+
intToUntil(untils, indices.length);
|
|
374
|
+
return {
|
|
375
|
+
name: data[0],
|
|
376
|
+
abbrs: mapIndices(data[1].split(' '), indices),
|
|
377
|
+
offsets: mapIndices(offsets, indices),
|
|
378
|
+
untils: untils,
|
|
379
|
+
population: data[5] | 0
|
|
380
|
+
};
|
|
601
381
|
}
|
|
602
382
|
|
|
603
|
-
|
|
604
|
-
|
|
383
|
+
var TZDB_DATA;
|
|
384
|
+
var TZDB_VERSION;
|
|
385
|
+
var AVAILABLE_ZONE_IDS = [];
|
|
386
|
+
var zones = {};
|
|
387
|
+
var links = {};
|
|
388
|
+
var MomentZoneRulesProvider = function (_ZoneRulesProvider) {
|
|
389
|
+
_inheritsLoose(MomentZoneRulesProvider, _ZoneRulesProvider);
|
|
605
390
|
|
|
606
|
-
function
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
391
|
+
function MomentZoneRulesProvider() {
|
|
392
|
+
return _ZoneRulesProvider.apply(this, arguments) || this;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
MomentZoneRulesProvider.getRules = function getRules(zoneId) {
|
|
396
|
+
var tzdbZoneInfo = zones[links[zoneId]];
|
|
611
397
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
398
|
+
if (tzdbZoneInfo == null) {
|
|
399
|
+
throw new core.DateTimeException("Unknown time-zone ID: " + zoneId);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
return new MomentZoneRules(tzdbZoneInfo);
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
MomentZoneRulesProvider.getAvailableZoneIds = function getAvailableZoneIds() {
|
|
406
|
+
return AVAILABLE_ZONE_IDS;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
MomentZoneRulesProvider.getVersion = function getVersion() {
|
|
410
|
+
return TZDB_VERSION;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
MomentZoneRulesProvider.getTzdbData = function getTzdbData() {
|
|
414
|
+
return TZDB_DATA;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
MomentZoneRulesProvider.loadTzdbData = function loadTzdbData(packedJson) {
|
|
418
|
+
TZDB_DATA = packedJson;
|
|
419
|
+
TZDB_VERSION = packedJson.version;
|
|
420
|
+
|
|
421
|
+
for (var _iterator = _createForOfIteratorHelperLoose(packedJson.zones), _step; !(_step = _iterator()).done;) {
|
|
422
|
+
var packedZoneInfo = _step.value;
|
|
423
|
+
var tzdbZoneInfo = unpack(packedZoneInfo);
|
|
424
|
+
AVAILABLE_ZONE_IDS.push(tzdbZoneInfo.name);
|
|
425
|
+
zones[tzdbZoneInfo.name] = tzdbZoneInfo;
|
|
426
|
+
links[tzdbZoneInfo.name] = tzdbZoneInfo.name;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(packedJson.links), _step2; !(_step2 = _iterator2()).done;) {
|
|
430
|
+
var packedLink = _step2.value;
|
|
431
|
+
var link = packedLink.split('|');
|
|
432
|
+
AVAILABLE_ZONE_IDS.push(link[1]);
|
|
433
|
+
links[link[1]] = link[0];
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
return MomentZoneRulesProvider;
|
|
438
|
+
}(core.ZoneRulesProvider);
|
|
439
|
+
|
|
440
|
+
function getResolvedZoneId(ZoneId) {
|
|
441
|
+
try {
|
|
442
|
+
var resolvedTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
443
|
+
return ZoneId.of(resolvedTimeZone);
|
|
444
|
+
} catch (err) {}
|
|
445
|
+
|
|
446
|
+
return null;
|
|
615
447
|
}
|
|
616
448
|
|
|
617
|
-
|
|
618
|
-
|
|
449
|
+
function extendSystemDefaultZoneId(ZoneId) {
|
|
450
|
+
var resolvedZoneId = getResolvedZoneId(ZoneId);
|
|
451
|
+
|
|
452
|
+
if (resolvedZoneId == null) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
619
455
|
|
|
620
|
-
function
|
|
621
|
-
|
|
622
|
-
|
|
456
|
+
ZoneId.systemDefault = function () {
|
|
457
|
+
return resolvedZoneId;
|
|
458
|
+
};
|
|
459
|
+
}
|
|
623
460
|
|
|
624
|
-
|
|
625
|
-
|
|
461
|
+
/*
|
|
462
|
+
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
463
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
464
|
+
*/
|
|
465
|
+
function plug (jsJoda) {
|
|
466
|
+
jsJoda.ZoneRulesProvider.getRules = MomentZoneRulesProvider.getRules;
|
|
467
|
+
jsJoda.ZoneRulesProvider.getAvailableZoneIds = MomentZoneRulesProvider.getAvailableZoneIds;
|
|
468
|
+
jsJoda.ZoneRulesProvider.getTzdbData = MomentZoneRulesProvider.getTzdbData;
|
|
469
|
+
jsJoda.ZoneRulesProvider.loadTzdbData = MomentZoneRulesProvider.loadTzdbData;
|
|
470
|
+
extendSystemDefaultZoneId(jsJoda.ZoneId);
|
|
471
|
+
return jsJoda;
|
|
626
472
|
}
|
|
627
473
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
untils: untils,
|
|
645
|
-
population: data[5] | 0
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
/***/ }),
|
|
650
|
-
|
|
651
|
-
/***/ "@js-joda/core":
|
|
652
|
-
/*!***************************************************************************************************************!*\
|
|
653
|
-
!*** external {"amd":"@js-joda/core","commonjs":"@js-joda/core","commonjs2":"@js-joda/core","root":"JSJoda"} ***!
|
|
654
|
-
\***************************************************************************************************************/
|
|
655
|
-
/*! no static exports found */
|
|
656
|
-
/***/ (function(module, exports) {
|
|
657
|
-
|
|
658
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__js_joda_core__;
|
|
659
|
-
|
|
660
|
-
/***/ })
|
|
661
|
-
|
|
662
|
-
/******/ });
|
|
663
|
-
});
|
|
474
|
+
/*
|
|
475
|
+
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
476
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
477
|
+
*/
|
|
478
|
+
function autoPlug() {
|
|
479
|
+
core.use(plug);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/*
|
|
483
|
+
* @copyright (c) 2016-present, Philipp Thürwächter, Pattrick Hüper
|
|
484
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
485
|
+
*/
|
|
486
|
+
autoPlug();
|
|
487
|
+
|
|
488
|
+
}));
|
|
489
|
+
//# sourceMappingURL=js-joda-timezone-empty.js.map
|