@ui5/webcomponents-localization 2.20.1 → 2.20.2
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 +8 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/generated/assets/cldr/Unicode-Data-Files-LICENSE.txt +36 -24
- package/dist/generated/assets/cldr/ar.json +624 -354
- package/dist/generated/assets/cldr/ar_EG.json +624 -354
- package/dist/generated/assets/cldr/ar_SA.json +625 -355
- package/dist/generated/assets/cldr/bg.json +339 -215
- package/dist/generated/assets/cldr/ca.json +633 -509
- package/dist/generated/assets/cldr/cnr.json +960 -653
- package/dist/generated/assets/cldr/cs.json +343 -531
- package/dist/generated/assets/cldr/cy.json +684 -1050
- package/dist/generated/assets/cldr/da.json +354 -231
- package/dist/generated/assets/cldr/de.json +458 -330
- package/dist/generated/assets/cldr/de_AT.json +459 -331
- package/dist/generated/assets/cldr/de_CH.json +522 -386
- package/dist/generated/assets/cldr/el.json +317 -152
- package/dist/generated/assets/cldr/el_CY.json +317 -152
- package/dist/generated/assets/cldr/en.json +606 -253
- package/dist/generated/assets/cldr/en_AU.json +830 -376
- package/dist/generated/assets/cldr/en_GB.json +696 -251
- package/dist/generated/assets/cldr/en_HK.json +544 -203
- package/dist/generated/assets/cldr/en_IE.json +533 -192
- package/dist/generated/assets/cldr/en_IN.json +820 -296
- package/dist/generated/assets/cldr/en_NZ.json +534 -193
- package/dist/generated/assets/cldr/en_PG.json +509 -168
- package/dist/generated/assets/cldr/en_SG.json +526 -185
- package/dist/generated/assets/cldr/en_ZA.json +529 -186
- package/dist/generated/assets/cldr/es.json +355 -230
- package/dist/generated/assets/cldr/es_AR.json +444 -288
- package/dist/generated/assets/cldr/es_BO.json +419 -264
- package/dist/generated/assets/cldr/es_CL.json +455 -300
- package/dist/generated/assets/cldr/es_CO.json +412 -257
- package/dist/generated/assets/cldr/es_MX.json +515 -352
- package/dist/generated/assets/cldr/es_PE.json +397 -234
- package/dist/generated/assets/cldr/es_UY.json +424 -269
- package/dist/generated/assets/cldr/es_VE.json +398 -243
- package/dist/generated/assets/cldr/et.json +390 -233
- package/dist/generated/assets/cldr/fa.json +510 -271
- package/dist/generated/assets/cldr/fi.json +497 -251
- package/dist/generated/assets/cldr/fr.json +339 -106
- package/dist/generated/assets/cldr/fr_BE.json +341 -108
- package/dist/generated/assets/cldr/fr_CA.json +652 -397
- package/dist/generated/assets/cldr/fr_CH.json +342 -109
- package/dist/generated/assets/cldr/fr_LU.json +339 -106
- package/dist/generated/assets/cldr/he.json +726 -904
- package/dist/generated/assets/cldr/hi.json +529 -288
- package/dist/generated/assets/cldr/hr.json +392 -383
- package/dist/generated/assets/cldr/hu.json +459 -335
- package/dist/generated/assets/cldr/id.json +379 -128
- package/dist/generated/assets/cldr/it.json +420 -301
- package/dist/generated/assets/cldr/it_CH.json +426 -307
- package/dist/generated/assets/cldr/ja.json +332 -74
- package/dist/generated/assets/cldr/kk.json +540 -240
- package/dist/generated/assets/cldr/ko.json +371 -115
- package/dist/generated/assets/cldr/lt.json +428 -545
- package/dist/generated/assets/cldr/lv.json +415 -413
- package/dist/generated/assets/cldr/mk.json +691 -559
- package/dist/generated/assets/cldr/ms.json +395 -136
- package/dist/generated/assets/cldr/nb.json +355 -234
- package/dist/generated/assets/cldr/nl.json +357 -251
- package/dist/generated/assets/cldr/nl_BE.json +428 -322
- package/dist/generated/assets/cldr/pl.json +333 -459
- package/dist/generated/assets/cldr/pt.json +419 -298
- package/dist/generated/assets/cldr/pt_PT.json +362 -231
- package/dist/generated/assets/cldr/ro.json +369 -397
- package/dist/generated/assets/cldr/ru.json +599 -368
- package/dist/generated/assets/cldr/ru_UA.json +598 -367
- package/dist/generated/assets/cldr/sk.json +343 -517
- package/dist/generated/assets/cldr/sl.json +477 -640
- package/dist/generated/assets/cldr/sr.json +478 -531
- package/dist/generated/assets/cldr/sr_Latn.json +631 -684
- package/dist/generated/assets/cldr/sv.json +395 -258
- package/dist/generated/assets/cldr/th.json +452 -199
- package/dist/generated/assets/cldr/tr.json +391 -238
- package/dist/generated/assets/cldr/uk.json +696 -342
- package/dist/generated/assets/cldr/vi.json +836 -487
- package/dist/generated/assets/cldr/zh_CN.json +358 -104
- package/dist/generated/assets/cldr/zh_HK.json +366 -113
- package/dist/generated/assets/cldr/zh_SG.json +371 -118
- package/dist/generated/assets/cldr/zh_TW.json +480 -238
- package/dist/sap/base/Event.js +2 -2
- package/dist/sap/base/Eventing.js +4 -3
- package/dist/sap/base/assert.js +1 -1
- package/dist/sap/base/config/MemoryConfigurationProvider.js +1 -1
- package/dist/sap/base/future.js +12 -0
- package/dist/sap/base/i18n/Formatting.d.ts +5 -0
- package/dist/sap/base/i18n/Formatting.js +7 -0
- package/dist/sap/base/i18n/Formatting.js.map +1 -1
- package/dist/sap/base/i18n/LanguageTag.js +18 -12
- package/dist/sap/base/i18n/Localization.d.ts +3 -0
- package/dist/sap/base/i18n/Localization.js +5 -0
- package/dist/sap/base/i18n/Localization.js.map +1 -1
- package/dist/sap/base/i18n/ResourceBundle.js +20 -0
- package/dist/sap/base/i18n/date/CalendarType.js +9 -8
- package/dist/sap/base/i18n/date/CalendarWeekNumbering.js +9 -8
- package/dist/sap/base/i18n/date/TimezoneUtils.js +170 -18
- package/dist/sap/base/i18n/date/_EnumHelper.js +37 -0
- package/dist/sap/base/strings/camelize.js +1 -1
- package/dist/sap/base/strings/formatMessage.js +6 -1
- package/dist/sap/base/util/Properties.js +12 -0
- package/dist/sap/base/util/Version.js +19 -13
- package/dist/sap/base/util/_merge.js +1 -1
- package/dist/sap/base/util/array/uniqueSort.js +1 -1
- package/dist/sap/base/util/deepClone.js +2 -2
- package/dist/sap/base/util/deepEqual.js +1 -1
- package/dist/sap/base/util/deepExtend.js +60 -0
- package/dist/sap/base/util/extend.js +1 -1
- package/dist/sap/base/util/fetch.js +8 -0
- package/dist/sap/base/util/isEmptyObject.js +1 -1
- package/dist/sap/base/util/isPlainObject.js +1 -1
- package/dist/sap/base/util/merge.js +57 -0
- package/dist/sap/base/util/mixedFetch.js +3 -0
- package/dist/sap/base/util/now.js +7 -13
- package/dist/sap/base/util/uid.js +1 -1
- package/dist/sap/ui/Device.js +27 -0
- package/dist/sap/ui/Global.js +1 -0
- package/dist/sap/ui/VersionInfo.js +14 -0
- package/dist/sap/ui/base/DataType.js +63 -12
- package/dist/sap/ui/base/DesignTime.js +11 -0
- package/dist/sap/ui/base/EventProvider.js +21 -0
- package/dist/sap/ui/base/Metadata.js +45 -10
- package/dist/sap/ui/base/Object.js +2 -2
- package/dist/sap/ui/base/OwnStatics.js +6 -0
- package/dist/sap/ui/base/SyncPromise.js +98 -0
- package/dist/sap/ui/core/AnimationMode.js +42 -0
- package/dist/sap/ui/core/CalendarType.js +2 -2
- package/dist/sap/ui/core/ControlBehavior.js +11 -0
- package/dist/sap/ui/core/Lib.js +41 -0
- package/dist/sap/ui/core/Locale.js +9 -9
- package/dist/sap/ui/core/LocaleData.js +498 -333
- package/dist/sap/ui/core/Theming.js +25 -525
- package/dist/sap/ui/core/_UrlResolver.js +11 -0
- package/dist/sap/ui/core/date/Buddhist.js +2 -2
- package/dist/sap/ui/core/date/CalendarUtils.js +14 -12
- package/dist/sap/ui/core/date/CalendarWeekNumbering.js +2 -2
- package/dist/sap/ui/core/date/Gregorian.js +2 -2
- package/dist/sap/ui/core/date/Islamic.js +2 -2
- package/dist/sap/ui/core/date/Japanese.js +2 -2
- package/dist/sap/ui/core/date/Persian.js +2 -2
- package/dist/sap/ui/core/date/UI5Date.js +80 -32
- package/dist/sap/ui/core/date/UniversalDate.js +83 -101
- package/dist/sap/ui/core/format/DateFormat.js +70 -73
- package/dist/sap/ui/core/format/FormatUtils.js +30 -0
- package/dist/sap/ui/core/format/NumberFormat.js +917 -588
- package/dist/sap/ui/core/format/TimezoneUtil.js +80 -11
- package/dist/sap/ui/core/getCompatibilityVersion.js +7 -0
- package/dist/sap/ui/core/theming/ThemeHelper.js +14 -0
- package/dist/sap/ui/security/Security.js +12 -0
- package/dist/sap/ui/util/XMLHelper.js +11 -0
- package/dist/sap/ui/util/_URL.js +1 -0
- package/dist/ui5loader-autoconfig.js +1 -0
- package/package.json +5 -5
- package/used-modules.txt +5 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2026 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
6
|
// Provides class sap.ui.core.date.UniversalDate
|
|
7
|
+
import Formatting from "../../../base/i18n/Formatting.js";
|
|
8
|
+
import CalendarWeekNumbering from "../../../base/i18n/date/CalendarWeekNumbering.js";
|
|
7
9
|
import BaseObject from "../../base/Object.js";
|
|
8
|
-
import
|
|
10
|
+
import Locale from "../Locale.js";
|
|
9
11
|
import LocaleData from "../LocaleData.js";
|
|
10
12
|
import _Calendars from "./_Calendars.js";
|
|
11
13
|
import CalendarUtils from "./CalendarUtils.js";
|
|
12
|
-
import CalendarWeekNumbering from "./CalendarWeekNumbering.js";
|
|
13
14
|
import UI5Date from "./UI5Date.js";
|
|
14
15
|
/**
|
|
15
16
|
* Constructor for UniversalDate.
|
|
@@ -38,11 +39,11 @@ var UniversalDate = BaseObject.extend("sap.ui.core.date.UniversalDate", /** @len
|
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
|
-
* Delegates this method to the
|
|
42
|
+
* Delegates this method to the calendar-specific implementation.
|
|
42
43
|
*
|
|
43
44
|
* @returns {int}
|
|
44
45
|
* The number of milliseconds since January 1, 1970, 00:00:00 UTC based on the Gregorian
|
|
45
|
-
* calendar, for the given calendar
|
|
46
|
+
* calendar, for the given calendar-specific arguments
|
|
46
47
|
*
|
|
47
48
|
* @private
|
|
48
49
|
* @ui5-restricted SAPUI5 Distribution Layer Libraries
|
|
@@ -84,26 +85,7 @@ UniversalDate.prototype.createDate = function (clDate, aArgs) {
|
|
|
84
85
|
if (clDate === Date) {
|
|
85
86
|
return UI5Date.getInstance.apply(null, aArgs);
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
case 0:
|
|
89
|
-
return new clDate();
|
|
90
|
-
// new Date(new Date()) is officially not supported
|
|
91
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
|
|
92
|
-
case 1:
|
|
93
|
-
return new clDate(aArgs[0] instanceof Date ? aArgs[0].getTime() : aArgs[0]);
|
|
94
|
-
case 2:
|
|
95
|
-
return new clDate(aArgs[0], aArgs[1]);
|
|
96
|
-
case 3:
|
|
97
|
-
return new clDate(aArgs[0], aArgs[1], aArgs[2]);
|
|
98
|
-
case 4:
|
|
99
|
-
return new clDate(aArgs[0], aArgs[1], aArgs[2], aArgs[3]);
|
|
100
|
-
case 5:
|
|
101
|
-
return new clDate(aArgs[0], aArgs[1], aArgs[2], aArgs[3], aArgs[4]);
|
|
102
|
-
case 6:
|
|
103
|
-
return new clDate(aArgs[0], aArgs[1], aArgs[2], aArgs[3], aArgs[4], aArgs[5]);
|
|
104
|
-
case 7:
|
|
105
|
-
return new clDate(aArgs[0], aArgs[1], aArgs[2], aArgs[3], aArgs[4], aArgs[5], aArgs[6]);
|
|
106
|
-
}
|
|
88
|
+
return new clDate(...aArgs);
|
|
107
89
|
};
|
|
108
90
|
|
|
109
91
|
/**
|
|
@@ -115,8 +97,8 @@ UniversalDate.prototype.createDate = function (clDate, aArgs) {
|
|
|
115
97
|
*
|
|
116
98
|
* @param {Date|module:sap/ui/core/date/UI5Date|sap.ui.core.date.UniversalDate} [oDate]
|
|
117
99
|
* The date object, defaults to <code>UI5Date.getInstance()</code>
|
|
118
|
-
* @param {sap
|
|
119
|
-
* The calendar type, defaults to <code>
|
|
100
|
+
* @param {module:sap/base/i18n/date/CalendarType} [sCalendarType]
|
|
101
|
+
* The calendar type, defaults to <code>module:sap/base/i18n/Formatting.getCalendarType()</code>
|
|
120
102
|
* @returns {sap.ui.core.date.UniversalDate}
|
|
121
103
|
* An instance of <code>UniversalDate</code>
|
|
122
104
|
*
|
|
@@ -132,7 +114,7 @@ UniversalDate.getInstance = function (oDate, sCalendarType) {
|
|
|
132
114
|
throw new Error("The given date object is invalid");
|
|
133
115
|
}
|
|
134
116
|
if (!sCalendarType) {
|
|
135
|
-
sCalendarType =
|
|
117
|
+
sCalendarType = Formatting.getCalendarType();
|
|
136
118
|
}
|
|
137
119
|
clDate = UniversalDate.getClass(sCalendarType);
|
|
138
120
|
oInstance = Object.create(clDate.prototype);
|
|
@@ -145,10 +127,10 @@ UniversalDate.getInstance = function (oDate, sCalendarType) {
|
|
|
145
127
|
* Returns the constructor function of a subclass of <code>UniversalDate</code> for the given calendar type.
|
|
146
128
|
* If no calendar type is given the globally configured calendar type is used.
|
|
147
129
|
*
|
|
148
|
-
* @param {sap
|
|
130
|
+
* @param {module:sap/base/i18n/date/CalendarType} sCalendarType the type of the used calendar
|
|
149
131
|
*
|
|
150
132
|
* @returns {function}
|
|
151
|
-
* The class of the given <code>
|
|
133
|
+
* The class of the given <code>sCalendarType</code>. If <code>sCalendarType</code> is not
|
|
152
134
|
* provided, the class of the configured calendar type is returned.
|
|
153
135
|
*
|
|
154
136
|
* @private
|
|
@@ -156,18 +138,18 @@ UniversalDate.getInstance = function (oDate, sCalendarType) {
|
|
|
156
138
|
*/
|
|
157
139
|
UniversalDate.getClass = function (sCalendarType) {
|
|
158
140
|
if (!sCalendarType) {
|
|
159
|
-
sCalendarType =
|
|
141
|
+
sCalendarType = Formatting.getCalendarType();
|
|
160
142
|
}
|
|
161
143
|
return _Calendars.get(sCalendarType);
|
|
162
144
|
};
|
|
163
145
|
|
|
164
146
|
/**
|
|
165
147
|
* Returns the day of the month of the embedded date instance according to the configured time
|
|
166
|
-
* zone and selected
|
|
148
|
+
* zone and selected calendar.
|
|
167
149
|
*
|
|
168
150
|
* @returns {int}
|
|
169
151
|
* A number representing the day of the month of the embedded date instance according
|
|
170
|
-
* to the configured time zone and selected
|
|
152
|
+
* to the configured time zone and selected calendar
|
|
171
153
|
*
|
|
172
154
|
* @function
|
|
173
155
|
* @name sap.ui.core.date.UniversalDate.prototype.getDate
|
|
@@ -177,11 +159,11 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
177
159
|
|
|
178
160
|
/**
|
|
179
161
|
* Returns the day of the week of the embedded date instance according to the configured time zone and
|
|
180
|
-
* selected
|
|
162
|
+
* selected calendar.
|
|
181
163
|
*
|
|
182
164
|
* @returns {int}
|
|
183
165
|
* A number representing the day of the week of the embedded date instance according to the configured
|
|
184
|
-
* time zone and selected
|
|
166
|
+
* time zone and selected calendar
|
|
185
167
|
*
|
|
186
168
|
* @function
|
|
187
169
|
* @name sap.ui.core.date.UniversalDate.prototype.getDay
|
|
@@ -190,10 +172,10 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
190
172
|
*/
|
|
191
173
|
|
|
192
174
|
/**
|
|
193
|
-
* Returns the year of the embedded date instance according to the configured time zone and selected
|
|
175
|
+
* Returns the year of the embedded date instance according to the configured time zone and selected calendar.
|
|
194
176
|
*
|
|
195
177
|
* @returns {int}
|
|
196
|
-
* The year of the embedded date instance according to the configured time zone and selected
|
|
178
|
+
* The year of the embedded date instance according to the configured time zone and selected calendar
|
|
197
179
|
*
|
|
198
180
|
* @function
|
|
199
181
|
* @name sap.ui.core.date.UniversalDate.prototype.getFullYear
|
|
@@ -203,11 +185,11 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
203
185
|
|
|
204
186
|
/**
|
|
205
187
|
* Returns the hours of the embedded date instance according to the configured time zone and selected
|
|
206
|
-
*
|
|
188
|
+
* calendar.
|
|
207
189
|
*
|
|
208
190
|
* @returns {int}
|
|
209
191
|
* A number representing the hours of the embedded date instance according to the configured time zone
|
|
210
|
-
* and selected
|
|
192
|
+
* and selected calendar
|
|
211
193
|
*
|
|
212
194
|
* @function
|
|
213
195
|
* @name sap.ui.core.date.UniversalDate.prototype.getHours
|
|
@@ -217,11 +199,11 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
217
199
|
|
|
218
200
|
/**
|
|
219
201
|
* Returns the milliseconds of the embedded date instance according to the configured time zone
|
|
220
|
-
* and selected
|
|
202
|
+
* and selected calendar.
|
|
221
203
|
*
|
|
222
204
|
* @returns {int}
|
|
223
205
|
* A number between 0 and 999 representing the milliseconds of the embedded date instance according to
|
|
224
|
-
* the configured time zone and selected
|
|
206
|
+
* the configured time zone and selected calendar
|
|
225
207
|
*
|
|
226
208
|
* @function
|
|
227
209
|
* @name sap.ui.core.date.UniversalDate.prototype.getMilliseconds
|
|
@@ -230,11 +212,11 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
230
212
|
*/
|
|
231
213
|
|
|
232
214
|
/**
|
|
233
|
-
* Returns the minutes of the embedded date instance according to the configured time zone and selected
|
|
215
|
+
* Returns the minutes of the embedded date instance according to the configured time zone and selected calendar.
|
|
234
216
|
*
|
|
235
217
|
* @returns {int}
|
|
236
218
|
* A number between 0 and 59 representing the minutes of the embedded date instance according to the
|
|
237
|
-
* configured time zone and selected
|
|
219
|
+
* configured time zone and selected calendar
|
|
238
220
|
*
|
|
239
221
|
* @function
|
|
240
222
|
* @name sap.ui.core.date.UniversalDate.prototype.getMinutes
|
|
@@ -244,10 +226,10 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
244
226
|
|
|
245
227
|
/**
|
|
246
228
|
* Returns the month index of the embedded date instance according to the configured time zone
|
|
247
|
-
* and selected
|
|
229
|
+
* and selected calendar.
|
|
248
230
|
*
|
|
249
231
|
* @returns {int}
|
|
250
|
-
* The month index of the embedded date instance according to the configured time zone and selected
|
|
232
|
+
* The month index of the embedded date instance according to the configured time zone and selected calendar
|
|
251
233
|
*
|
|
252
234
|
* @function
|
|
253
235
|
* @name sap.ui.core.date.UniversalDate.prototype.getMonth
|
|
@@ -256,11 +238,11 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
256
238
|
*/
|
|
257
239
|
|
|
258
240
|
/**
|
|
259
|
-
* Returns the seconds of the embedded date instance according to the configured time zone and selected
|
|
241
|
+
* Returns the seconds of the embedded date instance according to the configured time zone and selected calendar.
|
|
260
242
|
*
|
|
261
243
|
* @returns {int}
|
|
262
244
|
* A number between 0 and 59 representing the seconds of the embedded date instance according to the
|
|
263
|
-
* configured time zone and selected
|
|
245
|
+
* configured time zone and selected calendar
|
|
264
246
|
*
|
|
265
247
|
* @function
|
|
266
248
|
* @name sap.ui.core.date.UniversalDate.prototype.getSeconds
|
|
@@ -282,15 +264,15 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
282
264
|
|
|
283
265
|
/**
|
|
284
266
|
* Returns the year of the embedded date instance minus 1900 according to the configured time zone and
|
|
285
|
-
* selected
|
|
267
|
+
* selected calendar. In case of the Gregorian calendar the 1900 is subtracted from the year value.
|
|
286
268
|
*
|
|
287
269
|
* @returns {int}
|
|
288
270
|
* The year of the embedded date instance (minus 1900 if the Gregorian calendar is selected)
|
|
289
|
-
* according to the configured time zone and selected
|
|
271
|
+
* according to the configured time zone and selected calendar
|
|
290
272
|
*
|
|
291
|
-
* @deprecated
|
|
292
|
-
*
|
|
293
|
-
*
|
|
273
|
+
* @deprecated as of version 1.111.0 as it is deprecated in the base JavaScript <code>Date</code> class.
|
|
274
|
+
* Although it can be used with calendars other than the Gregorian calendar, use {@link #getFullYear} instead,
|
|
275
|
+
* regardless of the selected calendar.
|
|
294
276
|
*
|
|
295
277
|
* @function
|
|
296
278
|
* @name sap.ui.core.date.UniversalDate.prototype.getYear
|
|
@@ -313,11 +295,11 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
313
295
|
|
|
314
296
|
/**
|
|
315
297
|
* Returns the day of the month of the embedded date instance according to universal time and
|
|
316
|
-
* selected
|
|
298
|
+
* selected calendar.
|
|
317
299
|
*
|
|
318
300
|
* @returns {int}
|
|
319
301
|
* A number representing the day of the month of the embedded date instance according
|
|
320
|
-
* to universal time and selected
|
|
302
|
+
* to universal time and selected calendar
|
|
321
303
|
*
|
|
322
304
|
* @function
|
|
323
305
|
* @name sap.ui.core.date.UniversalDate.prototype.getUTCDate
|
|
@@ -328,11 +310,11 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
328
310
|
/**
|
|
329
311
|
*
|
|
330
312
|
* Returns the day of the week of the embedded date instance according to universal time and
|
|
331
|
-
* selected
|
|
313
|
+
* selected calendar.
|
|
332
314
|
*
|
|
333
315
|
* @returns {int}
|
|
334
316
|
* A number representing the day of the week of the embedded date instance according to universal
|
|
335
|
-
* time and selected
|
|
317
|
+
* time and selected calendar
|
|
336
318
|
*
|
|
337
319
|
* @function
|
|
338
320
|
* @name sap.ui.core.date.UniversalDate.prototype.getUTCDay
|
|
@@ -341,10 +323,10 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
341
323
|
*/
|
|
342
324
|
|
|
343
325
|
/**
|
|
344
|
-
* Returns the year of the embedded date instance according to universal time and selected
|
|
326
|
+
* Returns the year of the embedded date instance according to universal time and selected calendar.
|
|
345
327
|
*
|
|
346
328
|
* @returns {int}
|
|
347
|
-
* The year of the embedded date instance according to universal time and selected
|
|
329
|
+
* The year of the embedded date instance according to universal time and selected calendar
|
|
348
330
|
*
|
|
349
331
|
* @function
|
|
350
332
|
* @name sap.ui.core.date.UniversalDate.prototype.getUTCFullYear
|
|
@@ -392,11 +374,11 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
392
374
|
|
|
393
375
|
/**
|
|
394
376
|
* Returns the month index of the embedded date instance according to universal time and
|
|
395
|
-
* selected
|
|
377
|
+
* selected calendar.
|
|
396
378
|
*
|
|
397
379
|
* @returns {int}
|
|
398
380
|
* The month index of the embedded date instance according to universal time and selected
|
|
399
|
-
*
|
|
381
|
+
* calendar
|
|
400
382
|
*
|
|
401
383
|
* @function
|
|
402
384
|
* @name sap.ui.core.date.UniversalDate.prototype.getUTCMonth
|
|
@@ -419,7 +401,7 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
419
401
|
|
|
420
402
|
/**
|
|
421
403
|
* Sets the day of the month for the embedded date instance considering the configured time zone
|
|
422
|
-
* and selected
|
|
404
|
+
* and selected calendar.
|
|
423
405
|
*
|
|
424
406
|
* @param {int} iDay
|
|
425
407
|
* An integer representing the new day value
|
|
@@ -435,7 +417,7 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
435
417
|
|
|
436
418
|
/**
|
|
437
419
|
* Sets the year, month and day for the embedded date instance considering the configured time
|
|
438
|
-
* zone and selected
|
|
420
|
+
* zone and selected calendar.
|
|
439
421
|
*
|
|
440
422
|
* @param {int} yearValue An integer representing the new year value
|
|
441
423
|
* @param {int} [monthValue] An integer representing the new month index
|
|
@@ -501,7 +483,7 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
501
483
|
|
|
502
484
|
/**
|
|
503
485
|
* Sets the month and day for the embedded date instance considering the configured time zone and
|
|
504
|
-
* selected
|
|
486
|
+
* selected calendar.
|
|
505
487
|
*
|
|
506
488
|
* @param {int} monthValue An integer representing the new month index
|
|
507
489
|
* @param {int} [dayValue] An integer representing the new day value
|
|
@@ -532,7 +514,7 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
532
514
|
|
|
533
515
|
/**
|
|
534
516
|
* Sets the day of the month for the embedded date instance according to universal time and
|
|
535
|
-
* selected
|
|
517
|
+
* selected calendar.
|
|
536
518
|
*
|
|
537
519
|
* @param {int} dayValue
|
|
538
520
|
* An integer representing the new day value
|
|
@@ -548,7 +530,7 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
548
530
|
|
|
549
531
|
/**
|
|
550
532
|
* Sets the year, month and day for the embedded date instance according to universal time and
|
|
551
|
-
* selected
|
|
533
|
+
* selected calendar.
|
|
552
534
|
*
|
|
553
535
|
* @param {int} yearValue An integer representing the new year value
|
|
554
536
|
* @param {int} [monthValue] An integer representing the new month index
|
|
@@ -614,7 +596,7 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
614
596
|
|
|
615
597
|
/**
|
|
616
598
|
* Sets the month and day for the embedded date instance according to universal time and
|
|
617
|
-
* selected
|
|
599
|
+
* selected calendar.
|
|
618
600
|
*
|
|
619
601
|
* @param {int} monthValue An integer representing the new month index
|
|
620
602
|
* @param {int} [dateValue] An integer representing the new day value
|
|
@@ -645,7 +627,7 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
645
627
|
|
|
646
628
|
/**
|
|
647
629
|
* Sets the year for the embedded date instance considering the configured time zone and the
|
|
648
|
-
* selected
|
|
630
|
+
* selected calendar. In case of the Gregorian calendar, 1900 is added to the year value
|
|
649
631
|
*
|
|
650
632
|
* @param {int} yearValue
|
|
651
633
|
* An integer representing the new year value (plus 1900 for the Gregorian calendar)
|
|
@@ -653,9 +635,9 @@ UniversalDate.getClass = function (sCalendarType) {
|
|
|
653
635
|
* The milliseconds of the new timestamp based on the UNIX epoch, or <code>NaN</code> if the
|
|
654
636
|
* timestamp could not be updated. The new timestamp is a Gregorian timestamp.
|
|
655
637
|
*
|
|
656
|
-
* @deprecated
|
|
657
|
-
*
|
|
658
|
-
*
|
|
638
|
+
* @deprecated as of version 1.111.0 as it is deprecated in the base JavaScript <code>Date</code> class.
|
|
639
|
+
* Although it can be used with calendars other than the Gregorian calendar, use {@link #setFullYear} instead,
|
|
640
|
+
* regardless of the selected calendar.
|
|
659
641
|
*
|
|
660
642
|
* @function
|
|
661
643
|
* @name sap.ui.core.date.UniversalDate.prototype.setYear
|
|
@@ -720,7 +702,7 @@ UniversalDate.prototype.getJSDate = function () {
|
|
|
720
702
|
/**
|
|
721
703
|
* Returns the calendar type of the current instance of a UniversalDate.
|
|
722
704
|
*
|
|
723
|
-
* @returns {sap
|
|
705
|
+
* @returns {module:sap/base/i18n/date/CalendarType} The calendar type of the date
|
|
724
706
|
*
|
|
725
707
|
* @private
|
|
726
708
|
* @ui5-restricted SAPUI5 Distribution Layer Libraries
|
|
@@ -786,7 +768,7 @@ UniversalDate.prototype.setUTCEra = function (iEra) {
|
|
|
786
768
|
* Retrieves the calendar week
|
|
787
769
|
*
|
|
788
770
|
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
789
|
-
* @param {sap
|
|
771
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
790
772
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
791
773
|
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
792
774
|
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
@@ -811,7 +793,7 @@ UniversalDate.prototype.getWeek = function (oLocale, vCalendarWeekNumbering) {
|
|
|
811
793
|
* @param {{week: int, year: int}} oWeek the calendar week, note: week index starts with <code>0</code>,
|
|
812
794
|
* <code>oWeek.year</code> is optional and defaults to {@link sap.ui.core.date.UniversalDate#getFullYear}
|
|
813
795
|
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
814
|
-
* @param {sap
|
|
796
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
815
797
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
816
798
|
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
817
799
|
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
@@ -834,7 +816,7 @@ UniversalDate.prototype.setWeek = function (oWeek, oLocale, vCalendarWeekNumberi
|
|
|
834
816
|
* Retrieves the UTC calendar week
|
|
835
817
|
*
|
|
836
818
|
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
837
|
-
* @param {sap
|
|
819
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
838
820
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
839
821
|
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
840
822
|
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
@@ -859,7 +841,7 @@ UniversalDate.prototype.getUTCWeek = function (oLocale, vCalendarWeekNumbering)
|
|
|
859
841
|
* @param {{week: int, year: int}} oWeek the calendar week, note: week index starts with <code>0</code>,
|
|
860
842
|
* <code>oWeek.year</code> is optional and defaults to {@link sap.ui.core.date.UniversalDate#getFullYear}
|
|
861
843
|
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
862
|
-
* @param {sap
|
|
844
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
863
845
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
864
846
|
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
865
847
|
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
@@ -986,7 +968,7 @@ var iMillisecondsInWeek = 7 * 24 * 60 * 60 * 1000;
|
|
|
986
968
|
* @param {int} iDay the date, e.g. <code>3</code>
|
|
987
969
|
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
988
970
|
* e.g. <code>new Locale("de-DE")</code>
|
|
989
|
-
* @param {sap
|
|
971
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
990
972
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
991
973
|
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
992
974
|
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
@@ -1002,9 +984,9 @@ var iMillisecondsInWeek = 7 * 24 * 60 * 60 * 1000;
|
|
|
1002
984
|
* </ul>
|
|
1003
985
|
*/
|
|
1004
986
|
UniversalDate.getWeekByDate = function (sCalendarType, iYear, iMonth, iDay, oLocale, vCalendarWeekNumbering) {
|
|
1005
|
-
vCalendarWeekNumbering = vCalendarWeekNumbering ||
|
|
987
|
+
vCalendarWeekNumbering = vCalendarWeekNumbering || Formatting.getCalendarWeekNumbering();
|
|
1006
988
|
checkWeekConfig(vCalendarWeekNumbering);
|
|
1007
|
-
oLocale = oLocale ||
|
|
989
|
+
oLocale = oLocale || new Locale(Formatting.getLanguageTag());
|
|
1008
990
|
var clDate = this.getClass(sCalendarType);
|
|
1009
991
|
var oFirstDay = getFirstDayOfFirstWeek(clDate, iYear, oLocale, vCalendarWeekNumbering);
|
|
1010
992
|
var oDate = new clDate(clDate.UTC(iYear, iMonth, iDay));
|
|
@@ -1041,7 +1023,7 @@ UniversalDate.getWeekByDate = function (sCalendarType, iYear, iMonth, iDay, oLoc
|
|
|
1041
1023
|
* @param {int} iWeek the calendar week index, e.g. <code>8</code>
|
|
1042
1024
|
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
1043
1025
|
* e.g. <code>new Locale("de-DE")</code>
|
|
1044
|
-
* @param {sap
|
|
1026
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} [vCalendarWeekNumbering]
|
|
1045
1027
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
1046
1028
|
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
1047
1029
|
* In case an object is provided, both properties <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code> must be set, otherwise an error is thrown.
|
|
@@ -1057,9 +1039,9 @@ UniversalDate.getWeekByDate = function (sCalendarType, iYear, iMonth, iDay, oLoc
|
|
|
1057
1039
|
* </ul>
|
|
1058
1040
|
*/
|
|
1059
1041
|
UniversalDate.getFirstDateOfWeek = function (sCalendarType, iYear, iWeek, oLocale, vCalendarWeekNumbering) {
|
|
1060
|
-
vCalendarWeekNumbering = vCalendarWeekNumbering ||
|
|
1042
|
+
vCalendarWeekNumbering = vCalendarWeekNumbering || Formatting.getCalendarWeekNumbering();
|
|
1061
1043
|
checkWeekConfig(vCalendarWeekNumbering);
|
|
1062
|
-
oLocale = oLocale ||
|
|
1044
|
+
oLocale = oLocale || new Locale(Formatting.getLanguageTag());
|
|
1063
1045
|
var clDate = this.getClass(sCalendarType);
|
|
1064
1046
|
var oFirstDay = getFirstDayOfFirstWeek(clDate, iYear, oLocale, vCalendarWeekNumbering);
|
|
1065
1047
|
var oDate = new clDate(oFirstDay.valueOf() + iWeek * iMillisecondsInWeek);
|
|
@@ -1082,7 +1064,7 @@ UniversalDate.getFirstDateOfWeek = function (sCalendarType, iYear, iWeek, oLocal
|
|
|
1082
1064
|
* Determines if the split week algorithm should be applied (the first day of the first calendar
|
|
1083
1065
|
* week of the year is January 1st).
|
|
1084
1066
|
*
|
|
1085
|
-
* @param {sap
|
|
1067
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} vCalendarWeekNumbering
|
|
1086
1068
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and
|
|
1087
1069
|
* <code>minimalDaysInFirstWeek</code>
|
|
1088
1070
|
* @param {sap.ui.core.Locale} oLocale the locale used for the week calculation
|
|
@@ -1098,7 +1080,7 @@ function isSplitWeek(vCalendarWeekNumbering, oLocale) {
|
|
|
1098
1080
|
/**
|
|
1099
1081
|
* Checks the calendar week configuration
|
|
1100
1082
|
*
|
|
1101
|
-
* @param {sap
|
|
1083
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} vCalendarWeekNumbering
|
|
1102
1084
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>
|
|
1103
1085
|
* @throws {TypeError} If:
|
|
1104
1086
|
* <ul>
|
|
@@ -1119,7 +1101,7 @@ function checkWeekConfig(vCalendarWeekNumbering) {
|
|
|
1119
1101
|
/**
|
|
1120
1102
|
* Resolves the calendar week configuration
|
|
1121
1103
|
*
|
|
1122
|
-
* @param {sap
|
|
1104
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} vCalendarWeekNumbering
|
|
1123
1105
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>
|
|
1124
1106
|
* @param {sap.ui.core.Locale} [oLocale] locale to be used
|
|
1125
1107
|
* @returns {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} calendar week calculation configuration
|
|
@@ -1139,14 +1121,14 @@ function resolveCalendarWeekConfiguration(vCalendarWeekNumbering, oLocale) {
|
|
|
1139
1121
|
* @param {int} iYear year, e.g. <code>2016</code>
|
|
1140
1122
|
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
1141
1123
|
* e.g. <code>new Locale("de-DE")</code>
|
|
1142
|
-
* @param {sap
|
|
1124
|
+
* @param {module:sap/base/i18n/date/CalendarWeekNumbering|{firstDayOfWeek: int, minimalDaysInFirstWeek: int}} vCalendarWeekNumbering
|
|
1143
1125
|
* calendar week numbering or object with fields <code>firstDayOfWeek</code> and <code>minimalDaysInFirstWeek</code>,
|
|
1144
1126
|
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
1145
1127
|
* e.g. <code>{firstDayOfWeek: 1, minimalDaysInFirstWeek: 4}</code>
|
|
1146
1128
|
* @returns {Date} first day of the first week in the given year, e.g. <code>Mon Jan 04 2016 01:00:00 GMT+0100</code>
|
|
1147
1129
|
*/
|
|
1148
1130
|
function getFirstDayOfFirstWeek(clDate, iYear, oLocale, vCalendarWeekNumbering) {
|
|
1149
|
-
oLocale = oLocale ||
|
|
1131
|
+
oLocale = oLocale || new Locale(Formatting.getLanguageTag());
|
|
1150
1132
|
var oWeekConfig = resolveCalendarWeekConfiguration(vCalendarWeekNumbering, oLocale);
|
|
1151
1133
|
var iMinDays = oWeekConfig.minimalDaysInFirstWeek;
|
|
1152
1134
|
var iFirstDayOfWeek = oWeekConfig.firstDayOfWeek;
|
|
@@ -1184,16 +1166,16 @@ function calculateWeeks(oFromDate, oToDate) {
|
|
|
1184
1166
|
var mEras = {};
|
|
1185
1167
|
|
|
1186
1168
|
/**
|
|
1187
|
-
* Returns an index of the era for the given date values in the given
|
|
1169
|
+
* Returns an index of the era for the given date values in the given calendar. For
|
|
1188
1170
|
* an index to be returned the date value has to be within the era time period, i.e. the
|
|
1189
1171
|
* timestamp value of the date has to be bigger or equal than the start timestamp of the era
|
|
1190
1172
|
* or smaller than the end of the end period.
|
|
1191
1173
|
*
|
|
1192
|
-
* @param {string} sCalendarType The given
|
|
1174
|
+
* @param {string} sCalendarType The given calendar type which the eras available for selection
|
|
1193
1175
|
* @param {int} iYear The year value for which the era is looked for
|
|
1194
1176
|
* @param {int} iMonth The month value for which the era is looked for
|
|
1195
1177
|
* @param {int} iDay The date value for which the era is looked for
|
|
1196
|
-
* @returns {int} The index of the found era for the given date values in the given
|
|
1178
|
+
* @returns {int} The index of the found era for the given date values in the given calendar
|
|
1197
1179
|
*
|
|
1198
1180
|
* @private
|
|
1199
1181
|
* @ui5-restricted SAPUI5 Distribution Layer Libraries
|
|
@@ -1220,7 +1202,7 @@ UniversalDate.getEraByDate = function (sCalendarType, iYear, iMonth, iDay) {
|
|
|
1220
1202
|
/**
|
|
1221
1203
|
* Returns an index of the current era for the embedded date instance.
|
|
1222
1204
|
*
|
|
1223
|
-
* @param {string} sCalendarType The
|
|
1205
|
+
* @param {string} sCalendarType The calendar type which defines the available eras to select from
|
|
1224
1206
|
* @returns {int} The index of the current era of the embedded date instance
|
|
1225
1207
|
*
|
|
1226
1208
|
* @private
|
|
@@ -1232,13 +1214,13 @@ UniversalDate.getCurrentEra = function (sCalendarType) {
|
|
|
1232
1214
|
};
|
|
1233
1215
|
|
|
1234
1216
|
/**
|
|
1235
|
-
* Returns the start date of the selected era from the given era index, in the given
|
|
1217
|
+
* Returns the start date of the selected era from the given era index, in the given calendar type.
|
|
1236
1218
|
*
|
|
1237
|
-
* @param {string} sCalendarType The
|
|
1219
|
+
* @param {string} sCalendarType The calendar type from which the era is to be picked
|
|
1238
1220
|
* @param {int} iEra The given era index of the to be selected era
|
|
1239
1221
|
* @returns {object|null}
|
|
1240
1222
|
* The start date object of the selected era. If no era can be found for the given index the first
|
|
1241
|
-
* era of the selected
|
|
1223
|
+
* era of the selected calendar is chosen. If the chosen era does not have a start date defined
|
|
1242
1224
|
* <code>null</code>
|
|
1243
1225
|
*
|
|
1244
1226
|
* @private
|
|
@@ -1253,15 +1235,15 @@ UniversalDate.getEraStartDate = function (sCalendarType, iEra) {
|
|
|
1253
1235
|
};
|
|
1254
1236
|
|
|
1255
1237
|
/**
|
|
1256
|
-
* Returns an array of era for the given
|
|
1238
|
+
* Returns an array of era for the given calendar.
|
|
1257
1239
|
*
|
|
1258
1240
|
* @param {string} sCalendarType
|
|
1259
|
-
* The
|
|
1241
|
+
* The calendar type from which the the locale era data is taken from and the era array is
|
|
1260
1242
|
* generated
|
|
1261
|
-
* @returns {array} An array of all available era in the given
|
|
1243
|
+
* @returns {array} An array of all available era in the given calendar
|
|
1262
1244
|
*/
|
|
1263
1245
|
function getEras(sCalendarType) {
|
|
1264
|
-
var oLocale =
|
|
1246
|
+
var oLocale = new Locale(Formatting.getLanguageTag()),
|
|
1265
1247
|
oLocaleData = LocaleData.getInstance(oLocale),
|
|
1266
1248
|
aEras = mEras[sCalendarType];
|
|
1267
1249
|
if (!aEras) {
|