@ui5/webcomponents-localization 0.0.0-a7032d86e → 0.0.0-a8a75c830

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.
Files changed (243) hide show
  1. package/.eslintignore +2 -1
  2. package/.npsrc.json +3 -0
  3. package/CHANGELOG.md +2025 -0
  4. package/LICENSE.txt +201 -0
  5. package/README.md +7 -9
  6. package/dist/.tsbuildinfo +1 -0
  7. package/dist/Assets-fetch.d.ts +1 -0
  8. package/dist/Assets-fetch.js +3 -0
  9. package/dist/Assets-fetch.js.map +1 -0
  10. package/dist/Assets-node.d.ts +11 -0
  11. package/dist/Assets-node.js +12 -0
  12. package/dist/Assets-node.js.map +1 -0
  13. package/dist/Assets.js.map +1 -1
  14. package/dist/CalendarUtils.d.ts +3 -0
  15. package/dist/CalendarUtils.js +6 -0
  16. package/dist/CalendarUtils.js.map +1 -0
  17. package/dist/DateFormat.d.ts +0 -1
  18. package/dist/DateFormat.js.map +1 -1
  19. package/dist/LocaleData.d.ts +0 -1
  20. package/dist/LocaleData.js.map +1 -1
  21. package/dist/NumberFormat.d.ts +5 -0
  22. package/dist/NumberFormat.js +7 -0
  23. package/dist/NumberFormat.js.map +1 -0
  24. package/dist/dates/CalendarDate.d.ts +6 -5
  25. package/dist/dates/CalendarDate.js +8 -7
  26. package/dist/dates/CalendarDate.js.map +1 -1
  27. package/dist/dates/ExtremeDates.d.ts +3 -3
  28. package/dist/dates/ExtremeDates.js.map +1 -1
  29. package/dist/dates/UI5Date.d.ts +5 -0
  30. package/dist/dates/UI5Date.js +7 -0
  31. package/dist/dates/UI5Date.js.map +1 -0
  32. package/dist/dates/UniversalDate.d.ts +2 -1
  33. package/dist/dates/UniversalDate.js.map +1 -1
  34. package/dist/dates/convertMonthNumbersToMonthNames.d.ts +1 -1
  35. package/dist/dates/convertMonthNumbersToMonthNames.js.map +1 -1
  36. package/dist/dates/getDaysInMonth.js.map +1 -1
  37. package/dist/dates/getRoundedTimestamp.js +1 -0
  38. package/dist/dates/getRoundedTimestamp.js.map +1 -1
  39. package/dist/dates/getTodayUTCTimestamp.d.ts +1 -1
  40. package/dist/dates/getTodayUTCTimestamp.js +2 -1
  41. package/dist/dates/getTodayUTCTimestamp.js.map +1 -1
  42. package/dist/dates/modifyDateBy.d.ts +2 -1
  43. package/dist/dates/modifyDateBy.js +34 -19
  44. package/dist/dates/modifyDateBy.js.map +1 -1
  45. package/dist/dates/transformDateToSecondaryType.d.ts +1 -1
  46. package/dist/dates/transformDateToSecondaryType.js +3 -2
  47. package/dist/dates/transformDateToSecondaryType.js.map +1 -1
  48. package/dist/features/calendar/Buddhist.js.map +1 -1
  49. package/dist/features/calendar/Gregorian.js.map +1 -1
  50. package/dist/features/calendar/Islamic.js.map +1 -1
  51. package/dist/features/calendar/Japanese.js.map +1 -1
  52. package/dist/features/calendar/Persian.js.map +1 -1
  53. package/dist/generated/assets/cldr/Unicode-Data-Files-LICENSE.txt +27 -0
  54. package/dist/generated/assets/cldr/ar.json +908 -527
  55. package/dist/generated/assets/cldr/ar_EG.json +908 -527
  56. package/dist/generated/assets/cldr/ar_SA.json +1003 -623
  57. package/dist/generated/assets/cldr/bg.json +902 -665
  58. package/dist/generated/assets/cldr/ca.json +845 -557
  59. package/dist/generated/assets/cldr/cnr.json +6169 -0
  60. package/dist/generated/assets/cldr/cs.json +823 -410
  61. package/dist/generated/assets/cldr/cy.json +964 -646
  62. package/dist/generated/assets/cldr/da.json +818 -544
  63. package/dist/generated/assets/cldr/de.json +710 -377
  64. package/dist/generated/assets/cldr/de_AT.json +700 -367
  65. package/dist/generated/assets/cldr/de_CH.json +719 -386
  66. package/dist/generated/assets/cldr/el.json +548 -297
  67. package/dist/generated/assets/cldr/el_CY.json +548 -297
  68. package/dist/generated/assets/cldr/en.json +861 -551
  69. package/dist/generated/assets/cldr/en_AU.json +1006 -648
  70. package/dist/generated/assets/cldr/en_GB.json +870 -530
  71. package/dist/generated/assets/cldr/en_HK.json +963 -620
  72. package/dist/generated/assets/cldr/en_IE.json +928 -588
  73. package/dist/generated/assets/cldr/en_IN.json +911 -567
  74. package/dist/generated/assets/cldr/en_NZ.json +947 -607
  75. package/dist/generated/assets/cldr/en_PG.json +948 -608
  76. package/dist/generated/assets/cldr/en_SG.json +937 -594
  77. package/dist/generated/assets/cldr/en_ZA.json +925 -585
  78. package/dist/generated/assets/cldr/es.json +1171 -711
  79. package/dist/generated/assets/cldr/es_AR.json +1114 -653
  80. package/dist/generated/assets/cldr/es_BO.json +1156 -695
  81. package/dist/generated/assets/cldr/es_CL.json +997 -644
  82. package/dist/generated/assets/cldr/es_CO.json +916 -562
  83. package/dist/generated/assets/cldr/es_MX.json +1325 -864
  84. package/dist/generated/assets/cldr/es_PE.json +841 -596
  85. package/dist/generated/assets/cldr/es_UY.json +869 -624
  86. package/dist/generated/assets/cldr/es_VE.json +888 -643
  87. package/dist/generated/assets/cldr/et.json +664 -368
  88. package/dist/generated/assets/cldr/fa.json +791 -490
  89. package/dist/generated/assets/cldr/fi.json +733 -344
  90. package/dist/generated/assets/cldr/fr.json +687 -433
  91. package/dist/generated/assets/cldr/fr_BE.json +684 -430
  92. package/dist/generated/assets/cldr/fr_CA.json +810 -556
  93. package/dist/generated/assets/cldr/fr_CH.json +627 -373
  94. package/dist/generated/assets/cldr/fr_LU.json +687 -433
  95. package/dist/generated/assets/cldr/he.json +909 -545
  96. package/dist/generated/assets/cldr/hi.json +493 -194
  97. package/dist/generated/assets/cldr/hr.json +1009 -496
  98. package/dist/generated/assets/cldr/hu.json +562 -305
  99. package/dist/generated/assets/cldr/id.json +880 -572
  100. package/dist/generated/assets/cldr/it.json +738 -466
  101. package/dist/generated/assets/cldr/it_CH.json +738 -466
  102. package/dist/generated/assets/cldr/ja.json +349 -88
  103. package/dist/generated/assets/cldr/kk.json +1033 -583
  104. package/dist/generated/assets/cldr/ko.json +407 -173
  105. package/dist/generated/assets/cldr/lt.json +621 -288
  106. package/dist/generated/assets/cldr/lv.json +613 -375
  107. package/dist/generated/assets/cldr/mk.json +6045 -0
  108. package/dist/generated/assets/cldr/ms.json +869 -552
  109. package/dist/generated/assets/cldr/nb.json +529 -236
  110. package/dist/generated/assets/cldr/nl.json +1019 -432
  111. package/dist/generated/assets/cldr/nl_BE.json +1019 -432
  112. package/dist/generated/assets/cldr/pl.json +1107 -492
  113. package/dist/generated/assets/cldr/pt.json +1171 -625
  114. package/dist/generated/assets/cldr/pt_PT.json +1112 -636
  115. package/dist/generated/assets/cldr/ro.json +835 -489
  116. package/dist/generated/assets/cldr/ru.json +850 -518
  117. package/dist/generated/assets/cldr/ru_UA.json +844 -512
  118. package/dist/generated/assets/cldr/sk.json +833 -569
  119. package/dist/generated/assets/cldr/sl.json +741 -435
  120. package/dist/generated/assets/cldr/sr.json +700 -349
  121. package/dist/generated/assets/cldr/sr_Latn.json +1329 -994
  122. package/dist/generated/assets/cldr/sv.json +746 -446
  123. package/dist/generated/assets/cldr/th.json +484 -238
  124. package/dist/generated/assets/cldr/tr.json +721 -438
  125. package/dist/generated/assets/cldr/uk.json +884 -547
  126. package/dist/generated/assets/cldr/vi.json +662 -430
  127. package/dist/generated/assets/cldr/zh_CN.json +631 -345
  128. package/dist/generated/assets/cldr/zh_HK.json +602 -315
  129. package/dist/generated/assets/cldr/zh_SG.json +607 -320
  130. package/dist/generated/assets/cldr/zh_TW.json +459 -193
  131. package/dist/generated/json-imports/LocaleData-fetch.d.ts +1 -0
  132. package/dist/generated/json-imports/LocaleData-fetch.js +93 -0
  133. package/dist/generated/json-imports/LocaleData-fetch.js.map +1 -0
  134. package/dist/generated/json-imports/LocaleData-node.d.ts +1 -0
  135. package/dist/generated/json-imports/LocaleData-node.js +93 -0
  136. package/dist/generated/json-imports/LocaleData-node.js.map +1 -0
  137. package/dist/generated/json-imports/LocaleData.d.ts +1 -0
  138. package/dist/generated/json-imports/LocaleData.js +89 -89
  139. package/dist/generated/json-imports/LocaleData.js.map +1 -0
  140. package/dist/getCachedLocaleDataInstance.js.map +1 -1
  141. package/dist/locale/getLocaleData.js.map +1 -1
  142. package/dist/sap/base/Event.js +59 -0
  143. package/dist/sap/base/Eventing.js +146 -0
  144. package/dist/sap/base/Log.js +2 -239
  145. package/dist/sap/base/assert.js +28 -1
  146. package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
  147. package/dist/sap/base/config.js +17 -0
  148. package/dist/sap/base/i18n/Formatting.d.ts +8 -0
  149. package/dist/sap/base/i18n/Formatting.js +11 -0
  150. package/dist/sap/base/i18n/Formatting.js.map +1 -0
  151. package/dist/sap/base/i18n/LanguageTag.js +173 -0
  152. package/dist/sap/base/i18n/Localization.d.ts +4 -0
  153. package/dist/sap/base/i18n/Localization.js +12 -0
  154. package/dist/sap/base/i18n/Localization.js.map +1 -0
  155. package/dist/sap/base/i18n/date/CalendarType.js +43 -0
  156. package/dist/sap/base/i18n/date/CalendarWeekNumbering.js +105 -0
  157. package/dist/sap/base/i18n/date/TimezoneUtils.js +319 -0
  158. package/dist/sap/base/strings/camelize.js +30 -0
  159. package/dist/sap/base/strings/formatMessage.js +88 -15
  160. package/dist/sap/base/util/LoaderExtensions.js.map +1 -1
  161. package/dist/sap/base/util/ObjectPath.d.ts +4 -0
  162. package/dist/sap/base/util/ObjectPath.js +4 -33
  163. package/dist/sap/base/util/ObjectPath.js.map +1 -0
  164. package/dist/sap/base/util/Version.js +157 -0
  165. package/dist/sap/base/util/_merge.js +83 -26
  166. package/dist/sap/base/util/array/uniqueSort.js +37 -15
  167. package/dist/sap/base/util/deepClone.js +102 -0
  168. package/dist/sap/base/util/deepEqual.js +75 -51
  169. package/dist/sap/base/util/extend.js +58 -7
  170. package/dist/sap/base/util/isEmptyObject.js +34 -0
  171. package/dist/sap/base/util/isPlainObject.js +35 -1
  172. package/dist/sap/base/util/now.js +24 -3
  173. package/dist/sap/base/util/resolveReference.js +3 -0
  174. package/dist/sap/base/util/uid.js +27 -0
  175. package/dist/sap/ui/base/DataType.js +657 -0
  176. package/dist/sap/ui/base/Interface.js +47 -1
  177. package/dist/sap/ui/base/Metadata.js +435 -171
  178. package/dist/sap/ui/base/Object.js +284 -48
  179. package/dist/sap/ui/core/CalendarType.js +24 -8
  180. package/dist/sap/ui/core/Configuration.d.ts +2 -2
  181. package/dist/sap/ui/core/Configuration.js +4 -1
  182. package/dist/sap/ui/core/Configuration.js.map +1 -1
  183. package/dist/sap/ui/core/Core.d.ts +3 -4
  184. package/dist/sap/ui/core/Core.js.map +1 -1
  185. package/dist/sap/ui/core/FormatSettings.d.ts +1 -2
  186. package/dist/sap/ui/core/FormatSettings.js +0 -1
  187. package/dist/sap/ui/core/FormatSettings.js.map +1 -1
  188. package/dist/sap/ui/core/Locale.js +190 -155
  189. package/dist/sap/ui/core/LocaleData.js +2662 -1300
  190. package/dist/sap/ui/core/Supportability.js +5 -0
  191. package/dist/sap/ui/core/Theming.js +539 -0
  192. package/dist/sap/ui/core/date/Buddhist.js +162 -87
  193. package/dist/sap/ui/core/date/CalendarUtils.js +61 -32
  194. package/dist/sap/ui/core/date/CalendarWeekNumbering.js +30 -7
  195. package/dist/sap/ui/core/date/Gregorian.js +25 -10
  196. package/dist/sap/ui/core/date/Islamic.js +298 -185
  197. package/dist/sap/ui/core/date/Japanese.js +210 -115
  198. package/dist/sap/ui/core/date/Persian.js +324 -195
  199. package/dist/sap/ui/core/date/UI5Date.js +991 -0
  200. package/dist/sap/ui/core/date/UniversalDate.js +1238 -255
  201. package/dist/sap/ui/core/date/_Calendars.js +10 -1
  202. package/dist/sap/ui/core/format/DateFormat.js +3167 -2093
  203. package/dist/sap/ui/core/format/NumberFormat.js +2835 -0
  204. package/dist/sap/ui/core/format/TimezoneUtil.js +24 -94
  205. package/package-scripts.cjs +35 -0
  206. package/package.json +21 -15
  207. package/tsconfig.json +20 -9
  208. package/used-modules.txt +26 -2
  209. package/dist/Assets-static.d.ts +0 -1
  210. package/dist/Assets-static.js +0 -3
  211. package/dist/Assets-static.js.map +0 -1
  212. package/dist/dates/calculateWeekNumber.d.ts +0 -4
  213. package/dist/dates/calculateWeekNumber.js +0 -45
  214. package/dist/dates/calculateWeekNumber.js.map +0 -1
  215. package/dist/generated/json-imports/LocaleData-static.js +0 -90
  216. package/dist/sap/ui/Device.js +0 -5
  217. package/package-scripts.js +0 -38
  218. package/src/Assets-static.ts +0 -2
  219. package/src/Assets.ts +0 -2
  220. package/src/DateFormat.ts +0 -8
  221. package/src/LocaleData.ts +0 -8
  222. package/src/dates/CalendarDate.ts +0 -232
  223. package/src/dates/ExtremeDates.ts +0 -40
  224. package/src/dates/UniversalDate.ts +0 -51
  225. package/src/dates/calculateWeekNumber.ts +0 -53
  226. package/src/dates/convertMonthNumbersToMonthNames.ts +0 -34
  227. package/src/dates/getDaysInMonth.ts +0 -11
  228. package/src/dates/getRoundedTimestamp.ts +0 -14
  229. package/src/dates/getTodayUTCTimestamp.ts +0 -10
  230. package/src/dates/modifyDateBy.ts +0 -42
  231. package/src/dates/transformDateToSecondaryType.ts +0 -21
  232. package/src/features/calendar/Buddhist.ts +0 -1
  233. package/src/features/calendar/Gregorian.ts +0 -1
  234. package/src/features/calendar/Islamic.ts +0 -1
  235. package/src/features/calendar/Japanese.ts +0 -1
  236. package/src/features/calendar/Persian.ts +0 -1
  237. package/src/getCachedLocaleDataInstance.ts +0 -15
  238. package/src/locale/getLocaleData.ts +0 -28
  239. package/src/sap/base/util/LoaderExtensions.ts +0 -17
  240. package/src/sap/ui/core/Configuration.ts +0 -22
  241. package/src/sap/ui/core/Core.ts +0 -15
  242. package/src/sap/ui/core/FormatSettings.ts +0 -15
  243. /package/{config/.eslintrc.js → .eslintrc.cjs} +0 -0
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The `Assets-node` entry point is used to import CLDR assets.
3
+ *
4
+ * It serves as an alternative to the `Assets` and `Assets-fetch` modules and supports
5
+ * the `with: { type: 'json' }` import attribute for loading JSON files.
6
+ * This import attribute is required in some environments, such as Node.js with server-side rendering (SSR).
7
+ *
8
+ * Example usage:
9
+ * await import("../assets/i18n/messagebundle_bg.json", { with: { type: 'json' } })
10
+ */
11
+ import "./generated/json-imports/LocaleData-node.js";
12
+ //# sourceMappingURL=Assets-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Assets-node.js","sourceRoot":"","sources":["../src/Assets-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,6CAA6C,CAAC","sourcesContent":["/**\n * The `Assets-node` entry point is used to import CLDR assets.\n *\n * It serves as an alternative to the `Assets` and `Assets-fetch` modules and supports\n * the `with: { type: 'json' }` import attribute for loading JSON files.\n * This import attribute is required in some environments, such as Node.js with server-side rendering (SSR).\n *\n * Example usage:\n * await import(\"../assets/i18n/messagebundle_bg.json\", { with: { type: 'json' } })\n */\n\nimport \"./generated/json-imports/LocaleData-node.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Assets.js","sourceRoot":"","sources":["../src/Assets.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,wCAAwC,CAAC"}
1
+ {"version":3,"file":"Assets.js","sourceRoot":"","sources":["../src/Assets.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,wCAAwC,CAAC","sourcesContent":["// Currently the base package provides CLDR assets only\nimport \"./generated/json-imports/LocaleData.js\";\n"]}
@@ -0,0 +1,3 @@
1
+ import type CaledndarUtilsOpenui5T from "sap/ui/core/date/CalendarUtils";
2
+ declare const CalendarUtils: CaledndarUtilsOpenui5T;
3
+ export default CalendarUtils;
@@ -0,0 +1,6 @@
1
+ // @ts-ignore
2
+ import CalendarUtilsNative from "./sap/ui/core/date/CalendarUtils.js";
3
+ const CalendarUtilsWrapped = CalendarUtilsNative;
4
+ const CalendarUtils = CalendarUtilsWrapped;
5
+ export default CalendarUtils;
6
+ //# sourceMappingURL=CalendarUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarUtils.js","sourceRoot":"","sources":["../src/CalendarUtils.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,mBAAmB,MAAM,qCAAqC,CAAC;AAEtE,MAAM,oBAAoB,GAAG,mBAAoD,CAAC;AAClF,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAE3C,eAAe,aAAa,CAAC","sourcesContent":["import type CaledndarUtilsOpenui5T from \"sap/ui/core/date/CalendarUtils\";\n// @ts-ignore\nimport CalendarUtilsNative from \"./sap/ui/core/date/CalendarUtils.js\";\n\nconst CalendarUtilsWrapped = CalendarUtilsNative as typeof CaledndarUtilsOpenui5T;\nconst CalendarUtils = CalendarUtilsWrapped;\n\nexport default CalendarUtils;\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="openui5" />
2
1
  import type DateFormatT from "sap/ui/core/format/DateFormat";
3
2
  declare const DateFormatWrapped: typeof DateFormatT;
4
3
  declare class DateFormat extends DateFormatWrapped {
@@ -1 +1 @@
1
- {"version":3,"file":"DateFormat.js","sourceRoot":"","sources":["../src/DateFormat.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAElE,MAAM,iBAAiB,GAAG,gBAAsC,CAAC;AACjE,MAAM,UAAW,SAAQ,iBAAiB;CAAG;AAE7C,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"DateFormat.js","sourceRoot":"","sources":["../src/DateFormat.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAElE,MAAM,iBAAiB,GAAG,gBAAsC,CAAC;AACjE,MAAM,UAAW,SAAQ,iBAAiB;CAAG;AAE7C,eAAe,UAAU,CAAC","sourcesContent":["import type DateFormatT from \"sap/ui/core/format/DateFormat\";\n// @ts-ignore\nimport DateFormatNative from \"./sap/ui/core/format/DateFormat.js\";\n\nconst DateFormatWrapped = DateFormatNative as typeof DateFormatT;\nclass DateFormat extends DateFormatWrapped {}\n\nexport default DateFormat;\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="openui5" />
2
1
  import type LocaleDataOpenUI5T from "sap/ui/core/LocaleData";
3
2
  declare const LocaleDataWrapped: typeof LocaleDataOpenUI5T;
4
3
  declare class LocaleData extends LocaleDataWrapped {
@@ -1 +1 @@
1
- {"version":3,"file":"LocaleData.js","sourceRoot":"","sources":["../src/LocaleData.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D,MAAM,iBAAiB,GAAG,gBAA6C,CAAC;AACxE,MAAM,UAAW,SAAQ,iBAAiB;CAAG;AAE7C,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"LocaleData.js","sourceRoot":"","sources":["../src/LocaleData.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D,MAAM,iBAAiB,GAAG,gBAA6C,CAAC;AACxE,MAAM,UAAW,SAAQ,iBAAiB;CAAG;AAE7C,eAAe,UAAU,CAAC","sourcesContent":["import type LocaleDataOpenUI5T from \"sap/ui/core/LocaleData\";\n// @ts-ignore\nimport LocaleDataNative from \"./sap/ui/core/LocaleData.js\";\n\nconst LocaleDataWrapped = LocaleDataNative as typeof LocaleDataOpenUI5T;\nclass LocaleData extends LocaleDataWrapped {}\n\nexport default LocaleData;\n"]}
@@ -0,0 +1,5 @@
1
+ import type NumberFormatT from "sap/ui/core/format/NumberFormat";
2
+ declare const NumberFormatWrapped: typeof NumberFormatT;
3
+ declare class NumberFormat extends NumberFormatWrapped {
4
+ }
5
+ export default NumberFormat;
@@ -0,0 +1,7 @@
1
+ // @ts-ignore
2
+ import NumberFormatNative from "./sap/ui/core/format/NumberFormat.js";
3
+ const NumberFormatWrapped = NumberFormatNative;
4
+ class NumberFormat extends NumberFormatWrapped {
5
+ }
6
+ export default NumberFormat;
7
+ //# sourceMappingURL=NumberFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberFormat.js","sourceRoot":"","sources":["../src/NumberFormat.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,kBAAkB,MAAM,sCAAsC,CAAC;AAEtE,MAAM,mBAAmB,GAAG,kBAA0C,CAAC;AACvE,MAAM,YAAa,SAAQ,mBAAmB;CAAG;AAEjD,eAAe,YAAY,CAAC","sourcesContent":["import type NumberFormatT from \"sap/ui/core/format/NumberFormat\";\n// @ts-ignore\nimport NumberFormatNative from \"./sap/ui/core/format/NumberFormat.js\";\n\nconst NumberFormatWrapped = NumberFormatNative as typeof NumberFormatT;\nclass NumberFormat extends NumberFormatWrapped {}\n\nexport default NumberFormat;\n"]}
@@ -1,7 +1,8 @@
1
1
  import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
2
+ import UI5Date from "./UI5Date.js";
2
3
  import UniversalDate from "./UniversalDate.js";
3
4
  declare class CalendarDate {
4
- _oUDate: Date | UniversalDate;
5
+ _oUDate: UI5Date | Date | UniversalDate;
5
6
  constructor(year?: number | CalendarDate, month?: number | string, date?: number, calendarType?: string);
6
7
  getYear(): number;
7
8
  setYear(year: number): this;
@@ -31,11 +32,11 @@ declare class CalendarDate {
31
32
  isSameOrBefore(oCalendarDate: CalendarDate): boolean;
32
33
  isSameOrAfter(oCalendarDate: CalendarDate): boolean;
33
34
  isSame(oCalendarDate: CalendarDate): boolean;
34
- toLocalJSDate(): Date;
35
- toUTCJSDate(): Date;
35
+ toLocalJSDate(): import("sap/ui/core/date/UI5Date").default | Date;
36
+ toUTCJSDate(): import("sap/ui/core/date/UI5Date").default | Date;
36
37
  toString(): string;
37
38
  valueOf(): number;
38
- static fromLocalJSDate(oJSDate: Date, sCalendarType?: CalendarType): CalendarDate;
39
- static fromTimestamp(iTimestamp: number, sCalendarType?: CalendarType): CalendarDate;
39
+ static fromLocalJSDate(oJSDate: Date | UI5Date, sCalendarType?: `${CalendarType}`): CalendarDate;
40
+ static fromTimestamp(iTimestamp: number, sCalendarType?: `${CalendarType}`): CalendarDate;
40
41
  }
41
42
  export default CalendarDate;
@@ -1,3 +1,4 @@
1
+ import UI5Date from "./UI5Date.js";
1
2
  import UniversalDate from "./UniversalDate.js";
2
3
  class CalendarDate {
3
4
  constructor(year, month, date, calendarType) {
@@ -5,7 +6,7 @@ class CalendarDate {
5
6
  oJSDate, oNow, sCalendarType;
6
7
  switch (aArgs.length) {
7
8
  case 0: // defaults to the current date
8
- oNow = new Date();
9
+ oNow = UI5Date.getInstance();
9
10
  return this.constructor(oNow.getFullYear(), oNow.getMonth(), oNow.getDate());
10
11
  case 1: // CalendarDate
11
12
  case 2: // CalendarDate, sCalendarType
@@ -15,7 +16,7 @@ class CalendarDate {
15
16
  sCalendarType = aArgs[1] ? aArgs[1] : aArgs[0]._oUDate.sCalendarType;
16
17
  // Use source.valueOf() (returns the same point of time regardless calendar type) instead of
17
18
  // source's getters to avoid non-gregorian Year, Month and Date may be used to construct a Gregorian date
18
- oJSDate = new Date(aArgs[0].valueOf());
19
+ oJSDate = UI5Date.getInstance(aArgs[0].valueOf());
19
20
  // Make this date really local. Now getters are safe.
20
21
  oJSDate.setFullYear(oJSDate.getUTCFullYear(), oJSDate.getUTCMonth(), oJSDate.getUTCDate());
21
22
  oJSDate.setHours(oJSDate.getUTCHours(), oJSDate.getUTCMinutes(), oJSDate.getUTCSeconds(), oJSDate.getUTCMilliseconds());
@@ -26,7 +27,7 @@ class CalendarDate {
26
27
  checkNumericLike(aArgs[0], `Invalid year: ${aArgs[0]}`);
27
28
  checkNumericLike(aArgs[1], `Invalid month: ${aArgs[1]}`);
28
29
  checkNumericLike(aArgs[2], `Invalid date: ${aArgs[2]}`);
29
- oJSDate = new Date(0, 0, 1);
30
+ oJSDate = UI5Date.getInstance(0, 0, 1);
30
31
  oJSDate.setFullYear(aArgs[0], aArgs[1], aArgs[2]); // 2 digits year is not supported. If so, it is considered as full year as well.
31
32
  if (aArgs[3]) {
32
33
  sCalendarType = aArgs[3];
@@ -112,7 +113,7 @@ class CalendarDate {
112
113
  toLocalJSDate() {
113
114
  // Use this._oUDate.getTime()(returns the same point of time regardless calendar type) instead of
114
115
  // this._oUDate's getters to avoid non-gregorian Year, Month and Date to be used to construct a Gregorian date
115
- const oLocalDate = new Date(this._oUDate.getTime());
116
+ const oLocalDate = UI5Date.getInstance(this._oUDate.getTime());
116
117
  // Make this date really local. Now getters are safe.
117
118
  oLocalDate.setFullYear(oLocalDate.getUTCFullYear(), oLocalDate.getUTCMonth(), oLocalDate.getUTCDate());
118
119
  oLocalDate.setHours(0, 0, 0, 0);
@@ -121,7 +122,7 @@ class CalendarDate {
121
122
  toUTCJSDate() {
122
123
  // Use this._oUDate.getTime()(returns the same point of time regardless calendar type) instead of
123
124
  // this._oUDate's getters to avoid non-gregorian Year, Month and Date to be used to construct a Gregorian date
124
- const oUTCDate = new Date(this._oUDate.getTime());
125
+ const oUTCDate = UI5Date.getInstance(this._oUDate.getTime());
125
126
  oUTCDate.setUTCHours(0, 0, 0, 0);
126
127
  return oUTCDate;
127
128
  }
@@ -147,7 +148,7 @@ class CalendarDate {
147
148
  const oCalDate = new CalendarDate(0, 0, 1);
148
149
  let oUDate;
149
150
  try {
150
- oUDate = UniversalDate.getInstance(new Date(iTimestamp), sCalendarType);
151
+ oUDate = UniversalDate.getInstance(UI5Date.getInstance(iTimestamp), sCalendarType);
151
152
  }
152
153
  catch (e) {
153
154
  oUDate = new Date(NaN); // UniversalDate.getInstance may now throw an Exception - keep the old behavior
@@ -168,7 +169,7 @@ function createUniversalUTCDate(oDate, sCalendarType) {
168
169
  * @returns {Date} JavaScript date created from the date object, but this time considered as UTC date information.
169
170
  */
170
171
  function createUTCDate(oDate) {
171
- const oUTCDate = new Date(Date.UTC(0, 0, 1));
172
+ const oUTCDate = new Date(Date.UTC(0, 0, 1)); // no need to replace with UI5Date as we are creating a new UTC date object
172
173
  oUTCDate.setUTCFullYear(oDate.getFullYear(), oDate.getMonth(), oDate.getDate());
173
174
  return oUTCDate;
174
175
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarDate.js","sourceRoot":"","sources":["../../src/dates/CalendarDate.ts"],"names":[],"m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AAC;IACvE,CAAC;IACD,OAAO,IAAI,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa,CAAC,KAAqB;IAC3C,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,2EAA2E;IAEzH,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEhF,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED,SAAS,iBAAiB,CAAC,aAA2B;IACrD,IAAI,CAAC,CAAC,aAAa,YAAY,YAAY,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,2BAA2B,aAAkC,2BAA2B,CAAC,CAAC;IAC3G,CAAC;AACF,CAAC;AAED;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,KAAU,EAAE,OAAe;IACpD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,sBAAsB;QACtF,MAAM,OAAO,CAAC;IACf,CAAC;AACF,CAAC;AAED,eAAe,YAAY,CAAC","sourcesContent":["import type CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport UI5Date from \"./UI5Date.js\";\nimport UniversalDate from \"./UniversalDate.js\";\n\nclass CalendarDate {\n\t_oUDate!: UI5Date | Date | UniversalDate;\n\n\tconstructor(year?: number | CalendarDate, month?: number | string, date?: number, calendarType?: string) { // eslint-disable-line\n\t\tlet aArgs = arguments, // eslint-disable-line\n\t\t\toJSDate: UI5Date | Date,\n\t\t\toNow: UI5Date | Date,\n\t\t\tsCalendarType!: CalendarType;\n\n\t\tswitch (aArgs.length) {\n\t\tcase 0: // defaults to the current date\n\t\t\toNow = UI5Date.getInstance();\n\t\t\treturn (this.constructor(oNow.getFullYear(), oNow.getMonth(), oNow.getDate()) as CalendarDate);\n\n\t\tcase 1: // CalendarDate\n\t\tcase 2: // CalendarDate, sCalendarType\n\t\t\tif (!(aArgs[0] instanceof CalendarDate)) {\n\t\t\t\tthrow new Error(\"Invalid arguments: the first argument must be of type CalendarDate.\");\n\t\t\t}\n\t\t\tsCalendarType = aArgs[1] ? aArgs[1] : (aArgs[0]._oUDate as UniversalDate).sCalendarType;\n\t\t\t// Use source.valueOf() (returns the same point of time regardless calendar type) instead of\n\t\t\t// source's getters to avoid non-gregorian Year, Month and Date may be used to construct a Gregorian date\n\t\t\toJSDate = UI5Date.getInstance(aArgs[0].valueOf());\n\n\t\t\t// Make this date really local. Now getters are safe.\n\t\t\toJSDate.setFullYear(oJSDate.getUTCFullYear(), oJSDate.getUTCMonth(), oJSDate.getUTCDate());\n\t\t\toJSDate.setHours(oJSDate.getUTCHours(), oJSDate.getUTCMinutes(), oJSDate.getUTCSeconds(), oJSDate.getUTCMilliseconds());\n\n\t\t\tthis._oUDate = createUniversalUTCDate(oJSDate, sCalendarType);\n\t\t\tbreak;\n\n\t\tcase 3: // year, month, date\n\t\tcase 4: // year, month, date, sCalendarType\n\t\t\tcheckNumericLike(aArgs[0] as number, `Invalid year: ${aArgs[0] as number}`);\n\t\t\tcheckNumericLike(aArgs[1] as number, `Invalid month: ${aArgs[1] as number}`);\n\t\t\tcheckNumericLike(aArgs[2] as number, `Invalid date: ${aArgs[2] as number}`);\n\n\t\t\toJSDate = UI5Date.getInstance(0, 0, 1);\n\t\t\toJSDate.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.\n\n\t\t\tif (aArgs[3]) {\n\t\t\t\tsCalendarType = aArgs[3];\n\t\t\t}\n\t\t\tthis._oUDate = createUniversalUTCDate(oJSDate, sCalendarType);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tthrow new Error(`${\"Invalid arguments. Accepted arguments are: 1) oCalendarDate, (optional)calendarType\"\n\t\t\t\t+ \"or 2) year, month, date, (optional) calendarType\"}${aArgs as unknown as string}`);\n\t\t}\n\t}\n\n\tgetYear() {\n\t\treturn this._oUDate.getUTCFullYear();\n\t}\n\n\tsetYear(year: number) {\n\t\tcheckNumericLike(year, `Invalid year: ${year}`);\n\t\tthis._oUDate.setUTCFullYear(year);\n\t\treturn this;\n\t}\n\n\tgetMonth() {\n\t\treturn this._oUDate.getUTCMonth();\n\t}\n\n\t/**\n\t * Sets the given month as ordinal month of the year.\n\t * @param {int} month An integer between 0 and 11, representing the months January through December( or their\n\t * equivalent month names for the given calendar).\n\t * If the specified value is is outside of the expected range, this method attempts to update the date information\n\t * accordingly. For example, if 12 is given as a month, the year will be incremented by 1, and 1 will be used for month.\n\t * @param {int} [date] An integer between 1 and 31, representing the day of the month, but other values are allowed.\n\t * 0 will result in the previous month's last day.\n\t * -1 will result in the day before the previous month's last day.\n\t * 32 will result in:\n\t * - first day of the next month if the current month has 31 days.\n\t * - second day of the next month if the current month has 30 days.\n\t * Other value will result in adding or subtracting days according to the given value.\n\t * @returns {sap.ui.unified.calendar.CalendarDate} <code>this</code> for method chaining.\n\t */\n\tsetMonth(month: number, date?: number) {\n\t\tcheckNumericLike(month, `Invalid month: ${month}`);\n\t\tif (date || date === 0) {\n\t\t\tcheckNumericLike(date, `Invalid date: ${date}`);\n\t\t\tthis._oUDate.setUTCMonth(month, date);\n\t\t} else {\n\t\t\tthis._oUDate.setUTCMonth(month);\n\t\t}\n\t\treturn this;\n\t}\n\n\tgetDate() {\n\t\treturn this._oUDate.getUTCDate();\n\t}\n\n\tsetDate(date: number) {\n\t\tcheckNumericLike(date, `Invalid date: ${date}`);\n\t\tthis._oUDate.setUTCDate(date);\n\t\treturn this;\n\t}\n\n\tgetDay() {\n\t\treturn this._oUDate.getUTCDay();\n\t}\n\n\tgetCalendarType() {\n\t\treturn (this._oUDate as UniversalDate).sCalendarType;\n\t}\n\n\tisBefore(oCalendarDate: CalendarDate) {\n\t\tcheckCalendarDate(oCalendarDate);\n\t\treturn this.valueOf() < oCalendarDate.valueOf();\n\t}\n\n\tisAfter(oCalendarDate: CalendarDate) {\n\t\tcheckCalendarDate(oCalendarDate);\n\t\treturn this.valueOf() > oCalendarDate.valueOf();\n\t}\n\n\tisSameOrBefore(oCalendarDate: CalendarDate) {\n\t\tcheckCalendarDate(oCalendarDate);\n\t\treturn this.valueOf() <= oCalendarDate.valueOf();\n\t}\n\n\tisSameOrAfter(oCalendarDate: CalendarDate) {\n\t\tcheckCalendarDate(oCalendarDate);\n\t\treturn this.valueOf() >= oCalendarDate.valueOf();\n\t}\n\n\tisSame(oCalendarDate: CalendarDate) {\n\t\tcheckCalendarDate(oCalendarDate);\n\t\treturn this.valueOf() === oCalendarDate.valueOf();\n\t}\n\n\ttoLocalJSDate() {\n\t\t// Use this._oUDate.getTime()(returns the same point of time regardless calendar type) instead of\n\t\t// this._oUDate's getters to avoid non-gregorian Year, Month and Date to be used to construct a Gregorian date\n\t\tconst oLocalDate = UI5Date.getInstance(this._oUDate.getTime());\n\n\t\t// Make this date really local. Now getters are safe.\n\t\toLocalDate.setFullYear(oLocalDate.getUTCFullYear(), oLocalDate.getUTCMonth(), oLocalDate.getUTCDate());\n\t\toLocalDate.setHours(0, 0, 0, 0);\n\n\t\treturn oLocalDate;\n\t}\n\n\ttoUTCJSDate() {\n\t\t// Use this._oUDate.getTime()(returns the same point of time regardless calendar type) instead of\n\t\t// this._oUDate's getters to avoid non-gregorian Year, Month and Date to be used to construct a Gregorian date\n\t\tconst oUTCDate = UI5Date.getInstance(this._oUDate.getTime());\n\t\toUTCDate.setUTCHours(0, 0, 0, 0);\n\n\t\treturn oUTCDate;\n\t}\n\n\ttoString() {\n\t\treturn `${(this._oUDate as UniversalDate).sCalendarType}: ${this.getYear()}/${this.getMonth() + 1}/${this.getDate()}`;\n\t}\n\n\tvalueOf() {\n\t\treturn this._oUDate.getTime();\n\t}\n\n\tstatic fromLocalJSDate(oJSDate: Date | UI5Date, sCalendarType?: `${CalendarType}`) {\n\t\t// Cross frame check for a date should be performed here otherwise setDateValue would fail in OPA tests\n\t\t// because Date object in the test is different than the Date object in the application (due to the iframe).\n\t\t// We can use jQuery.type or this method:\n\t\tfunction isValidDate(date: Date | UI5Date) {\n\t\t\treturn date && Object.prototype.toString.call(date) === \"[object Date]\" && !isNaN(date as unknown as number); // eslint-disable-line\n\t\t}\n\t\tif (!isValidDate(oJSDate)) {\n\t\t\tthrow new Error(`Date parameter must be a JavaScript Date object: [${oJSDate as unknown as string}].`);\n\t\t}\n\t\treturn new CalendarDate(oJSDate.getFullYear(), oJSDate.getMonth(), oJSDate.getDate(), sCalendarType);\n\t}\n\n\tstatic fromTimestamp(iTimestamp: number, sCalendarType?: `${CalendarType}`) {\n\t\tconst oCalDate = new CalendarDate(0, 0, 1);\n\t\tlet oUDate;\n\t\ttry {\n\t\t\toUDate = UniversalDate.getInstance(UI5Date.getInstance(iTimestamp), sCalendarType);\n\t\t} catch (e) {\n\t\t\toUDate = new Date(NaN); // UniversalDate.getInstance may now throw an Exception - keep the old behavior\n\t\t}\n\t\toCalDate._oUDate = oUDate;\n\t\treturn oCalDate;\n\t}\n}\n\nfunction createUniversalUTCDate(oDate: UI5Date | Date, sCalendarType: `${CalendarType}`) {\n\tif (sCalendarType) {\n\t\treturn UniversalDate.getInstance(createUTCDate(oDate), sCalendarType);\n\t}\n\treturn new UniversalDate(createUTCDate(oDate).getTime());\n}\n\n/**\n * Creates a JavaScript UTC Date corresponding to the given JavaScript Date.\n * @param {Date} oDate JavaScript date object. Time related information is cut.\n * @returns {Date} JavaScript date created from the date object, but this time considered as UTC date information.\n */\nfunction createUTCDate(oDate: UI5Date | Date) {\n\tconst oUTCDate = new Date(Date.UTC(0, 0, 1)); // no need to replace with UI5Date as we are creating a new UTC date object\n\n\toUTCDate.setUTCFullYear(oDate.getFullYear(), oDate.getMonth(), oDate.getDate());\n\n\treturn oUTCDate;\n}\n\nfunction checkCalendarDate(oCalendarDate: CalendarDate) {\n\tif (!(oCalendarDate instanceof CalendarDate)) {\n\t\tthrow new Error(`Invalid calendar date: [${oCalendarDate as unknown as string}]. Expected: CalendarDate`);\n\t}\n}\n\n/**\n * Verifies the given value is numeric like, i.e. 3, \"3\" and throws an error if it is not.\n * @param {any} value The value of any type to check. If null or undefined, this method throws an error.\n * @param {string} message The message to be used if an error is to be thrown\n * @throws will throw an error if the value is null or undefined or is not like a number\n */\nfunction checkNumericLike(value: any, message: string) {\n\tif (value === undefined || value === Infinity || isNaN(value)) { // eslint-disable-line\n\t\tthrow message;\n\t}\n}\n\nexport default CalendarDate;\n"]}
@@ -1,5 +1,5 @@
1
- import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
1
+ import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
2
2
  import CalendarDate from "./CalendarDate.js";
3
- declare const getMinCalendarDate: (primaryCalendarType: CalendarType) => CalendarDate;
4
- declare const getMaxCalendarDate: (primaryCalendarType: CalendarType) => CalendarDate;
3
+ declare const getMinCalendarDate: (primaryCalendarType: `${CalendarType}`) => CalendarDate;
4
+ declare const getMaxCalendarDate: (primaryCalendarType: `${CalendarType}`) => CalendarDate;
5
5
  export { getMinCalendarDate, getMaxCalendarDate, };
@@ -1 +1 @@
1
- {"version":3,"file":"ExtremeDates.js","sourceRoot":"","sources":["../../src/dates/ExtremeDates.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAwB,CAAC;AAE9C,MAAM,kBAAkB,GAAG,CAAC,mBAAiC,EAAE,EAAE;IAChE,MAAM,GAAG,GAAG,OAAO,mBAAmB,EAAE,CAAC;IAEzC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACpB,MAAM,OAAO,GAAG,IA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AC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA,8BAA8B;QAClE,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;AACxB,CAAC,CAAC;AAEF,OAAO,EACN,kBAAkB,EAClB,kBAAkB,GAClB,CAAC","sourcesContent":["import type CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport CalendarDate from \"./CalendarDate.js\";\n\nconst cache = new Map<string, CalendarDate>();\n\nconst getMinCalendarDate = (primaryCalendarType: `${CalendarType}`) => {\n\tconst key = `min ${primaryCalendarType}`;\n\n\tif (!cache.has(key)) {\n\t\tconst minDate = new CalendarDate(1, 0, 1, primaryCalendarType);\n\t\tminDate.setYear(1);\n\t\tminDate.setMonth(0);\n\t\tminDate.setDate(1);\n\t\tcache.set(key, minDate);\n\t}\n\n\treturn cache.get(key)!;\n};\n\nconst getMaxCalendarDate = (primaryCalendarType: `${CalendarType}`) => {\n\tconst key = `max ${primaryCalendarType}`;\n\n\tif (!cache.has(key)) {\n\t\tconst maxDate = new CalendarDate(1, 0, 1, primaryCalendarType);\n\t\tmaxDate.setYear(9999);\n\t\tmaxDate.setMonth(11);\n\t\tconst tempDate = new CalendarDate(maxDate, primaryCalendarType);\n\t\ttempDate.setDate(1);\n\t\ttempDate.setMonth(tempDate.getMonth() + 1, 0);\n\t\tmaxDate.setDate(tempDate.getDate());// 31st for Gregorian Calendar\n\t\tcache.set(key, maxDate);\n\t}\n\n\treturn cache.get(key)!;\n};\n\nexport {\n\tgetMinCalendarDate,\n\tgetMaxCalendarDate,\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import type UIDateT from "sap/ui/core/date/UI5Date";
2
+ declare const UI5DateWrapped: typeof UIDateT;
3
+ declare class UI5Date extends UI5DateWrapped {
4
+ }
5
+ export default UI5Date;
@@ -0,0 +1,7 @@
1
+ // @ts-ignore
2
+ import UI5DateNative from "../sap/ui/core/date/UI5Date.js";
3
+ const UI5DateWrapped = UI5DateNative;
4
+ class UI5Date extends UI5DateWrapped {
5
+ }
6
+ export default UI5Date;
7
+ //# sourceMappingURL=UI5Date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UI5Date.js","sourceRoot":"","sources":["../../src/dates/UI5Date.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAE3D,MAAM,cAAc,GAAG,aAA+B,CAAC;AACvD,MAAM,OAAQ,SAAQ,cAAc;CAAG;AAEvC,eAAe,OAAO,CAAC","sourcesContent":["import type UIDateT from \"sap/ui/core/date/UI5Date\";\n// @ts-ignore\nimport UI5DateNative from \"../sap/ui/core/date/UI5Date.js\";\n\nconst UI5DateWrapped = UI5DateNative as typeof UIDateT;\nclass UI5Date extends UI5DateWrapped {}\n\nexport default UI5Date;\n"]}
@@ -1,9 +1,10 @@
1
1
  import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
2
+ import type UI5Date from "./UI5Date.js";
2
3
  type UniversalDate = {
3
4
  new (time: number): UniversalDate;
4
5
  oDate: Date;
5
6
  sCalendarType: string;
6
- getInstance: (oDate: Date, sCalendarType?: CalendarType) => UniversalDate;
7
+ getInstance: (oDate: UI5Date | Date, sCalendarType?: `${CalendarType}`) => UniversalDate;
7
8
  getDate: () => number;
8
9
  getMonth: () => number;
9
10
  getFullYear: () => number;
@@ -1 +1 @@
1
- {"version":3,"file":"UniversalDate.js","sourceRoot":"","sources":["../../src/dates/UniversalDate.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,mBAAmB,MAAM,sCAAsC,CAAC;AA8CvE,MAAM,aAAa,GAAkB,mBAAmB,CAAC;AAEzD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"UniversalDate.js","sourceRoot":"","sources":["../../src/dates/UniversalDate.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,mBAAmB,MAAM,sCAAsC,CAAC;AA+CvE,MAAM,aAAa,GAAkB,mBAAmB,CAAC;AAEzD,eAAe,aAAa,CAAC","sourcesContent":["import type CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\n// @ts-ignore\nimport UniversalDateNative from \"../sap/ui/core/date/UniversalDate.js\";\nimport type UI5Date from \"./UI5Date.js\";\n\ntype UniversalDate = {\n new (time: number): UniversalDate;\n oDate: Date,\n sCalendarType: string,\n getInstance: (oDate: UI5Date | Date, sCalendarType?: `${CalendarType}`) => UniversalDate,\n getDate: () => number,\n getMonth: () => number,\n getFullYear: () => number,\n getYear: () => number,\n getDay: () => number,\n getHours: () => number,\n getMinutes: () => number,\n getSeconds: () => number,\n getMilliseconds: () => number,\n getUTCDate: () => number,\n getUTCMonth: () => number,\n getUTCFullYear: () => number,\n getUTCDay: () => number,\n getUTCHours: () => number,\n getUTCMinutes: () => number,\n getUTCSeconds: () => number,\n getUTCMilliseconds: () => number,\n getTime: () => number,\n valueOf: () => number,\n getTimezoneOffset: () => number,\n toString: () => string,\n toDateString: () => string,\n setDate: (dayValue: number) => number,\n setFullYear: (yearValue: number, monthValue?: number, dateValue?: number) => number,\n setYear: (yearValue: number) => number,\n setMonth: (monthValue: number, dayValue?: number) => number,\n setHours: (hoursValue: number, minutesValue?: number, secondsValue?: number, msValue?: number) => number,\n setMinutes: (minutesValue: number, secondsValue?: number, msValue?: number) => number,\n setSeconds: (secondsValue: number, msValue?: number) => number,\n setMilliseconds: (setMilliseconds: number) => number,\n setUTCDate:(dayValue: number) => number,\n setUTCFullYear: (yearValue: number, monthValue?: number, dayValue?: number) => number,\n setUTCMonth: (monthValue: number, dayValue?: number) => number,\n setUTCHours: (hoursValue: number, minutesValue?: number, secondsValue?: number, msValue?: number) => number,\n setUTCMinutes: (minutesValue: number, secondsValue?: number, msValue?: number) => number,\n setUTCSeconds: (secondsValue: number, msValue?: number) => number,\n setUTCMilliseconds: (setMilliseconds: number) => number,\n}\n\nconst UniversalDate: UniversalDate = UniversalDateNative;\n\nexport default UniversalDate;\n"]}
@@ -9,7 +9,7 @@ import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.j
9
9
  * @param calendarType calendar type
10
10
  * @returns {String}
11
11
  */
12
- declare const convertMonthNumbersToMonthNames: (firstMonth: number, lastMonth: number, calendarType?: CalendarType) => {
12
+ declare const convertMonthNumbersToMonthNames: (firstMonth: number, lastMonth: number, calendarType?: `${CalendarType}`) => {
13
13
  text: any;
14
14
  textInfo: any;
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"convertMonthNumbersToMonthNames.js","sourceRoot":"","sources":["../../src/dates/convertMonthNumbersToMonthNames.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kDAAkD,CAAC;AAEzE,OAAO,2BAA2B,MAAM,mCAAmC,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,+BAA+B,GAAG,CAAC,UAAkB,EAAE,SAAiB,EAAE,YAA2B,EAAE,EAAE;IAC9G,MAAM,UAAU,GAAG,2BAA2B,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAClD,MAAM,oBAAoB,GAAG,UAAU,CAAC,mBAAmB,CAAC,aAAa,EAAE,YAAY,CAAkB,CAAC;IAC1G,MAAM,wBAAwB,GAAG,UAAU,CAAC,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAkB,CAAC;IAEvG,IAAI,UAAU,KAAK,SAAS,EAAE;QAC7B,OAAO;YACN,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,UAAU,CAAC;YACnE,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,UAAU,CAAC;SACh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EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAClH,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;KAC9H,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["import getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport type CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport getCachedLocaleDataInstance from \"../getCachedLocaleDataInstance.js\";\n\n/**\n * Convert month number to month name (text).\n * If the numbers of the two months are the same you will get the name of the month,\n * otherwise you will get the two names separated by a dash\n *\n * @param firstMonth CalendarDate Month\n * @param lastMonth CalendarDate Month\n * @param calendarType calendar type\n * @returns {String}\n */\nconst convertMonthNumbersToMonthNames = (firstMonth: number, lastMonth: number, calendarType?: `${CalendarType}`) => {\n\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\tconst pattern = localeData.getIntervalPattern(\"\");\n\tconst secondaryMonthsNames = localeData.getMonthsStandAlone(\"abbreviated\", calendarType) as Array<string>;\n\tconst secondaryMonthsNamesWide = localeData.getMonthsStandAlone(\"wide\", calendarType) as Array<string>;\n\n\tif (firstMonth === lastMonth) {\n\t\treturn {\n\t\t\ttext: localeData.getMonths(\"abbreviated\", calendarType)[firstMonth],\n\t\t\ttextInfo: localeData.getMonths(\"wide\", calendarType)[firstMonth],\n\t\t};\n\t}\n\n\treturn {\n\t\ttext: pattern.replace(/\\{0\\}/, secondaryMonthsNames[firstMonth]).replace(/\\{1\\}/, secondaryMonthsNames[lastMonth]),\n\t\ttextInfo: pattern.replace(/\\{0\\}/, secondaryMonthsNamesWide[firstMonth]).replace(/\\{1\\}/, secondaryMonthsNamesWide[lastMonth]),\n\t};\n};\n\nexport default convertMonthNumbersToMonthNames;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getDaysInMonth.js","sourceRoot":"","sources":["../../src/dates/getDaysInMonth.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,MAAM,cAAc,GAAG,CAAC,IAAkB,EAAE,EAAE;IAC7C,MAAM,gBAAgB,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChD,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,gBAAgB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3D,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,OAAO,gBAAgB,CAAC,OAAO,EAAE,CAAC;AACnC,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"getDaysInMonth.js","sourceRoot":"","sources":["../../src/dates/getDaysInMonth.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,MAAM,cAAc,GAAG,CAAC,IAAkB,EAAE,EAAE;IAC7C,MAAM,gBAAgB,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChD,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,gBAAgB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3D,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,OAAO,gBAAgB,CAAC,OAAO,EAAE,CAAC;AACnC,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import CalendarDate from \"./CalendarDate.js\";\n\nconst getDaysInMonth = (date: CalendarDate) => {\n\tconst tempCalendarDate = new CalendarDate(date);\n\ttempCalendarDate.setDate(1);\n\ttempCalendarDate.setMonth(tempCalendarDate.getMonth() + 1);\n\ttempCalendarDate.setDate(0);\n\treturn tempCalendarDate.getDate();\n};\n\nexport default getDaysInMonth;\n"]}
@@ -5,6 +5,7 @@
5
5
  */
6
6
  const getRoundedTimestamp = (millisecondsUTC) => {
7
7
  if (!millisecondsUTC) {
8
+ // no need to replace with UI5Date, as we don't use any non-UTC functions
8
9
  millisecondsUTC = new Date().getTime();
9
10
  }
10
11
  const rounded = millisecondsUTC - (millisecondsUTC % (24 * 60 * 60 * 1000));
@@ -1 +1 @@
1
- {"version":3,"file":"getRoundedTimestamp.js","sourceRoot":"","sources":["../../src/dates/getRoundedTimestamp.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,CAAC,eAAuB,EAAE,EAAE;IACvD,IAAI,CAAC,eAAe,EAAE;QACrB,eAAe,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;KACvC;IACD,MAAM,OAAO,GAAG,eAAe,GAAG,CAAC,eAAe,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,OAAO,OAAO,GAAG,IAAI,CAAC;AACvB,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"getRoundedTimestamp.js","sourceRoot":"","sources":["../../src/dates/getRoundedTimestamp.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,CAAC,eAAuB,EAAE,EAAE;IACvD,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,yEAAyE;QACzE,eAAe,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC;IACD,MAAM,OAAO,GAAG,eAAe,GAAG,CAAC,eAAe,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,OAAO,OAAO,GAAG,IAAI,CAAC;AACvB,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["/**\n * Returns a timestamp with only the year, month and day (with zero hours, minutes and seconds) and without 000 for milliseconds\n * @param { number } millisecondsUTC\n * @returns { number }\n */\nconst getRoundedTimestamp = (millisecondsUTC: number) => {\n\tif (!millisecondsUTC) {\n\t\t// no need to replace with UI5Date, as we don't use any non-UTC functions\n\t\tmillisecondsUTC = new Date().getTime();\n\t}\n\tconst rounded = millisecondsUTC - (millisecondsUTC % (24 * 60 * 60 * 1000));\n\treturn rounded / 1000;\n};\n\nexport default getRoundedTimestamp;\n"]}
@@ -3,5 +3,5 @@ import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.j
3
3
  * Returns a UTC timestamp representing today
4
4
  * @public
5
5
  */
6
- declare const getTodayUTCTimestamp: (primaryCalendarType: CalendarType) => number;
6
+ declare const getTodayUTCTimestamp: (primaryCalendarType: `${CalendarType}`) => number;
7
7
  export default getTodayUTCTimestamp;
@@ -1,8 +1,9 @@
1
1
  import CalendarDate from "./CalendarDate.js";
2
+ import UI5Date from "./UI5Date.js";
2
3
  /**
3
4
  * Returns a UTC timestamp representing today
4
5
  * @public
5
6
  */
6
- const getTodayUTCTimestamp = (primaryCalendarType) => CalendarDate.fromLocalJSDate(new Date(), primaryCalendarType).valueOf() / 1000;
7
+ const getTodayUTCTimestamp = (primaryCalendarType) => CalendarDate.fromLocalJSDate(UI5Date.getInstance(), primaryCalendarType).valueOf() / 1000;
7
8
  export default getTodayUTCTimestamp;
8
9
  //# sourceMappingURL=getTodayUTCTimestamp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getTodayUTCTimestamp.js","sourceRoot":"","sources":["../../src/dates/getTodayUTCTimestamp.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAC,mBAAiC,EAAE,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,IAAI,EAAE,EAAE,mBAAmB,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;AAEnJ,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"getTodayUTCTimestamp.js","sourceRoot":"","sources":["../../src/dates/getTodayUTCTimestamp.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAC,mBAAsC,EAAE,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,mBAAmB,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;AAEnK,eAAe,oBAAoB,CAAC","sourcesContent":["import type CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport CalendarDate from \"./CalendarDate.js\";\nimport UI5Date from \"./UI5Date.js\";\n\n/**\n * Returns a UTC timestamp representing today\n * @public\n */\nconst getTodayUTCTimestamp = (primaryCalendarType: `${CalendarType}`) => CalendarDate.fromLocalJSDate(UI5Date.getInstance(), primaryCalendarType).valueOf() / 1000;\n\nexport default getTodayUTCTimestamp;\n"]}
@@ -6,8 +6,9 @@ import CalendarDate from "./CalendarDate.js";
6
6
  * @param date CalendarDate instance
7
7
  * @param amount how many days/months/years to add (can be a negative number)
8
8
  * @param unit what to modify: "day", "month" or "year"
9
+ * @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)
9
10
  * @param minDate minimum date to enforce
10
11
  * @param maxDate maximum date to enforce
11
12
  */
12
- declare const modifyDateBy: (date: CalendarDate, amount: number, unit: string, minDate?: CalendarDate, maxDate?: CalendarDate) => CalendarDate;
13
+ declare const modifyDateBy: (date: CalendarDate, amount: number, unit: string, preserveDate?: boolean, minDate?: CalendarDate, maxDate?: CalendarDate) => CalendarDate;
13
14
  export default modifyDateBy;
@@ -6,32 +6,47 @@ import CalendarDate from "./CalendarDate.js";
6
6
  * @param date CalendarDate instance
7
7
  * @param amount how many days/months/years to add (can be a negative number)
8
8
  * @param unit what to modify: "day", "month" or "year"
9
+ * @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)
9
10
  * @param minDate minimum date to enforce
10
11
  * @param maxDate maximum date to enforce
11
12
  */
12
- const modifyDateBy = (date, amount, unit, minDate, maxDate) => {
13
+ const modifyDateBy = (date, amount, unit, preserveDate = true, minDate, maxDate) => {
13
14
  const newDate = new CalendarDate(date);
14
- if (unit === "day") {
15
- newDate.setDate(date.getDate() + amount);
15
+ switch (unit) {
16
+ case "day":
17
+ newDate.setDate(date.getDate() + amount);
18
+ break;
19
+ case "month":
20
+ if (preserveDate) {
21
+ newDate.setMonth(date.getMonth() + amount);
22
+ const stillSameMonth = amount === -1 && newDate.getMonth() === date.getMonth(); // f.e. PageUp remained in the same month
23
+ const monthSkipped = amount === 1 && newDate.getMonth() - date.getMonth() > 1; // f.e. PageDown skipped a whole month
24
+ if (stillSameMonth || monthSkipped) { // Select the last day of the month in any of these 2 scenarios
25
+ newDate.setDate(0);
26
+ }
27
+ }
28
+ else {
29
+ if (amount === 1) {
30
+ newDate.setMonth(newDate.getMonth() + 1, 1);
31
+ }
32
+ if (amount === -1) {
33
+ newDate.setDate(0);
34
+ }
35
+ }
36
+ break;
37
+ case "year":
38
+ newDate.setYear(date.getYear() + amount);
39
+ if (newDate.getMonth() !== date.getMonth()) { // f.e. 29th Feb to next/prev year
40
+ newDate.setDate(0); // Select the last day of the month
41
+ }
42
+ break;
43
+ default:
44
+ break;
16
45
  }
17
- else if (unit === "month") {
18
- newDate.setMonth(date.getMonth() + amount);
19
- const stillSameMonth = amount === -1 && newDate.getMonth() === date.getMonth(); // f.e. PageUp remained in the same month
20
- const monthSkipped = amount === 1 && newDate.getMonth() - date.getMonth() > 1; // f.e. PageDown skipped a whole month
21
- if (stillSameMonth || monthSkipped) { // Select the last day of the month in any of these 2 scenarios
22
- newDate.setDate(0);
23
- }
24
- }
25
- else {
26
- newDate.setYear(date.getYear() + amount);
27
- if (newDate.getMonth() !== date.getMonth()) { // f.e. 29th Feb to next/prev year
28
- newDate.setDate(0); // Select the last day of the month
29
- }
30
- }
31
- if (minDate && newDate.valueOf() < minDate.valueOf()) {
46
+ if (minDate && newDate.isBefore(minDate)) {
32
47
  return new CalendarDate(minDate);
33
48
  }
34
- if (maxDate && newDate.valueOf() > maxDate.valueOf()) {
49
+ if (maxDate && newDate.isAfter(maxDate)) {
35
50
  return new CalendarDate(maxDate);
36
51
  }
37
52
  return newDate;
@@ -1 +1 @@
1
- {"version":3,"file":"modifyDateBy.js","sourceRoot":"","sources":["../../src/dates/modifyDateBy.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAE,MAAc,EAAE,IAAY,EAAE,OAAsB,EAAE,OAAsB,EAAE,EAAE;IACzH,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,IAAI,KAAK,KAAK,EAAE;QACnB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;KACzC;SAAM,IAAI,IAAI,KAAK,OAAO,EAAE;QAC5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,CAAC;QAC3C,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,yCAAyC;QACzH,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,sCAAsC;QACrH,IAAI,cAAc,IAAI,YAAY,EAAE,EAAE,+DAA+D;YACpG,OAAO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C,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import CalendarDate from \"./CalendarDate.js\";\n\n/**\n * Adds or subtracts a given amount of days/months/years from a date.\n * If minDate or maxDate are given, the result will be enforced within these limits\n *\n * @param date CalendarDate instance\n * @param amount how many days/months/years to add (can be a negative number)\n * @param unit what to modify: \"day\", \"month\" or \"year\"\n * @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)\n * @param minDate minimum date to enforce\n * @param maxDate maximum date to enforce\n */\nconst modifyDateBy = (date: CalendarDate, amount: number, unit: string, preserveDate = true, minDate?: CalendarDate, maxDate?: CalendarDate) => {\n\tconst newDate = new CalendarDate(date);\n\n\tswitch (unit) {\n\tcase \"day\":\n\t\tnewDate.setDate(date.getDate() + amount);\n\t\tbreak;\n\tcase \"month\":\n\t\tif (preserveDate) {\n\t\t\tnewDate.setMonth(date.getMonth() + amount);\n\t\t\tconst stillSameMonth = amount === -1 && newDate.getMonth() === date.getMonth(); // f.e. PageUp remained in the same month\n\t\t\tconst monthSkipped = amount === 1 && newDate.getMonth() - date.getMonth() > 1; // f.e. PageDown skipped a whole month\n\t\t\tif (stillSameMonth || monthSkipped) { // Select the last day of the month in any of these 2 scenarios\n\t\t\t\tnewDate.setDate(0);\n\t\t\t}\n\t\t} else {\n\t\t\tif (amount === 1) {\n\t\t\t\tnewDate.setMonth(newDate.getMonth() + 1, 1);\n\t\t\t}\n\t\t\tif (amount === -1) {\n\t\t\t\tnewDate.setDate(0);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\tcase \"year\":\n\t\tnewDate.setYear(date.getYear() + amount);\n\t\tif (newDate.getMonth() !== date.getMonth()) { // f.e. 29th Feb to next/prev year\n\t\t\tnewDate.setDate(0); // Select the last day of the month\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n\n\tif (minDate && newDate.isBefore(minDate)) {\n\t\treturn new CalendarDate(minDate);\n\t}\n\n\tif (maxDate && newDate.isAfter(maxDate)) {\n\t\treturn new CalendarDate(maxDate);\n\t}\n\n\treturn newDate;\n};\n\nexport default modifyDateBy;\n"]}
@@ -1,6 +1,6 @@
1
1
  import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
2
2
  import CalendarDate from "./CalendarDate.js";
3
- declare const transformDateToSecondaryType: (primaryCalendarType: CalendarType | undefined, secondaryCalendarType: CalendarType | undefined, timeStamp: number, hasYearPicker?: boolean) => {
3
+ declare const transformDateToSecondaryType: (primaryCalendarType: `${CalendarType}` | undefined, secondaryCalendarType: `${CalendarType}` | undefined, timeStamp: number, hasYearPicker?: boolean) => {
4
4
  firstDate: CalendarDate;
5
5
  lastDate: CalendarDate;
6
6
  };
@@ -1,8 +1,9 @@
1
1
  import CalendarDate from "./CalendarDate.js";
2
2
  import getDaysInMonth from "./getDaysInMonth.js";
3
+ import UI5Date from "./UI5Date.js";
3
4
  const transformDateToSecondaryType = (primaryCalendarType, secondaryCalendarType, timeStamp, hasYearPicker) => {
4
- let firstDate = CalendarDate.fromLocalJSDate(new Date(timeStamp * 1000), primaryCalendarType);
5
- let lastDate = CalendarDate.fromLocalJSDate(new Date(timeStamp * 1000), primaryCalendarType);
5
+ let firstDate = CalendarDate.fromLocalJSDate(UI5Date.getInstance(timeStamp * 1000), primaryCalendarType);
6
+ let lastDate = CalendarDate.fromLocalJSDate(UI5Date.getInstance(timeStamp * 1000), primaryCalendarType);
6
7
  firstDate.setDate(1);
7
8
  if (hasYearPicker) {
8
9
  firstDate.setMonth(0);
@@ -1 +1 @@
1
- {"version":3,"file":"transformDateToSecondaryType.js","sourceRoot":"","sources":["../../src/dates/transformDateToSecondaryType.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,MAAM,4BAA4B,GAAG,CAAC,mBAA6C,EAAE,qBAA8C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,OAAO,CAAC,WAAW,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,mBAAmB,CAAC,CAAC;IACxG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAErB,IAAI,aAAa,EAAE,CAAC;QACnB,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3C,SAAS,GAAG,IAAI,YAAY,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IAC/D,QAAQ,GAAG,IAAI,YAAY,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;IAC7D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;AAChC,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import type CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport CalendarDate from \"./CalendarDate.js\";\nimport getDaysInMonth from \"./getDaysInMonth.js\";\nimport UI5Date from \"./UI5Date.js\";\n\nconst transformDateToSecondaryType = (primaryCalendarType: `${CalendarType}` | undefined, secondaryCalendarType: `${CalendarType}`| undefined, timeStamp: number, hasYearPicker?: boolean) => {\n\tlet firstDate = CalendarDate.fromLocalJSDate(UI5Date.getInstance(timeStamp * 1000), primaryCalendarType);\n\tlet lastDate = CalendarDate.fromLocalJSDate(UI5Date.getInstance(timeStamp * 1000), primaryCalendarType);\n\tfirstDate.setDate(1);\n\n\tif (hasYearPicker) {\n\t\tfirstDate.setMonth(0);\n\t\tlastDate.setMonth(11);\n\t}\n\n\tlastDate.setDate(getDaysInMonth(lastDate));\n\tfirstDate = new CalendarDate(firstDate, secondaryCalendarType);\n\tlastDate = new CalendarDate(lastDate, secondaryCalendarType);\n\treturn { firstDate, lastDate };\n};\n\nexport default transformDateToSecondaryType;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Buddhist.js","sourceRoot":"","sources":["../../../src/features/calendar/Buddhist.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC"}
1
+ {"version":3,"file":"Buddhist.js","sourceRoot":"","sources":["../../../src/features/calendar/Buddhist.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC","sourcesContent":["import \"../../sap/ui/core/date/Buddhist.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Gregorian.js","sourceRoot":"","sources":["../../../src/features/calendar/Gregorian.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC"}
1
+ {"version":3,"file":"Gregorian.js","sourceRoot":"","sources":["../../../src/features/calendar/Gregorian.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC","sourcesContent":["import \"../../sap/ui/core/date/Gregorian.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Islamic.js","sourceRoot":"","sources":["../../../src/features/calendar/Islamic.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC"}
1
+ {"version":3,"file":"Islamic.js","sourceRoot":"","sources":["../../../src/features/calendar/Islamic.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC","sourcesContent":["import \"../../sap/ui/core/date/Islamic.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Japanese.js","sourceRoot":"","sources":["../../../src/features/calendar/Japanese.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC"}
1
+ {"version":3,"file":"Japanese.js","sourceRoot":"","sources":["../../../src/features/calendar/Japanese.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC","sourcesContent":["import \"../../sap/ui/core/date/Japanese.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Persian.js","sourceRoot":"","sources":["../../../src/features/calendar/Persian.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC"}
1
+ {"version":3,"file":"Persian.js","sourceRoot":"","sources":["../../../src/features/calendar/Persian.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC","sourcesContent":["import \"../../sap/ui/core/date/Persian.js\";\n"]}
@@ -0,0 +1,27 @@
1
+ Copyright © 1991-2023 Unicode, Inc. All rights reserved.
2
+ Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of the
5
+ Unicode data files and any associated documentation (the "Data Files") or Unicode
6
+ software and any associated documentation (the "Software") to deal in the Data Files
7
+ or Software without restriction, including without limitation the rights to use, copy,
8
+ modify, merge, publish, distribute, and/or sell copies of the Data Files or Software,
9
+ and to permit persons to whom the Data Files or Software are furnished to do so,
10
+ provided that (a) the above copyright notice(s) and this permission notice appear
11
+ with all copies of the Data Files or Software, (b) both the above copyright notice(s)
12
+ and this permission notice appear in associated documentation, and (c) there is clear
13
+ notice in each modified Data File or in the Software as well as in the documentation
14
+ associated with the Data File(s) or Software that the data or software has been modified.
15
+
16
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL
19
+ THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM,
20
+ OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
21
+ FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
23
+ OF THE DATA FILES OR SOFTWARE.
24
+
25
+ Except as contained in this notice, the name of a copyright holder shall not be used in
26
+ advertising or otherwise to promote the sale, use or other dealings in these Data Files
27
+ or Software without prior written authorization of the copyright holder.