@ui5/webcomponents-localization 0.0.0-8393c7cdd → 0.0.0-87ff7523a

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 (253) hide show
  1. package/.eslintignore +2 -1
  2. package/.npsrc.json +3 -0
  3. package/CHANGELOG.md +1768 -0
  4. package/README.md +3 -5
  5. package/dist/.tsbuildinfo +1 -0
  6. package/dist/Assets-fetch.d.ts +1 -0
  7. package/dist/Assets-fetch.js +3 -0
  8. package/dist/Assets-fetch.js.map +1 -0
  9. package/dist/Assets-node.d.ts +11 -0
  10. package/dist/Assets-node.js +12 -0
  11. package/dist/Assets-node.js.map +1 -0
  12. package/dist/Assets.d.ts +1 -0
  13. package/dist/Assets.js +1 -0
  14. package/dist/Assets.js.map +1 -0
  15. package/dist/CalendarUtils.d.ts +3 -0
  16. package/dist/CalendarUtils.js +6 -0
  17. package/dist/CalendarUtils.js.map +1 -0
  18. package/dist/DateFormat.d.ts +5 -0
  19. package/dist/DateFormat.js +6 -2
  20. package/dist/DateFormat.js.map +1 -0
  21. package/dist/LocaleData.d.ts +5 -0
  22. package/dist/LocaleData.js +6 -2
  23. package/dist/LocaleData.js.map +1 -0
  24. package/dist/dates/CalendarDate.d.ts +42 -0
  25. package/dist/dates/CalendarDate.js +171 -207
  26. package/dist/dates/CalendarDate.js.map +1 -0
  27. package/dist/dates/ExtremeDates.d.ts +5 -0
  28. package/dist/dates/ExtremeDates.js +25 -35
  29. package/dist/dates/ExtremeDates.js.map +1 -0
  30. package/dist/dates/UI5Date.d.ts +5 -0
  31. package/dist/dates/UI5Date.js +7 -0
  32. package/dist/dates/UI5Date.js.map +1 -0
  33. package/dist/dates/UniversalDate.d.ts +47 -0
  34. package/dist/dates/UniversalDate.js +5 -0
  35. package/dist/dates/UniversalDate.js.map +1 -0
  36. package/dist/dates/convertMonthNumbersToMonthNames.d.ts +16 -0
  37. package/dist/dates/convertMonthNumbersToMonthNames.js +15 -18
  38. package/dist/dates/convertMonthNumbersToMonthNames.js.map +1 -0
  39. package/dist/dates/getDaysInMonth.d.ts +3 -0
  40. package/dist/dates/getDaysInMonth.js +7 -8
  41. package/dist/dates/getDaysInMonth.js.map +1 -0
  42. package/dist/dates/getRoundedTimestamp.d.ts +7 -0
  43. package/dist/dates/getRoundedTimestamp.js +10 -9
  44. package/dist/dates/getRoundedTimestamp.js.map +1 -0
  45. package/dist/dates/getTodayUTCTimestamp.d.ts +7 -0
  46. package/dist/dates/getTodayUTCTimestamp.js +3 -3
  47. package/dist/dates/getTodayUTCTimestamp.js.map +1 -0
  48. package/dist/dates/modifyDateBy.d.ts +14 -0
  49. package/dist/dates/modifyDateBy.js +42 -29
  50. package/dist/dates/modifyDateBy.js.map +1 -0
  51. package/dist/dates/transformDateToSecondaryType.d.ts +7 -0
  52. package/dist/dates/transformDateToSecondaryType.js +13 -15
  53. package/dist/dates/transformDateToSecondaryType.js.map +1 -0
  54. package/dist/features/calendar/Buddhist.js +1 -0
  55. package/dist/features/calendar/Buddhist.js.map +1 -0
  56. package/dist/features/calendar/Gregorian.js +1 -0
  57. package/dist/features/calendar/Gregorian.js.map +1 -0
  58. package/dist/features/calendar/Islamic.js +1 -0
  59. package/dist/features/calendar/Islamic.js.map +1 -0
  60. package/dist/features/calendar/Japanese.js +1 -0
  61. package/dist/features/calendar/Japanese.js.map +1 -0
  62. package/dist/features/calendar/Persian.js +1 -0
  63. package/dist/features/calendar/Persian.js.map +1 -0
  64. package/dist/generated/assets/cldr/Unicode-Data-Files-LICENSE.txt +27 -0
  65. package/dist/generated/assets/cldr/ar.json +1690 -511
  66. package/dist/generated/assets/cldr/ar_EG.json +1690 -511
  67. package/dist/generated/assets/cldr/ar_SA.json +1785 -607
  68. package/dist/generated/assets/cldr/bg.json +1663 -663
  69. package/dist/generated/assets/cldr/ca.json +1635 -550
  70. package/dist/generated/assets/cldr/cnr.json +6169 -0
  71. package/dist/generated/assets/cldr/cs.json +1618 -409
  72. package/dist/generated/assets/cldr/cy.json +1686 -640
  73. package/dist/generated/assets/cldr/da.json +1579 -542
  74. package/dist/generated/assets/cldr/de.json +1504 -374
  75. package/dist/generated/assets/cldr/de_AT.json +1494 -364
  76. package/dist/generated/assets/cldr/de_CH.json +1513 -383
  77. package/dist/generated/assets/cldr/el.json +1220 -273
  78. package/dist/generated/assets/cldr/el_CY.json +1220 -273
  79. package/dist/generated/assets/cldr/en.json +1619 -548
  80. package/dist/generated/assets/cldr/en_AU.json +1756 -636
  81. package/dist/generated/assets/cldr/en_GB.json +1630 -528
  82. package/dist/generated/assets/cldr/en_HK.json +1713 -608
  83. package/dist/generated/assets/cldr/en_IE.json +1678 -576
  84. package/dist/generated/assets/cldr/en_IN.json +1661 -555
  85. package/dist/generated/assets/cldr/en_NZ.json +1697 -595
  86. package/dist/generated/assets/cldr/en_PG.json +1698 -596
  87. package/dist/generated/assets/cldr/en_SG.json +1687 -582
  88. package/dist/generated/assets/cldr/en_ZA.json +1675 -573
  89. package/dist/generated/assets/cldr/es.json +1893 -704
  90. package/dist/generated/assets/cldr/es_AR.json +1835 -645
  91. package/dist/generated/assets/cldr/es_BO.json +1880 -690
  92. package/dist/generated/assets/cldr/es_CL.json +1721 -639
  93. package/dist/generated/assets/cldr/es_CO.json +1637 -554
  94. package/dist/generated/assets/cldr/es_MX.json +2050 -860
  95. package/dist/generated/assets/cldr/es_PE.json +1565 -591
  96. package/dist/generated/assets/cldr/es_UY.json +1593 -619
  97. package/dist/generated/assets/cldr/es_VE.json +1611 -637
  98. package/dist/generated/assets/cldr/et.json +1426 -368
  99. package/dist/generated/assets/cldr/fa.json +1548 -483
  100. package/dist/generated/assets/cldr/fi.json +1528 -343
  101. package/dist/generated/assets/cldr/fr.json +1435 -419
  102. package/dist/generated/assets/cldr/fr_BE.json +1432 -416
  103. package/dist/generated/assets/cldr/fr_CA.json +1571 -555
  104. package/dist/generated/assets/cldr/fr_CH.json +1385 -369
  105. package/dist/generated/assets/cldr/fr_LU.json +1435 -419
  106. package/dist/generated/assets/cldr/he.json +1697 -536
  107. package/dist/generated/assets/cldr/hi.json +1221 -193
  108. package/dist/generated/assets/cldr/hr.json +1760 -485
  109. package/dist/generated/assets/cldr/hu.json +1390 -303
  110. package/dist/generated/assets/cldr/id.json +1640 -570
  111. package/dist/generated/assets/cldr/it.json +1489 -455
  112. package/dist/generated/assets/cldr/it_CH.json +1489 -455
  113. package/dist/generated/assets/cldr/ja.json +1143 -86
  114. package/dist/generated/assets/cldr/kk.json +1782 -570
  115. package/dist/generated/assets/cldr/ko.json +1192 -162
  116. package/dist/generated/assets/cldr/lt.json +1383 -288
  117. package/dist/generated/assets/cldr/lv.json +1369 -369
  118. package/dist/generated/assets/cldr/mk.json +6045 -0
  119. package/dist/generated/assets/cldr/ms.json +1598 -551
  120. package/dist/generated/assets/cldr/nb.json +1265 -209
  121. package/dist/generated/assets/cldr/nl.json +1741 -425
  122. package/dist/generated/assets/cldr/nl_BE.json +1741 -425
  123. package/dist/generated/assets/cldr/pl.json +1903 -492
  124. package/dist/generated/assets/cldr/pt.json +1913 -605
  125. package/dist/generated/assets/cldr/pt_PT.json +1871 -633
  126. package/dist/generated/assets/cldr/ro.json +1590 -482
  127. package/dist/generated/assets/cldr/ru.json +1608 -514
  128. package/dist/generated/assets/cldr/ru_UA.json +1602 -508
  129. package/dist/generated/assets/cldr/sk.json +1629 -569
  130. package/dist/generated/assets/cldr/sl.json +1532 -430
  131. package/dist/generated/assets/cldr/sr.json +1459 -346
  132. package/dist/generated/assets/cldr/sr_Latn.json +2088 -991
  133. package/dist/generated/assets/cldr/sv.json +1508 -445
  134. package/dist/generated/assets/cldr/th.json +1313 -237
  135. package/dist/generated/assets/cldr/tr.json +1549 -436
  136. package/dist/generated/assets/cldr/uk.json +1619 -520
  137. package/dist/generated/assets/cldr/vi.json +1423 -429
  138. package/dist/generated/assets/cldr/zh_CN.json +1425 -342
  139. package/dist/generated/assets/cldr/zh_HK.json +1396 -312
  140. package/dist/generated/assets/cldr/zh_SG.json +1401 -317
  141. package/dist/generated/assets/cldr/zh_TW.json +1256 -193
  142. package/dist/generated/json-imports/LocaleData-fetch.d.ts +1 -0
  143. package/dist/generated/json-imports/LocaleData-fetch.js +93 -0
  144. package/dist/generated/json-imports/LocaleData-fetch.js.map +1 -0
  145. package/dist/generated/json-imports/LocaleData-node.d.ts +1 -0
  146. package/dist/generated/json-imports/LocaleData-node.js +93 -0
  147. package/dist/generated/json-imports/LocaleData-node.js.map +1 -0
  148. package/dist/generated/json-imports/LocaleData.d.ts +1 -0
  149. package/dist/generated/json-imports/LocaleData.js +89 -89
  150. package/dist/generated/json-imports/LocaleData.js.map +1 -0
  151. package/dist/getCachedLocaleDataInstance.d.ts +4 -0
  152. package/dist/getCachedLocaleDataInstance.js +6 -9
  153. package/dist/getCachedLocaleDataInstance.js.map +1 -0
  154. package/dist/locale/getLocaleData.d.ts +11 -0
  155. package/dist/locale/getLocaleData.js +12 -16
  156. package/dist/locale/getLocaleData.js.map +1 -0
  157. package/dist/sap/base/Event.js +59 -0
  158. package/dist/sap/base/Eventing.js +146 -0
  159. package/dist/sap/base/Log.js +2 -240
  160. package/dist/sap/base/assert.js +31 -5
  161. package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
  162. package/dist/sap/base/config.js +17 -0
  163. package/dist/sap/base/i18n/Formatting.d.ts +8 -0
  164. package/dist/sap/base/i18n/Formatting.js +11 -0
  165. package/dist/sap/base/i18n/Formatting.js.map +1 -0
  166. package/dist/sap/base/i18n/LanguageTag.js +173 -0
  167. package/dist/sap/base/i18n/Localization.d.ts +4 -0
  168. package/dist/sap/base/i18n/Localization.js +12 -0
  169. package/dist/sap/base/i18n/Localization.js.map +1 -0
  170. package/dist/sap/base/i18n/date/CalendarType.js +43 -0
  171. package/dist/sap/base/i18n/date/CalendarWeekNumbering.js +105 -0
  172. package/dist/sap/base/i18n/date/TimezoneUtils.js +319 -0
  173. package/dist/sap/base/strings/camelize.js +30 -0
  174. package/dist/sap/base/strings/formatMessage.js +88 -15
  175. package/dist/sap/base/util/LoaderExtensions.d.ts +4 -0
  176. package/dist/sap/base/util/LoaderExtensions.js +9 -12
  177. package/dist/sap/base/util/LoaderExtensions.js.map +1 -0
  178. package/dist/sap/base/util/ObjectPath.d.ts +4 -0
  179. package/dist/sap/base/util/ObjectPath.js +4 -33
  180. package/dist/sap/base/util/ObjectPath.js.map +1 -0
  181. package/dist/sap/base/util/Version.js +157 -0
  182. package/dist/sap/base/util/_merge.js +83 -26
  183. package/dist/sap/base/util/array/uniqueSort.js +37 -15
  184. package/dist/sap/base/util/deepClone.js +102 -0
  185. package/dist/sap/base/util/deepEqual.js +75 -51
  186. package/dist/sap/base/util/extend.js +58 -7
  187. package/dist/sap/base/util/isEmptyObject.js +34 -0
  188. package/dist/sap/base/util/isPlainObject.js +35 -1
  189. package/dist/sap/base/util/now.js +24 -3
  190. package/dist/sap/base/util/resolveReference.js +3 -0
  191. package/dist/sap/base/util/uid.js +27 -0
  192. package/dist/sap/ui/base/DataType.js +657 -0
  193. package/dist/sap/ui/base/Interface.js +47 -1
  194. package/dist/sap/ui/base/Metadata.js +435 -171
  195. package/dist/sap/ui/base/Object.js +284 -48
  196. package/dist/sap/ui/core/CalendarType.js +24 -8
  197. package/dist/sap/ui/core/Configuration.d.ts +17 -0
  198. package/dist/sap/ui/core/Configuration.js +23 -0
  199. package/dist/sap/ui/core/Configuration.js.map +1 -0
  200. package/dist/sap/ui/core/Core.d.ts +25 -0
  201. package/dist/sap/ui/core/Core.js +7 -34
  202. package/dist/sap/ui/core/Core.js.map +1 -0
  203. package/dist/sap/ui/core/FormatSettings.d.ts +9 -0
  204. package/dist/sap/ui/core/FormatSettings.js +12 -0
  205. package/dist/sap/ui/core/FormatSettings.js.map +1 -0
  206. package/dist/sap/ui/core/Locale.js +190 -152
  207. package/dist/sap/ui/core/LocaleData.js +2665 -1228
  208. package/dist/sap/ui/core/Supportability.js +5 -0
  209. package/dist/sap/ui/core/Theming.js +539 -0
  210. package/dist/sap/ui/core/date/Buddhist.js +162 -93
  211. package/dist/sap/ui/core/date/CalendarUtils.js +65 -0
  212. package/dist/sap/ui/core/date/CalendarWeekNumbering.js +30 -0
  213. package/dist/sap/ui/core/date/Gregorian.js +25 -10
  214. package/dist/sap/ui/core/date/Islamic.js +298 -185
  215. package/dist/sap/ui/core/date/Japanese.js +212 -117
  216. package/dist/sap/ui/core/date/Persian.js +324 -195
  217. package/dist/sap/ui/core/date/UI5Date.js +991 -0
  218. package/dist/sap/ui/core/date/UniversalDate.js +1251 -217
  219. package/dist/sap/ui/core/date/_Calendars.js +10 -1
  220. package/dist/sap/ui/core/format/DateFormat.js +3139 -1965
  221. package/dist/sap/ui/core/format/TimezoneUtil.js +24 -83
  222. package/package-scripts.cjs +28 -0
  223. package/package.json +14 -6
  224. package/tsconfig.json +24 -0
  225. package/used-modules.txt +27 -2
  226. package/dist/Assets-static.js +0 -2
  227. package/dist/dates/calculateWeekNumber.js +0 -51
  228. package/dist/generated/json-imports/LocaleData-static.js +0 -90
  229. package/dist/sap/ui/Device.js +0 -5
  230. package/package-scripts.js +0 -35
  231. package/src/Assets-static.js +0 -2
  232. package/src/Assets.js +0 -2
  233. package/src/DateFormat.js +0 -3
  234. package/src/LocaleData.js +0 -3
  235. package/src/dates/CalendarDate.js +0 -229
  236. package/src/dates/ExtremeDates.js +0 -39
  237. package/src/dates/calculateWeekNumber.js +0 -51
  238. package/src/dates/convertMonthNumbersToMonthNames.js +0 -33
  239. package/src/dates/getDaysInMonth.js +0 -11
  240. package/src/dates/getRoundedTimestamp.js +0 -14
  241. package/src/dates/getTodayUTCTimestamp.js +0 -9
  242. package/src/dates/modifyDateBy.js +0 -42
  243. package/src/dates/transformDateToSecondaryType.js +0 -20
  244. package/src/getCachedLocaleDataInstance.js +0 -13
  245. package/src/locale/getLocaleData.js +0 -27
  246. package/src/sap/base/util/LoaderExtensions.js +0 -17
  247. package/src/sap/ui/core/Core.js +0 -40
  248. /package/{config/.eslintrc.js → .eslintrc.cjs} +0 -0
  249. /package/{src/features/calendar/Buddhist.js → dist/features/calendar/Buddhist.d.ts} +0 -0
  250. /package/{src/features/calendar/Gregorian.js → dist/features/calendar/Gregorian.d.ts} +0 -0
  251. /package/{src/features/calendar/Islamic.js → dist/features/calendar/Islamic.d.ts} +0 -0
  252. /package/{src/features/calendar/Japanese.js → dist/features/calendar/Japanese.d.ts} +0 -0
  253. /package/{src/features/calendar/Persian.js → dist/features/calendar/Persian.d.ts} +0 -0
@@ -1,6 +1,5 @@
1
1
  import getLocale from "@ui5/webcomponents-base/dist/locale/getLocale.js";
2
2
  import getCachedLocaleDataInstance from "../getCachedLocaleDataInstance.js";
3
-
4
3
  /**
5
4
  * Convert month number to month name (text).
6
5
  * If the numbers of the two months are the same you will get the name of the month,
@@ -12,22 +11,20 @@ import getCachedLocaleDataInstance from "../getCachedLocaleDataInstance.js";
12
11
  * @returns {String}
13
12
  */
14
13
  const convertMonthNumbersToMonthNames = (firstMonth, lastMonth, calendarType) => {
15
- const localeData = getCachedLocaleDataInstance(getLocale());
16
- const pattern = localeData.getIntervalPattern();
17
- const secondaryMonthsNames = localeData.getMonthsStandAlone("abbreviated", calendarType);
18
- const secondaryMonthsNamesWide = localeData.getMonthsStandAlone("wide", calendarType);
19
-
20
- if (firstMonth === lastMonth) {
21
- return {
22
- text: localeData.getMonths("abbreviated", calendarType)[firstMonth],
23
- textInfo: localeData.getMonths("wide", calendarType)[firstMonth],
24
- };
25
- }
26
-
27
- return {
28
- text: pattern.replace(/\{0\}/, secondaryMonthsNames[firstMonth]).replace(/\{1\}/, secondaryMonthsNames[lastMonth]),
29
- textInfo: pattern.replace(/\{0\}/, secondaryMonthsNamesWide[firstMonth]).replace(/\{1\}/, secondaryMonthsNamesWide[lastMonth]),
30
- };
14
+ const localeData = getCachedLocaleDataInstance(getLocale());
15
+ const pattern = localeData.getIntervalPattern("");
16
+ const secondaryMonthsNames = localeData.getMonthsStandAlone("abbreviated", calendarType);
17
+ const secondaryMonthsNamesWide = localeData.getMonthsStandAlone("wide", calendarType);
18
+ if (firstMonth === lastMonth) {
19
+ return {
20
+ text: localeData.getMonths("abbreviated", calendarType)[firstMonth],
21
+ textInfo: localeData.getMonths("wide", calendarType)[firstMonth],
22
+ };
23
+ }
24
+ return {
25
+ text: pattern.replace(/\{0\}/, secondaryMonthsNames[firstMonth]).replace(/\{1\}/, secondaryMonthsNames[lastMonth]),
26
+ textInfo: pattern.replace(/\{0\}/, secondaryMonthsNamesWide[firstMonth]).replace(/\{1\}/, secondaryMonthsNamesWide[lastMonth]),
27
+ };
31
28
  };
32
-
33
29
  export default convertMonthNumbersToMonthNames;
30
+ //# sourceMappingURL=convertMonthNumbersToMonthNames.js.map
@@ -0,0 +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,YAAgC,EAAE,EAAE;IACnH,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,CAAC;QAC9B,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;SAChE,CAAC;IACH,CAAC;IAED,OAAO;QACN,IAAI,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"]}
@@ -0,0 +1,3 @@
1
+ import CalendarDate from "./CalendarDate.js";
2
+ declare const getDaysInMonth: (date: CalendarDate) => number;
3
+ export default getDaysInMonth;
@@ -1,11 +1,10 @@
1
1
  import CalendarDate from "./CalendarDate.js";
2
-
3
- const getDaysInMonth = date => {
4
- const tempCalendarDate = new CalendarDate(date);
5
- tempCalendarDate.setDate(1);
6
- tempCalendarDate.setMonth(tempCalendarDate.getMonth() + 1);
7
- tempCalendarDate.setDate(0);
8
- return tempCalendarDate.getDate();
2
+ const getDaysInMonth = (date) => {
3
+ const tempCalendarDate = new CalendarDate(date);
4
+ tempCalendarDate.setDate(1);
5
+ tempCalendarDate.setMonth(tempCalendarDate.getMonth() + 1);
6
+ tempCalendarDate.setDate(0);
7
+ return tempCalendarDate.getDate();
9
8
  };
10
-
11
9
  export default getDaysInMonth;
10
+ //# sourceMappingURL=getDaysInMonth.js.map
@@ -0,0 +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","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"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns a timestamp with only the year, month and day (with zero hours, minutes and seconds) and without 000 for milliseconds
3
+ * @param { number } millisecondsUTC
4
+ * @returns { number }
5
+ */
6
+ declare const getRoundedTimestamp: (millisecondsUTC: number) => number;
7
+ export default getRoundedTimestamp;
@@ -1,14 +1,15 @@
1
1
  /**
2
2
  * Returns a timestamp with only the year, month and day (with zero hours, minutes and seconds) and without 000 for milliseconds
3
- * @param millisecondsUTC
4
- * @returns {number}
3
+ * @param { number } millisecondsUTC
4
+ * @returns { number }
5
5
  */
6
- const getRoundedTimestamp = millisecondsUTC => {
7
- if (!millisecondsUTC) {
8
- millisecondsUTC = new Date().getTime();
9
- }
10
- const rounded = millisecondsUTC - (millisecondsUTC % (24 * 60 * 60 * 1000));
11
- return rounded / 1000;
6
+ const getRoundedTimestamp = (millisecondsUTC) => {
7
+ if (!millisecondsUTC) {
8
+ // no need to replace with UI5Date, as we don't use any non-UTC functions
9
+ millisecondsUTC = new Date().getTime();
10
+ }
11
+ const rounded = millisecondsUTC - (millisecondsUTC % (24 * 60 * 60 * 1000));
12
+ return rounded / 1000;
12
13
  };
13
-
14
14
  export default getRoundedTimestamp;
15
+ //# sourceMappingURL=getRoundedTimestamp.js.map
@@ -0,0 +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,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"]}
@@ -0,0 +1,7 @@
1
+ import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
2
+ /**
3
+ * Returns a UTC timestamp representing today
4
+ * @public
5
+ */
6
+ declare const getTodayUTCTimestamp: (primaryCalendarType: `${CalendarType}`) => number;
7
+ export default getTodayUTCTimestamp;
@@ -1,9 +1,9 @@
1
1
  import CalendarDate from "./CalendarDate.js";
2
-
2
+ import UI5Date from "./UI5Date.js";
3
3
  /**
4
4
  * Returns a UTC timestamp representing today
5
5
  * @public
6
6
  */
7
- const getTodayUTCTimestamp = primaryCalendarType => CalendarDate.fromLocalJSDate(new Date(), primaryCalendarType).valueOf() / 1000;
8
-
7
+ const getTodayUTCTimestamp = (primaryCalendarType) => CalendarDate.fromLocalJSDate(UI5Date.getInstance(), primaryCalendarType).valueOf() / 1000;
9
8
  export default getTodayUTCTimestamp;
9
+ //# sourceMappingURL=getTodayUTCTimestamp.js.map
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,14 @@
1
+ import CalendarDate from "./CalendarDate.js";
2
+ /**
3
+ * Adds or subtracts a given amount of days/months/years from a date.
4
+ * If minDate or maxDate are given, the result will be enforced within these limits
5
+ *
6
+ * @param date CalendarDate instance
7
+ * @param amount how many days/months/years to add (can be a negative number)
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)
10
+ * @param minDate minimum date to enforce
11
+ * @param maxDate maximum date to enforce
12
+ */
13
+ declare const modifyDateBy: (date: CalendarDate, amount: number, unit: string, preserveDate?: boolean, minDate?: CalendarDate, maxDate?: CalendarDate) => CalendarDate;
14
+ export default modifyDateBy;
@@ -1,5 +1,4 @@
1
1
  import CalendarDate from "./CalendarDate.js";
2
-
3
2
  /**
4
3
  * Adds or subtracts a given amount of days/months/years from a date.
5
4
  * If minDate or maxDate are given, the result will be enforced within these limits
@@ -7,36 +6,50 @@ import CalendarDate from "./CalendarDate.js";
7
6
  * @param date CalendarDate instance
8
7
  * @param amount how many days/months/years to add (can be a negative number)
9
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)
10
10
  * @param minDate minimum date to enforce
11
11
  * @param maxDate maximum date to enforce
12
12
  */
13
- const modifyDateBy = (date, amount, unit, minDate = null, maxDate = null) => {
14
- const newDate = new CalendarDate(date);
15
- if (unit === "day") {
16
- newDate.setDate(date.getDate() + amount);
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
- } else {
25
- newDate.setYear(date.getYear() + amount);
26
- if (newDate.getMonth() !== date.getMonth()) { // f.e. 29th Feb to next/prev year
27
- newDate.setDate(0); // Select the last day of the month
28
- }
29
- }
30
-
31
- if (minDate && newDate.valueOf() < minDate.valueOf()) {
32
- return new CalendarDate(minDate);
33
- }
34
-
35
- if (maxDate && newDate.valueOf() > maxDate.valueOf()) {
36
- return new CalendarDate(maxDate);
37
- }
38
-
39
- return newDate;
13
+ const modifyDateBy = (date, amount, unit, preserveDate = true, minDate, maxDate) => {
14
+ const newDate = new CalendarDate(date);
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;
45
+ }
46
+ if (minDate && newDate.isBefore(minDate)) {
47
+ return new CalendarDate(minDate);
48
+ }
49
+ if (maxDate && newDate.isAfter(maxDate)) {
50
+ return new CalendarDate(maxDate);
51
+ }
52
+ return newDate;
40
53
  };
41
-
42
54
  export default modifyDateBy;
55
+ //# sourceMappingURL=modifyDateBy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modifyDateBy.js","sourceRoot":"","sources":["../../src/dates/modifyDateBy.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAE,MAAc,EAAE,IAAY,EAAE,YAAY,GAAG,IAAI,EAAE,OAAsB,EAAE,OAAsB,EAAE,EAAE;IAC9I,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAEvC,QAAQ,IAAI,EAAE,CAAC;QACf,KAAK,KAAK;YACT,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;YACzC,MAAM;QACP,KAAK,OAAO;YACX,IAAI,YAAY,EAAE,CAAC;gBAClB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,CAAC;gBAC3C,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,yCAAyC;gBACzH,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,sCAAsC;gBACrH,IAAI,cAAc,IAAI,YAAY,EAAE,CAAC,CAAC,+DAA+D;oBACpG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBACpB,CAAC;YACF,CAAC;iBAAM,CAAC;gBACP,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;oBAClB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC7C,CAAC;gBACD,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;oBACnB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBACpB,CAAC;YACF,CAAC;YACD,MAAM;QACP,KAAK,MAAM;YACV,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;YACzC,IAAI,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,kCAAkC;gBAC/E,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,mCAAmC;YACxD,CAAC;YACD,MAAM;QACP;YACC,MAAM;IACP,CAAC;IAED,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1C,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,YAAY,CAAC,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"]}
@@ -0,0 +1,7 @@
1
+ import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
2
+ import CalendarDate from "./CalendarDate.js";
3
+ declare const transformDateToSecondaryType: (primaryCalendarType: `${CalendarType}` | undefined, secondaryCalendarType: `${CalendarType}` | undefined, timeStamp: number, hasYearPicker?: boolean) => {
4
+ firstDate: CalendarDate;
5
+ lastDate: CalendarDate;
6
+ };
7
+ export default transformDateToSecondaryType;
@@ -1,20 +1,18 @@
1
1
  import CalendarDate from "./CalendarDate.js";
2
2
  import getDaysInMonth from "./getDaysInMonth.js";
3
-
3
+ import UI5Date from "./UI5Date.js";
4
4
  const transformDateToSecondaryType = (primaryCalendarType, secondaryCalendarType, timeStamp, hasYearPicker) => {
5
- let firstDate = CalendarDate.fromLocalJSDate(new Date(timeStamp * 1000), primaryCalendarType);
6
- let lastDate = CalendarDate.fromLocalJSDate(new Date(timeStamp * 1000), primaryCalendarType);
7
- firstDate.setDate(1);
8
-
9
- if (hasYearPicker) {
10
- firstDate.setMonth(0);
11
- lastDate.setMonth(11);
12
- }
13
-
14
- lastDate.setDate(getDaysInMonth(lastDate));
15
- firstDate = new CalendarDate(firstDate, secondaryCalendarType);
16
- lastDate = new CalendarDate(lastDate, secondaryCalendarType);
17
- return { firstDate, lastDate };
5
+ let firstDate = CalendarDate.fromLocalJSDate(UI5Date.getInstance(timeStamp * 1000), primaryCalendarType);
6
+ let lastDate = CalendarDate.fromLocalJSDate(UI5Date.getInstance(timeStamp * 1000), primaryCalendarType);
7
+ firstDate.setDate(1);
8
+ if (hasYearPicker) {
9
+ firstDate.setMonth(0);
10
+ lastDate.setMonth(11);
11
+ }
12
+ lastDate.setDate(getDaysInMonth(lastDate));
13
+ firstDate = new CalendarDate(firstDate, secondaryCalendarType);
14
+ lastDate = new CalendarDate(lastDate, secondaryCalendarType);
15
+ return { firstDate, lastDate };
18
16
  };
19
-
20
17
  export default transformDateToSecondaryType;
18
+ //# sourceMappingURL=transformDateToSecondaryType.js.map
@@ -0,0 +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;AACjD,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,4BAA4B,GAAG,CAAC,mBAAkD,EAAE,qBAAmD,EAAE,SAAiB,EAAE,aAAuB,EAAE,EAAE;IAC5L,IAAI,SAAS,GAAG,YAAY,CAAC,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,mBAAmB,CAAC,CAAC;IACzG,IAAI,QAAQ,GAAG,YAAY,CAAC,eAAe,CAAC,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,2 @@
1
1
  import "../../sap/ui/core/date/Buddhist.js";
2
+ //# sourceMappingURL=Buddhist.js.map
@@ -0,0 +1 @@
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,2 @@
1
1
  import "../../sap/ui/core/date/Gregorian.js";
2
+ //# sourceMappingURL=Gregorian.js.map
@@ -0,0 +1 @@
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,2 @@
1
1
  import "../../sap/ui/core/date/Islamic.js";
2
+ //# sourceMappingURL=Islamic.js.map
@@ -0,0 +1 @@
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,2 @@
1
1
  import "../../sap/ui/core/date/Japanese.js";
2
+ //# sourceMappingURL=Japanese.js.map
@@ -0,0 +1 @@
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,2 @@
1
1
  import "../../sap/ui/core/date/Persian.js";
2
+ //# sourceMappingURL=Persian.js.map
@@ -0,0 +1 @@
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.