@ui5/webcomponents-localization 0.0.0-2f7664755 → 0.0.0-31ad69297
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/.eslintignore +2 -1
- package/.npsrc.json +3 -0
- package/CHANGELOG.md +733 -0
- package/README.md +2 -1
- package/dist/.tsbuildinfo +1 -0
- package/dist/Assets-static.js.map +1 -1
- package/dist/Assets.js.map +1 -1
- package/dist/DateFormat.js.map +1 -1
- package/dist/LocaleData.js.map +1 -1
- package/dist/dates/CalendarDate.d.ts +7 -5
- package/dist/dates/CalendarDate.js +8 -7
- package/dist/dates/CalendarDate.js.map +1 -1
- package/dist/dates/ExtremeDates.d.ts +2 -2
- package/dist/dates/ExtremeDates.js.map +1 -1
- package/dist/dates/UI5Date.d.ts +6 -0
- package/dist/dates/UI5Date.js +7 -0
- package/dist/dates/UI5Date.js.map +1 -0
- package/dist/dates/UniversalDate.d.ts +2 -1
- package/dist/dates/UniversalDate.js.map +1 -1
- package/dist/dates/calculateWeekNumber.d.ts +3 -1
- package/dist/dates/calculateWeekNumber.js +6 -6
- package/dist/dates/calculateWeekNumber.js.map +1 -1
- package/dist/dates/convertMonthNumbersToMonthNames.d.ts +1 -1
- package/dist/dates/convertMonthNumbersToMonthNames.js.map +1 -1
- package/dist/dates/getDaysInMonth.js.map +1 -1
- package/dist/dates/getRoundedTimestamp.js +1 -0
- package/dist/dates/getRoundedTimestamp.js.map +1 -1
- package/dist/dates/getTodayUTCTimestamp.d.ts +1 -1
- package/dist/dates/getTodayUTCTimestamp.js +2 -1
- package/dist/dates/getTodayUTCTimestamp.js.map +1 -1
- package/dist/dates/modifyDateBy.d.ts +2 -1
- package/dist/dates/modifyDateBy.js +34 -19
- package/dist/dates/modifyDateBy.js.map +1 -1
- package/dist/dates/transformDateToSecondaryType.d.ts +1 -1
- package/dist/dates/transformDateToSecondaryType.js +3 -2
- package/dist/dates/transformDateToSecondaryType.js.map +1 -1
- package/dist/features/calendar/Buddhist.js.map +1 -1
- package/dist/features/calendar/Gregorian.js.map +1 -1
- package/dist/features/calendar/Islamic.js.map +1 -1
- package/dist/features/calendar/Japanese.js.map +1 -1
- package/dist/features/calendar/Persian.js.map +1 -1
- package/dist/generated/assets/cldr/ar.json +5571 -6704
- package/dist/generated/assets/cldr/ar_EG.json +5571 -6704
- package/dist/generated/assets/cldr/ar_SA.json +5570 -6704
- package/dist/generated/assets/cldr/bg.json +4491 -5742
- package/dist/generated/assets/cldr/ca.json +4478 -5793
- package/dist/generated/assets/cldr/cnr.json +4667 -0
- package/dist/generated/assets/cldr/cs.json +5067 -6294
- package/dist/generated/assets/cldr/cy.json +5479 -6612
- package/dist/generated/assets/cldr/da.json +4371 -5651
- package/dist/generated/assets/cldr/de.json +4420 -5713
- package/dist/generated/assets/cldr/de_AT.json +4421 -5714
- package/dist/generated/assets/cldr/de_CH.json +4419 -5712
- package/dist/generated/assets/cldr/el.json +4309 -5579
- package/dist/generated/assets/cldr/el_CY.json +4309 -5579
- package/dist/generated/assets/cldr/en.json +4342 -5732
- package/dist/generated/assets/cldr/en_AU.json +4382 -5724
- package/dist/generated/assets/cldr/en_GB.json +4373 -5733
- package/dist/generated/assets/cldr/en_HK.json +4382 -5739
- package/dist/generated/assets/cldr/en_IE.json +4373 -5733
- package/dist/generated/assets/cldr/en_IN.json +4378 -5734
- package/dist/generated/assets/cldr/en_NZ.json +4373 -5733
- package/dist/generated/assets/cldr/en_PG.json +4374 -5734
- package/dist/generated/assets/cldr/en_SG.json +4378 -5735
- package/dist/generated/assets/cldr/en_ZA.json +4374 -5734
- package/dist/generated/assets/cldr/es.json +4584 -5641
- package/dist/generated/assets/cldr/es_AR.json +4587 -5643
- package/dist/generated/assets/cldr/es_BO.json +4586 -5642
- package/dist/generated/assets/cldr/es_CL.json +4479 -5643
- package/dist/generated/assets/cldr/es_CO.json +4479 -5642
- package/dist/generated/assets/cldr/es_MX.json +4588 -5644
- package/dist/generated/assets/cldr/es_PE.json +4370 -5642
- package/dist/generated/assets/cldr/es_UY.json +4372 -5644
- package/dist/generated/assets/cldr/es_VE.json +4371 -5643
- package/dist/generated/assets/cldr/et.json +4373 -5729
- package/dist/generated/assets/cldr/fa.json +4429 -5647
- package/dist/generated/assets/cldr/fi.json +4514 -5804
- package/dist/generated/assets/cldr/fr.json +4383 -5741
- package/dist/generated/assets/cldr/fr_BE.json +4383 -5741
- package/dist/generated/assets/cldr/fr_CA.json +4377 -5735
- package/dist/generated/assets/cldr/fr_CH.json +4401 -5759
- package/dist/generated/assets/cldr/fr_LU.json +4383 -5741
- package/dist/generated/assets/cldr/he.json +4980 -6175
- package/dist/generated/assets/cldr/hi.json +4345 -5558
- package/dist/generated/assets/cldr/hr.json +4640 -5681
- package/dist/generated/assets/cldr/hu.json +4415 -5686
- package/dist/generated/assets/cldr/id.json +4132 -5420
- package/dist/generated/assets/cldr/it.json +4355 -5712
- package/dist/generated/assets/cldr/it_CH.json +4355 -5712
- package/dist/generated/assets/cldr/ja.json +4251 -5626
- package/dist/generated/assets/cldr/kk.json +4503 -5487
- package/dist/generated/assets/cldr/ko.json +4210 -5534
- package/dist/generated/assets/cldr/lt.json +4939 -6243
- package/dist/generated/assets/cldr/lv.json +4651 -5874
- package/dist/generated/assets/cldr/mk.json +4408 -0
- package/dist/generated/assets/cldr/ms.json +4093 -5245
- package/dist/generated/assets/cldr/nb.json +4403 -5740
- package/dist/generated/assets/cldr/nl.json +4542 -5613
- package/dist/generated/assets/cldr/nl_BE.json +4542 -5613
- package/dist/generated/assets/cldr/pl.json +4978 -5972
- package/dist/generated/assets/cldr/pt.json +4597 -5567
- package/dist/generated/assets/cldr/pt_PT.json +4648 -5702
- package/dist/generated/assets/cldr/ro.json +4633 -5852
- package/dist/generated/assets/cldr/ru.json +4947 -6169
- package/dist/generated/assets/cldr/ru_UA.json +4947 -6169
- package/dist/generated/assets/cldr/sk.json +4980 -6166
- package/dist/generated/assets/cldr/sl.json +4948 -6136
- package/dist/generated/assets/cldr/sr.json +4737 -5888
- package/dist/generated/assets/cldr/sr_Latn.json +4722 -5889
- package/dist/generated/assets/cldr/sv.json +4406 -5774
- package/dist/generated/assets/cldr/th.json +4234 -5627
- package/dist/generated/assets/cldr/tr.json +4451 -5809
- package/dist/generated/assets/cldr/uk.json +4908 -6115
- package/dist/generated/assets/cldr/vi.json +4094 -5435
- package/dist/generated/assets/cldr/zh_CN.json +4124 -5429
- package/dist/generated/assets/cldr/zh_HK.json +4132 -5437
- package/dist/generated/assets/cldr/zh_SG.json +4132 -5437
- package/dist/generated/assets/cldr/zh_TW.json +4155 -5525
- package/dist/generated/json-imports/LocaleData-static.d.ts +1 -0
- package/dist/generated/json-imports/LocaleData-static.js +11 -11
- package/dist/generated/json-imports/LocaleData-static.js.map +1 -0
- package/dist/generated/json-imports/LocaleData.d.ts +1 -0
- package/dist/generated/json-imports/LocaleData.js +88 -88
- package/dist/generated/json-imports/LocaleData.js.map +1 -0
- package/dist/getCachedLocaleDataInstance.js.map +1 -1
- package/dist/locale/getLocaleData.js.map +1 -1
- package/dist/sap/base/Event.js +59 -0
- package/dist/sap/base/Eventing.js +146 -0
- package/dist/sap/base/Log.js +2 -239
- package/dist/sap/base/assert.js +28 -1
- package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
- package/dist/sap/base/config.js +17 -0
- package/dist/sap/base/i18n/Formatting.js +1133 -0
- package/dist/sap/base/i18n/LanguageTag.js +173 -0
- package/dist/sap/base/i18n/Localization.d.ts +4 -0
- package/dist/sap/base/i18n/Localization.js +12 -0
- package/dist/sap/base/i18n/Localization.js.map +1 -0
- package/dist/sap/base/i18n/date/CalendarType.js +43 -0
- package/dist/sap/base/i18n/date/CalendarWeekNumbering.js +105 -0
- package/dist/sap/base/i18n/date/TimezoneUtils.js +319 -0
- package/dist/sap/base/strings/camelize.js +30 -0
- package/dist/sap/base/strings/formatMessage.js +88 -15
- package/dist/sap/base/util/LoaderExtensions.js.map +1 -1
- package/dist/sap/base/util/ObjectPath.d.ts +4 -0
- package/dist/sap/base/util/ObjectPath.js +4 -33
- package/dist/sap/base/util/ObjectPath.js.map +1 -0
- package/dist/sap/base/util/Version.js +157 -0
- package/dist/sap/base/util/_merge.js +83 -26
- package/dist/sap/base/util/array/uniqueSort.js +37 -15
- package/dist/sap/base/util/deepClone.js +102 -0
- package/dist/sap/base/util/deepEqual.js +75 -51
- package/dist/sap/base/util/extend.js +58 -7
- package/dist/sap/base/util/isEmptyObject.js +34 -0
- package/dist/sap/base/util/isPlainObject.js +35 -1
- package/dist/sap/base/util/now.js +24 -3
- package/dist/sap/base/util/resolveReference.js +3 -0
- package/dist/sap/base/util/uid.js +27 -0
- package/dist/sap/ui/base/DataType.js +657 -0
- package/dist/sap/ui/base/Interface.js +47 -1
- package/dist/sap/ui/base/Metadata.js +435 -171
- package/dist/sap/ui/base/Object.js +284 -48
- package/dist/sap/ui/core/CalendarType.js +24 -8
- package/dist/sap/ui/core/Configuration.d.ts +2 -1
- package/dist/sap/ui/core/Configuration.js +4 -1
- package/dist/sap/ui/core/Configuration.js.map +1 -1
- package/dist/sap/ui/core/Core.d.ts +3 -2
- package/dist/sap/ui/core/Core.js.map +1 -1
- package/dist/sap/ui/core/FormatSettings.d.ts +1 -1
- package/dist/sap/ui/core/FormatSettings.js +2 -1
- package/dist/sap/ui/core/FormatSettings.js.map +1 -1
- package/dist/sap/ui/core/Locale.js +190 -155
- package/dist/sap/ui/core/LocaleData.js +2662 -1300
- package/dist/sap/ui/core/Supportability.js +5 -0
- package/dist/sap/ui/core/Theming.js +539 -0
- package/dist/sap/ui/core/date/Buddhist.js +162 -87
- package/dist/sap/ui/core/date/CalendarUtils.js +61 -32
- package/dist/sap/ui/core/date/CalendarWeekNumbering.js +30 -7
- package/dist/sap/ui/core/date/Gregorian.js +25 -10
- package/dist/sap/ui/core/date/Islamic.js +298 -185
- package/dist/sap/ui/core/date/Japanese.js +210 -115
- package/dist/sap/ui/core/date/Persian.js +324 -195
- package/dist/sap/ui/core/date/UI5Date.js +991 -0
- package/dist/sap/ui/core/date/UniversalDate.js +1238 -255
- package/dist/sap/ui/core/date/_Calendars.js +10 -1
- package/dist/sap/ui/core/format/DateFormat.js +3167 -2093
- package/dist/sap/ui/core/format/TimezoneUtil.js +24 -94
- package/package-scripts.cjs +28 -0
- package/package.json +14 -7
- package/tsconfig.json +12 -1
- package/used-modules.txt +25 -1
- package/dist/sap/ui/Device.js +0 -5
- package/package-scripts.js +0 -38
- package/src/Assets-static.ts +0 -2
- package/src/Assets.ts +0 -2
- package/src/DateFormat.ts +0 -8
- package/src/LocaleData.ts +0 -8
- package/src/dates/CalendarDate.ts +0 -232
- package/src/dates/ExtremeDates.ts +0 -40
- package/src/dates/UniversalDate.ts +0 -51
- package/src/dates/calculateWeekNumber.ts +0 -53
- package/src/dates/convertMonthNumbersToMonthNames.ts +0 -34
- package/src/dates/getDaysInMonth.ts +0 -11
- package/src/dates/getRoundedTimestamp.ts +0 -14
- package/src/dates/getTodayUTCTimestamp.ts +0 -10
- package/src/dates/modifyDateBy.ts +0 -42
- package/src/dates/transformDateToSecondaryType.ts +0 -21
- package/src/features/calendar/Buddhist.ts +0 -1
- package/src/features/calendar/Gregorian.ts +0 -1
- package/src/features/calendar/Islamic.ts +0 -1
- package/src/features/calendar/Japanese.ts +0 -1
- package/src/features/calendar/Persian.ts +0 -1
- package/src/getCachedLocaleDataInstance.ts +0 -15
- package/src/locale/getLocaleData.ts +0 -28
- package/src/sap/base/util/LoaderExtensions.ts +0 -17
- package/src/sap/ui/core/Configuration.ts +0 -22
- package/src/sap/ui/core/Core.ts +0 -15
- package/src/sap/ui/core/FormatSettings.ts +0 -15
- /package/{config/.eslintrc.js → .eslintrc.cjs} +0 -0
@@ -1,94 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
var oInstance = new Intl.DateTimeFormat("en-US", oOptions);
|
26
|
-
if (this._oCache.size === this._iCacheLimit) {
|
27
|
-
this._oCache = new Map();
|
28
|
-
}
|
29
|
-
this._oCache.set(sTimezone, oInstance);
|
30
|
-
return oInstance;
|
31
|
-
}
|
32
|
-
};
|
33
|
-
TimezoneUtil.isValidTimezone = function (sTimezone) {
|
34
|
-
if (!sTimezone) {
|
35
|
-
return false;
|
36
|
-
}
|
37
|
-
if (Intl.supportedValuesOf) {
|
38
|
-
try {
|
39
|
-
aSupportedTimezoneIDs = aSupportedTimezoneIDs || Intl.supportedValuesOf("timeZone");
|
40
|
-
if (aSupportedTimezoneIDs.includes(sTimezone)) {
|
41
|
-
return true;
|
42
|
-
}
|
43
|
-
} catch (oError) {
|
44
|
-
aSupportedTimezoneIDs = [];
|
45
|
-
}
|
46
|
-
}
|
47
|
-
try {
|
48
|
-
oIntlDateTimeFormatCache.get(sTimezone);
|
49
|
-
return true;
|
50
|
-
} catch (oError) {
|
51
|
-
return false;
|
52
|
-
}
|
53
|
-
};
|
54
|
-
TimezoneUtil.convertToTimezone = function (oDate, sTargetTimezone) {
|
55
|
-
var oFormatParts = this._getParts(oDate, sTargetTimezone);
|
56
|
-
return TimezoneUtil._getDateFromParts(oFormatParts);
|
57
|
-
};
|
58
|
-
TimezoneUtil._getParts = function (oDate, sTargetTimezone) {
|
59
|
-
var oIntlDate = oIntlDateTimeFormatCache.get(sTargetTimezone);
|
60
|
-
var oParts = oIntlDate.formatToParts(new Date(oDate.getTime()));
|
61
|
-
var oDateParts = Object.create(null);
|
62
|
-
for (var sKey in oParts) {
|
63
|
-
var oPart = oParts[sKey];
|
64
|
-
if (oPart.type !== "literal") {
|
65
|
-
oDateParts[oPart.type] = oPart.value;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
return oDateParts;
|
69
|
-
};
|
70
|
-
TimezoneUtil._getDateFromParts = function (oParts) {
|
71
|
-
var oDate = new Date(0);
|
72
|
-
var iUTCYear = parseInt(oParts.year);
|
73
|
-
if (oParts.era === "B") {
|
74
|
-
iUTCYear = iUTCYear * -1 + 1;
|
75
|
-
}
|
76
|
-
oDate.setUTCFullYear(iUTCYear, parseInt(oParts.month) - 1, parseInt(oParts.day));
|
77
|
-
oDate.setUTCHours(parseInt(oParts.hour), parseInt(oParts.minute), parseInt(oParts.second), parseInt(oParts.fractionalSecond || 0));
|
78
|
-
return oDate;
|
79
|
-
};
|
80
|
-
TimezoneUtil.calculateOffset = function (oDate, sTimezoneSource) {
|
81
|
-
var oFirstGuess = this.convertToTimezone(oDate, sTimezoneSource);
|
82
|
-
var iInitialOffset = oDate.getTime() - oFirstGuess.getTime();
|
83
|
-
var oDateSource = new Date(oDate.getTime() + iInitialOffset);
|
84
|
-
var oDateTarget = this.convertToTimezone(oDateSource, sTimezoneSource);
|
85
|
-
return (oDateSource.getTime() - oDateTarget.getTime()) / 1000;
|
86
|
-
};
|
87
|
-
TimezoneUtil.getLocalTimezone = function () {
|
88
|
-
if (sLocalTimezone) {
|
89
|
-
return sLocalTimezone;
|
90
|
-
}
|
91
|
-
sLocalTimezone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
92
|
-
return sLocalTimezone;
|
93
|
-
};
|
94
|
-
export default TimezoneUtil;
|
1
|
+
/*!
|
2
|
+
* OpenUI5
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
5
|
+
*/
|
6
|
+
import TimezoneUtils from "../../../base/i18n/date/TimezoneUtils.js";
|
7
|
+
/**
|
8
|
+
* Static collection of utility functions to handle time zone related conversions
|
9
|
+
*
|
10
|
+
* @author SAP SE
|
11
|
+
* @version 1.120.17
|
12
|
+
* @namespace
|
13
|
+
* @name module:sap/ui/core/format/TimezoneUtils
|
14
|
+
* @private
|
15
|
+
* @ui5-restricted sap.ui.core.Configuration, sap.ui.core.format.DateFormat
|
16
|
+
*
|
17
|
+
* @borrows sap/base/i18n/date/TimezoneUtils.isValidTimezone as isValidTimezone
|
18
|
+
* @borrows sap/base/i18n/date/TimezoneUtils.convertToTimezone as convertToTimezone
|
19
|
+
* @borrows sap/base/i18n/date/TimezoneUtils._getParts as _getParts
|
20
|
+
* @borrows sap/base/i18n/date/TimezoneUtils._getDateFromParts as _getDateFromParts
|
21
|
+
* @borrows sap/base/i18n/date/TimezoneUtils.calculateOffset as calculateOffset
|
22
|
+
* @borrows sap/base/i18n/date/TimezoneUtils.getLocalTimezone as getLocalTimezone
|
23
|
+
*/
|
24
|
+
export default TimezoneUtils;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
const resolve = require("resolve");
|
2
|
+
|
3
|
+
const copyUsedModules = resolve.sync("@ui5/webcomponents-tools/lib/copy-list/index.js");
|
4
|
+
const amdToES6 = resolve.sync("@ui5/webcomponents-tools/lib/amd-to-es6/index.js");
|
5
|
+
const noRequire = resolve.sync("@ui5/webcomponents-tools/lib/amd-to-es6/no-remaining-require.js");
|
6
|
+
|
7
|
+
const scripts = {
|
8
|
+
clean: "rimraf dist",
|
9
|
+
lint: "eslint .",
|
10
|
+
generate: "nps clean copy.used-modules copy.cldr copy.overlay build.amd-to-es6 build.jsonImports",
|
11
|
+
build: {
|
12
|
+
"default": "nps clean copy.used-modules copy.cldr copy.overlay build.amd-to-es6 build.jsonImports build.typescript build.no-remaining-require",
|
13
|
+
"amd-to-es6": `node "${amdToES6}" dist/`,
|
14
|
+
"no-remaining-require": `node "${noRequire}" dist/`,
|
15
|
+
typescript: "tsc --build",
|
16
|
+
jsonImports: "node ./lib/generate-json-imports/cldr.js",
|
17
|
+
},
|
18
|
+
typescript: "tsc --build",
|
19
|
+
copy: {
|
20
|
+
"used-modules": `node "${copyUsedModules}" ./used-modules.txt dist/`,
|
21
|
+
cldr: `node ./lib/copy-and-strip-cldr/index.js "../../node_modules/@openui5/sap.ui.core/src/sap/ui/core/cldr/" dist/generated/assets/cldr/`,
|
22
|
+
overlay: `copy-and-watch "overlay/**/*.js" dist/`,
|
23
|
+
},
|
24
|
+
};
|
25
|
+
|
26
|
+
module.exports = {
|
27
|
+
scripts,
|
28
|
+
};
|
package/package.json
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ui5/webcomponents-localization",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-31ad69297",
|
4
4
|
"description": "Localization for UI5 Web Components",
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
6
6
|
"license": "Apache-2.0",
|
7
|
+
"type": "module",
|
7
8
|
"keywords": [
|
8
9
|
"openui5",
|
9
10
|
"sapui5",
|
@@ -24,17 +25,23 @@
|
|
24
25
|
"lint": "nps lint",
|
25
26
|
"start": "nps start",
|
26
27
|
"build": "nps build",
|
27
|
-
"
|
28
|
+
"generate": "nps generate",
|
29
|
+
"prepublishOnly": "tsc -b"
|
28
30
|
},
|
29
31
|
"devDependencies": {
|
30
|
-
"@
|
31
|
-
"@
|
32
|
-
"
|
32
|
+
"@babel/core": "^7.23.7",
|
33
|
+
"@babel/generator": "^7.23.6",
|
34
|
+
"@babel/parser": "^7.23.6",
|
35
|
+
"@ui5/webcomponents-tools": "0.0.0-31ad69297",
|
36
|
+
"@openui5/sap.ui.core": "1.120.17",
|
37
|
+
"babel-plugin-amd-to-esm": "^2.0.3",
|
38
|
+
"chromedriver": "^126.0.2",
|
39
|
+
"estree-walk": "^2.2.0",
|
33
40
|
"mkdirp": "^1.0.4",
|
34
41
|
"resolve": "^1.20.0"
|
35
42
|
},
|
36
43
|
"dependencies": {
|
37
|
-
"@types/openui5": "^1.
|
38
|
-
"@ui5/webcomponents-base": "0.0.0-
|
44
|
+
"@types/openui5": "^1.113.0",
|
45
|
+
"@ui5/webcomponents-base": "0.0.0-31ad69297"
|
39
46
|
}
|
40
47
|
}
|
package/tsconfig.json
CHANGED
@@ -2,12 +2,23 @@
|
|
2
2
|
"include": ["src/**/*"],
|
3
3
|
"compilerOptions": {
|
4
4
|
"target": "ES2021",
|
5
|
-
|
5
|
+
"lib": ["DOM", "DOM.Iterable", "ES2023"],
|
6
|
+
// Generate d.ts files
|
6
7
|
"declaration": true,
|
7
8
|
"outDir": "dist",
|
8
9
|
"skipLibCheck": true,
|
9
10
|
"sourceMap": true,
|
11
|
+
"inlineSources": true,
|
10
12
|
"strict": true,
|
11
13
|
"moduleResolution": "node",
|
14
|
+
"composite": true,
|
15
|
+
"rootDir": "src",
|
16
|
+
"tsBuildInfoFile": "dist/.tsbuildinfo",
|
17
|
+
"paths": {
|
18
|
+
"@ui5/webcomponents-base/dist/*": ["../base/src/*"],
|
19
|
+
},
|
12
20
|
},
|
21
|
+
"references": [
|
22
|
+
{ "path": "../base" }
|
23
|
+
]
|
13
24
|
}
|
package/used-modules.txt
CHANGED
@@ -1,21 +1,44 @@
|
|
1
1
|
# Needed files from OpenUI5 - the commented ones are currently overlaid, therefore should not be copied
|
2
2
|
|
3
|
-
|
3
|
+
# ./ui5loader-autoconfig.js
|
4
|
+
# sap/base/Log.js
|
5
|
+
sap/base/i18n/Formatting.js
|
4
6
|
sap/base/assert.js
|
7
|
+
# sap/base/config.js
|
8
|
+
sap/base/config/MemoryConfigurationProvider.js
|
9
|
+
sap/base/Event.js
|
10
|
+
sap/base/Eventing.js
|
11
|
+
sap/ui/base/DataType.js
|
12
|
+
sap/base/i18n/LanguageTag.js
|
13
|
+
sap/base/i18n/date/CalendarWeekNumbering.js
|
14
|
+
sap/base/i18n/date/TimezoneUtils.js
|
15
|
+
sap/base/i18n/date/CalendarType.js
|
16
|
+
sap/base/i18n/Localization.js
|
5
17
|
sap/base/strings/formatMessage.js
|
18
|
+
sap/base/strings/camelize.js
|
6
19
|
sap/base/util/ObjectPath.js
|
20
|
+
sap/base/util/resolveReference.js
|
7
21
|
sap/base/util/array/uniqueSort.js
|
8
22
|
sap/base/util/deepEqual.js
|
9
23
|
sap/base/util/isPlainObject.js
|
24
|
+
sap/base/util/isEmptyObject.js
|
10
25
|
sap/base/util/now.js
|
26
|
+
sap/base/util/uid.js
|
11
27
|
sap/base/util/_merge.js
|
12
28
|
sap/base/util/extend.js
|
29
|
+
sap/base/util/deepClone.js
|
30
|
+
sap/base/util/Version.js
|
13
31
|
sap/ui/base/Interface.js
|
14
32
|
sap/ui/base/Metadata.js
|
15
33
|
sap/ui/base/Object.js
|
16
34
|
sap/ui/core/CalendarType.js
|
35
|
+
sap/ui/core/Configuration.js
|
36
|
+
sap/ui/core/Supportability.js
|
17
37
|
sap/ui/core/Locale.js
|
18
38
|
sap/ui/core/LocaleData.js
|
39
|
+
sap/ui/core/Theming.js
|
40
|
+
sap/ui/core/date/CalendarWeekNumbering.js
|
41
|
+
sap/ui/core/date/_Calendars.js
|
19
42
|
sap/ui/core/date/Buddhist.js
|
20
43
|
sap/ui/core/date/CalendarUtils.js
|
21
44
|
sap/ui/core/date/CalendarWeekNumbering.js
|
@@ -23,6 +46,7 @@ sap/ui/core/date/Gregorian.js
|
|
23
46
|
sap/ui/core/date/Islamic.js
|
24
47
|
sap/ui/core/date/Japanese.js
|
25
48
|
sap/ui/core/date/Persian.js
|
49
|
+
sap/ui/core/date/UI5Date.js
|
26
50
|
sap/ui/core/date/UniversalDate.js
|
27
51
|
sap/ui/core/format/TimezoneUtil.js
|
28
52
|
sap/ui/core/format/DateFormat.js
|
package/dist/sap/ui/Device.js
DELETED
package/package-scripts.js
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
const resolve = require("resolve");
|
2
|
-
const copyUsedModules = resolve.sync("@ui5/webcomponents-tools/lib/copy-list/index.js");
|
3
|
-
const replaceGlobalCore = resolve.sync("@ui5/webcomponents-tools/lib/replace-global-core/index.js");
|
4
|
-
const esmAbsToRel = resolve.sync("@ui5/webcomponents-tools/lib/esm-abs-to-rel/index.js");
|
5
|
-
|
6
|
-
const scripts = {
|
7
|
-
clean: "rimraf dist",
|
8
|
-
lint: "eslint . --config config/.eslintrc.js",
|
9
|
-
build: {
|
10
|
-
"default": "nps lint clean copy.used-modules copy.cldr copy.overlay build.replace-amd build.replace-export-true build.replace-export-false build.amd-to-es6 build.replace-global-core-usage build.esm-abs-to-rel build.jsonImports build.typescript copy.src",
|
11
|
-
"replace-amd": "replace-in-file sap.ui.define define dist/**/*.js",
|
12
|
-
"replace-export-true": `replace-in-file ", /* bExport= */ true" "" dist/**/*.js`,
|
13
|
-
"replace-export-false": `replace-in-file ", /* bExport= */ false" "" dist/**/*.js`,
|
14
|
-
"amd-to-es6": "amdtoes6 --src=dist --replace --glob=**/*.js",
|
15
|
-
"replace-global-core-usage": `node "${replaceGlobalCore}" dist/`,
|
16
|
-
"esm-abs-to-rel": `node "${esmAbsToRel}" dist/`,
|
17
|
-
typescript: "tsc",
|
18
|
-
jsonImports: "node ./lib/generate-json-imports/cldr.js"
|
19
|
-
},
|
20
|
-
typescript: "tsc",
|
21
|
-
copy: {
|
22
|
-
"used-modules": `node "${copyUsedModules}" ./used-modules.txt dist/`,
|
23
|
-
cldr: `copy-and-watch "../../node_modules/@openui5/sap.ui.core/src/sap/ui/core/cldr/*.json" dist/generated/assets/cldr/`,
|
24
|
-
overlay: `copy-and-watch "overlay/**/*.js" dist/`,
|
25
|
-
src: `copy-and-watch "src/**/*.js" dist/`,
|
26
|
-
},
|
27
|
-
watch: {
|
28
|
-
default: 'concurrently "nps watch.src" "nps watch.typescript" ',
|
29
|
-
typescript: "tsc --watch",
|
30
|
-
src: `nps "copy.src --watch --skip-initial-copy"`,
|
31
|
-
},
|
32
|
-
start: "nps watch",
|
33
|
-
};
|
34
|
-
|
35
|
-
|
36
|
-
module.exports = {
|
37
|
-
scripts,
|
38
|
-
};
|
package/src/Assets-static.ts
DELETED
package/src/Assets.ts
DELETED
package/src/DateFormat.ts
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
import type DateFormatT from "sap/ui/core/format/DateFormat";
|
2
|
-
// @ts-ignore
|
3
|
-
import DateFormatNative from "./sap/ui/core/format/DateFormat.js";
|
4
|
-
|
5
|
-
const DateFormatWrapped = DateFormatNative as typeof DateFormatT;
|
6
|
-
class DateFormat extends DateFormatWrapped {}
|
7
|
-
|
8
|
-
export default DateFormat;
|
package/src/LocaleData.ts
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
import type LocaleDataOpenUI5T from "sap/ui/core/LocaleData";
|
2
|
-
// @ts-ignore
|
3
|
-
import LocaleDataNative from "./sap/ui/core/LocaleData.js";
|
4
|
-
|
5
|
-
const LocaleDataWrapped = LocaleDataNative as typeof LocaleDataOpenUI5T;
|
6
|
-
class LocaleData extends LocaleDataWrapped {}
|
7
|
-
|
8
|
-
export default LocaleData;
|
@@ -1,232 +0,0 @@
|
|
1
|
-
import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
|
2
|
-
import UniversalDate from "./UniversalDate.js";
|
3
|
-
|
4
|
-
class CalendarDate {
|
5
|
-
_oUDate!: Date | UniversalDate;
|
6
|
-
|
7
|
-
constructor(year?: number | CalendarDate, month?: number | string, date?: number, calendarType?: string) { // eslint-disable-line
|
8
|
-
let aArgs = arguments, // eslint-disable-line
|
9
|
-
oJSDate: Date,
|
10
|
-
oNow: Date,
|
11
|
-
sCalendarType!: CalendarType;
|
12
|
-
|
13
|
-
switch (aArgs.length) {
|
14
|
-
case 0: // defaults to the current date
|
15
|
-
oNow = new Date();
|
16
|
-
return (this.constructor(oNow.getFullYear(), oNow.getMonth(), oNow.getDate()) as CalendarDate);
|
17
|
-
|
18
|
-
case 1: // CalendarDate
|
19
|
-
case 2: // CalendarDate, sCalendarType
|
20
|
-
if (!(aArgs[0] instanceof CalendarDate)) {
|
21
|
-
throw new Error("Invalid arguments: the first argument must be of type CalendarDate.");
|
22
|
-
}
|
23
|
-
sCalendarType = aArgs[1] ? aArgs[1] : (aArgs[0]._oUDate as UniversalDate).sCalendarType;
|
24
|
-
// Use source.valueOf() (returns the same point of time regardless calendar type) instead of
|
25
|
-
// source's getters to avoid non-gregorian Year, Month and Date may be used to construct a Gregorian date
|
26
|
-
oJSDate = new Date(aArgs[0].valueOf());
|
27
|
-
|
28
|
-
// Make this date really local. Now getters are safe.
|
29
|
-
oJSDate.setFullYear(oJSDate.getUTCFullYear(), oJSDate.getUTCMonth(), oJSDate.getUTCDate());
|
30
|
-
oJSDate.setHours(oJSDate.getUTCHours(), oJSDate.getUTCMinutes(), oJSDate.getUTCSeconds(), oJSDate.getUTCMilliseconds());
|
31
|
-
|
32
|
-
this._oUDate = createUniversalUTCDate(oJSDate, sCalendarType);
|
33
|
-
break;
|
34
|
-
|
35
|
-
case 3: // year, month, date
|
36
|
-
case 4: // year, month, date, sCalendarType
|
37
|
-
checkNumericLike(aArgs[0] as number, `Invalid year: ${aArgs[0] as number}`);
|
38
|
-
checkNumericLike(aArgs[1] as number, `Invalid month: ${aArgs[1] as number}`);
|
39
|
-
checkNumericLike(aArgs[2] as number, `Invalid date: ${aArgs[2] as number}`);
|
40
|
-
|
41
|
-
oJSDate = new Date(0, 0, 1);
|
42
|
-
oJSDate.setFullYear(aArgs[0] as number, aArgs[1] as number, aArgs[2] as number); // 2 digits year is not supported. If so, it is considered as full year as well.
|
43
|
-
|
44
|
-
if (aArgs[3]) {
|
45
|
-
sCalendarType = aArgs[3];
|
46
|
-
}
|
47
|
-
this._oUDate = createUniversalUTCDate(oJSDate, sCalendarType);
|
48
|
-
break;
|
49
|
-
|
50
|
-
default:
|
51
|
-
throw new Error(`${"Invalid arguments. Accepted arguments are: 1) oCalendarDate, (optional)calendarType"
|
52
|
-
+ "or 2) year, month, date, (optional) calendarType"}${aArgs as unknown as string}`);
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
getYear() {
|
57
|
-
return this._oUDate.getUTCFullYear();
|
58
|
-
}
|
59
|
-
|
60
|
-
setYear(year: number) {
|
61
|
-
checkNumericLike(year, `Invalid year: ${year}`);
|
62
|
-
this._oUDate.setUTCFullYear(year);
|
63
|
-
return this;
|
64
|
-
}
|
65
|
-
|
66
|
-
getMonth() {
|
67
|
-
return this._oUDate.getUTCMonth();
|
68
|
-
}
|
69
|
-
|
70
|
-
/**
|
71
|
-
* Sets the given month as ordinal month of the year.
|
72
|
-
* @param {int} month An integer between 0 and 11, representing the months January through December( or their
|
73
|
-
* equivalent month names for the given calendar).
|
74
|
-
* If the specified value is is outside of the expected range, this method attempts to update the date information
|
75
|
-
* accordingly. For example, if 12 is given as a month, the year will be incremented by 1, and 1 will be used for month.
|
76
|
-
* @param {int} [date] An integer between 1 and 31, representing the day of the month, but other values are allowed.
|
77
|
-
* 0 will result in the previous month's last day.
|
78
|
-
* -1 will result in the day before the previous month's last day.
|
79
|
-
* 32 will result in:
|
80
|
-
* - first day of the next month if the current month has 31 days.
|
81
|
-
* - second day of the next month if the current month has 30 days.
|
82
|
-
* Other value will result in adding or subtracting days according to the given value.
|
83
|
-
* @returns {sap.ui.unified.calendar.CalendarDate} <code>this</code> for method chaining.
|
84
|
-
*/
|
85
|
-
setMonth(month: number, date?: number) {
|
86
|
-
checkNumericLike(month, `Invalid month: ${month}`);
|
87
|
-
if (date || date === 0) {
|
88
|
-
checkNumericLike(date, `Invalid date: ${date}`);
|
89
|
-
this._oUDate.setUTCMonth(month, date);
|
90
|
-
} else {
|
91
|
-
this._oUDate.setUTCMonth(month);
|
92
|
-
}
|
93
|
-
return this;
|
94
|
-
}
|
95
|
-
|
96
|
-
getDate() {
|
97
|
-
return this._oUDate.getUTCDate();
|
98
|
-
}
|
99
|
-
|
100
|
-
setDate(date: number) {
|
101
|
-
checkNumericLike(date, `Invalid date: ${date}`);
|
102
|
-
this._oUDate.setUTCDate(date);
|
103
|
-
return this;
|
104
|
-
}
|
105
|
-
|
106
|
-
getDay() {
|
107
|
-
return this._oUDate.getUTCDay();
|
108
|
-
}
|
109
|
-
|
110
|
-
getCalendarType() {
|
111
|
-
return (this._oUDate as UniversalDate).sCalendarType;
|
112
|
-
}
|
113
|
-
|
114
|
-
isBefore(oCalendarDate: CalendarDate) {
|
115
|
-
checkCalendarDate(oCalendarDate);
|
116
|
-
return this.valueOf() < oCalendarDate.valueOf();
|
117
|
-
}
|
118
|
-
|
119
|
-
isAfter(oCalendarDate: CalendarDate) {
|
120
|
-
checkCalendarDate(oCalendarDate);
|
121
|
-
return this.valueOf() > oCalendarDate.valueOf();
|
122
|
-
}
|
123
|
-
|
124
|
-
isSameOrBefore(oCalendarDate: CalendarDate) {
|
125
|
-
checkCalendarDate(oCalendarDate);
|
126
|
-
return this.valueOf() <= oCalendarDate.valueOf();
|
127
|
-
}
|
128
|
-
|
129
|
-
isSameOrAfter(oCalendarDate: CalendarDate) {
|
130
|
-
checkCalendarDate(oCalendarDate);
|
131
|
-
return this.valueOf() >= oCalendarDate.valueOf();
|
132
|
-
}
|
133
|
-
|
134
|
-
isSame(oCalendarDate: CalendarDate) {
|
135
|
-
checkCalendarDate(oCalendarDate);
|
136
|
-
return this.valueOf() === oCalendarDate.valueOf();
|
137
|
-
}
|
138
|
-
|
139
|
-
toLocalJSDate() {
|
140
|
-
// Use this._oUDate.getTime()(returns the same point of time regardless calendar type) instead of
|
141
|
-
// this._oUDate's getters to avoid non-gregorian Year, Month and Date to be used to construct a Gregorian date
|
142
|
-
const oLocalDate = new Date(this._oUDate.getTime());
|
143
|
-
|
144
|
-
// Make this date really local. Now getters are safe.
|
145
|
-
oLocalDate.setFullYear(oLocalDate.getUTCFullYear(), oLocalDate.getUTCMonth(), oLocalDate.getUTCDate());
|
146
|
-
oLocalDate.setHours(0, 0, 0, 0);
|
147
|
-
|
148
|
-
return oLocalDate;
|
149
|
-
}
|
150
|
-
|
151
|
-
toUTCJSDate() {
|
152
|
-
// Use this._oUDate.getTime()(returns the same point of time regardless calendar type) instead of
|
153
|
-
// this._oUDate's getters to avoid non-gregorian Year, Month and Date to be used to construct a Gregorian date
|
154
|
-
const oUTCDate = new Date(this._oUDate.getTime());
|
155
|
-
oUTCDate.setUTCHours(0, 0, 0, 0);
|
156
|
-
|
157
|
-
return oUTCDate;
|
158
|
-
}
|
159
|
-
|
160
|
-
toString() {
|
161
|
-
return `${(this._oUDate as UniversalDate).sCalendarType}: ${this.getYear()}/${this.getMonth() + 1}/${this.getDate()}`;
|
162
|
-
}
|
163
|
-
|
164
|
-
valueOf() {
|
165
|
-
return this._oUDate.getTime();
|
166
|
-
}
|
167
|
-
|
168
|
-
static fromLocalJSDate(oJSDate: Date, sCalendarType?: CalendarType) {
|
169
|
-
// Cross frame check for a date should be performed here otherwise setDateValue would fail in OPA tests
|
170
|
-
// because Date object in the test is different than the Date object in the application (due to the iframe).
|
171
|
-
// We can use jQuery.type or this method:
|
172
|
-
function isValidDate(date: Date) {
|
173
|
-
return date && Object.prototype.toString.call(date) === "[object Date]" && !isNaN(date as unknown as number); // eslint-disable-line
|
174
|
-
}
|
175
|
-
if (!isValidDate(oJSDate)) {
|
176
|
-
throw new Error(`Date parameter must be a JavaScript Date object: [${oJSDate as unknown as string}].`);
|
177
|
-
}
|
178
|
-
return new CalendarDate(oJSDate.getFullYear(), oJSDate.getMonth(), oJSDate.getDate(), sCalendarType);
|
179
|
-
}
|
180
|
-
|
181
|
-
static fromTimestamp(iTimestamp: number, sCalendarType?: CalendarType) {
|
182
|
-
const oCalDate = new CalendarDate(0, 0, 1);
|
183
|
-
let oUDate;
|
184
|
-
try {
|
185
|
-
oUDate = UniversalDate.getInstance(new Date(iTimestamp), sCalendarType);
|
186
|
-
} catch (e) {
|
187
|
-
oUDate = new Date(NaN); // UniversalDate.getInstance may now throw an Exception - keep the old behavior
|
188
|
-
}
|
189
|
-
oCalDate._oUDate = oUDate;
|
190
|
-
return oCalDate;
|
191
|
-
}
|
192
|
-
}
|
193
|
-
|
194
|
-
function createUniversalUTCDate(oDate: Date, sCalendarType: CalendarType) {
|
195
|
-
if (sCalendarType) {
|
196
|
-
return UniversalDate.getInstance(createUTCDate(oDate), sCalendarType);
|
197
|
-
}
|
198
|
-
return new UniversalDate(createUTCDate(oDate).getTime());
|
199
|
-
}
|
200
|
-
|
201
|
-
/**
|
202
|
-
* Creates a JavaScript UTC Date corresponding to the given JavaScript Date.
|
203
|
-
* @param {Date} oDate JavaScript date object. Time related information is cut.
|
204
|
-
* @returns {Date} JavaScript date created from the date object, but this time considered as UTC date information.
|
205
|
-
*/
|
206
|
-
function createUTCDate(oDate: Date) {
|
207
|
-
const oUTCDate = new Date(Date.UTC(0, 0, 1));
|
208
|
-
|
209
|
-
oUTCDate.setUTCFullYear(oDate.getFullYear(), oDate.getMonth(), oDate.getDate());
|
210
|
-
|
211
|
-
return oUTCDate;
|
212
|
-
}
|
213
|
-
|
214
|
-
function checkCalendarDate(oCalendarDate: CalendarDate) {
|
215
|
-
if (!(oCalendarDate instanceof CalendarDate)) {
|
216
|
-
throw new Error(`Invalid calendar date: [${oCalendarDate as unknown as string}]. Expected: CalendarDate`);
|
217
|
-
}
|
218
|
-
}
|
219
|
-
|
220
|
-
/**
|
221
|
-
* Verifies the given value is numeric like, i.e. 3, "3" and throws an error if it is not.
|
222
|
-
* @param {any} value The value of any type to check. If null or undefined, this method throws an error.
|
223
|
-
* @param {string} message The message to be used if an error is to be thrown
|
224
|
-
* @throws will throw an error if the value is null or undefined or is not like a number
|
225
|
-
*/
|
226
|
-
function checkNumericLike(value: any, message: string) {
|
227
|
-
if (value === undefined || value === Infinity || isNaN(value)) { // eslint-disable-line
|
228
|
-
throw message;
|
229
|
-
}
|
230
|
-
}
|
231
|
-
|
232
|
-
export default CalendarDate;
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
|
2
|
-
import CalendarDate from "./CalendarDate.js";
|
3
|
-
|
4
|
-
const cache = new Map<string, CalendarDate>();
|
5
|
-
|
6
|
-
const getMinCalendarDate = (primaryCalendarType: CalendarType) => {
|
7
|
-
const key = `min ${primaryCalendarType}`;
|
8
|
-
|
9
|
-
if (!cache.has(key)) {
|
10
|
-
const minDate = new CalendarDate(1, 0, 1, primaryCalendarType);
|
11
|
-
minDate.setYear(1);
|
12
|
-
minDate.setMonth(0);
|
13
|
-
minDate.setDate(1);
|
14
|
-
cache.set(key, minDate);
|
15
|
-
}
|
16
|
-
|
17
|
-
return cache.get(key)!;
|
18
|
-
};
|
19
|
-
|
20
|
-
const getMaxCalendarDate = (primaryCalendarType: CalendarType) => {
|
21
|
-
const key = `max ${primaryCalendarType}`;
|
22
|
-
|
23
|
-
if (!cache.has(key)) {
|
24
|
-
const maxDate = new CalendarDate(1, 0, 1, primaryCalendarType);
|
25
|
-
maxDate.setYear(9999);
|
26
|
-
maxDate.setMonth(11);
|
27
|
-
const tempDate = new CalendarDate(maxDate, primaryCalendarType);
|
28
|
-
tempDate.setDate(1);
|
29
|
-
tempDate.setMonth(tempDate.getMonth() + 1, 0);
|
30
|
-
maxDate.setDate(tempDate.getDate());// 31st for Gregorian Calendar
|
31
|
-
cache.set(key, maxDate);
|
32
|
-
}
|
33
|
-
|
34
|
-
return cache.get(key)!;
|
35
|
-
};
|
36
|
-
|
37
|
-
export {
|
38
|
-
getMinCalendarDate,
|
39
|
-
getMaxCalendarDate,
|
40
|
-
};
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
|
2
|
-
// @ts-ignore
|
3
|
-
import UniversalDateNative from "../sap/ui/core/date/UniversalDate.js";
|
4
|
-
|
5
|
-
type UniversalDate = {
|
6
|
-
new (time: number): UniversalDate;
|
7
|
-
oDate: Date,
|
8
|
-
sCalendarType: string,
|
9
|
-
getInstance: (oDate: Date, sCalendarType?: CalendarType) => UniversalDate,
|
10
|
-
getDate: () => number,
|
11
|
-
getMonth: () => number,
|
12
|
-
getFullYear: () => number,
|
13
|
-
getYear: () => number,
|
14
|
-
getDay: () => number,
|
15
|
-
getHours: () => number,
|
16
|
-
getMinutes: () => number,
|
17
|
-
getSeconds: () => number,
|
18
|
-
getMilliseconds: () => number,
|
19
|
-
getUTCDate: () => number,
|
20
|
-
getUTCMonth: () => number,
|
21
|
-
getUTCFullYear: () => number,
|
22
|
-
getUTCDay: () => number,
|
23
|
-
getUTCHours: () => number,
|
24
|
-
getUTCMinutes: () => number,
|
25
|
-
getUTCSeconds: () => number,
|
26
|
-
getUTCMilliseconds: () => number,
|
27
|
-
getTime: () => number,
|
28
|
-
valueOf: () => number,
|
29
|
-
getTimezoneOffset: () => number,
|
30
|
-
toString: () => string,
|
31
|
-
toDateString: () => string,
|
32
|
-
setDate: (dayValue: number) => number,
|
33
|
-
setFullYear: (yearValue: number, monthValue?: number, dateValue?: number) => number,
|
34
|
-
setYear: (yearValue: number) => number,
|
35
|
-
setMonth: (monthValue: number, dayValue?: number) => number,
|
36
|
-
setHours: (hoursValue: number, minutesValue?: number, secondsValue?: number, msValue?: number) => number,
|
37
|
-
setMinutes: (minutesValue: number, secondsValue?: number, msValue?: number) => number,
|
38
|
-
setSeconds: (secondsValue: number, msValue?: number) => number,
|
39
|
-
setMilliseconds: (setMilliseconds: number) => number,
|
40
|
-
setUTCDate:(dayValue: number) => number,
|
41
|
-
setUTCFullYear: (yearValue: number, monthValue?: number, dayValue?: number) => number,
|
42
|
-
setUTCMonth: (monthValue: number, dayValue?: number) => number,
|
43
|
-
setUTCHours: (hoursValue: number, minutesValue?: number, secondsValue?: number, msValue?: number) => number,
|
44
|
-
setUTCMinutes: (minutesValue: number, secondsValue?: number, msValue?: number) => number,
|
45
|
-
setUTCSeconds: (secondsValue: number, msValue?: number) => number,
|
46
|
-
setUTCMilliseconds: (setMilliseconds: number) => number,
|
47
|
-
}
|
48
|
-
|
49
|
-
const UniversalDate: UniversalDate = UniversalDateNative;
|
50
|
-
|
51
|
-
export default UniversalDate;
|