@cdx-ui/formatters 0.0.1-beta.132

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 (464) hide show
  1. package/README.md +108 -0
  2. package/lib/commonjs/dates/calendar/formatCalendarMonthYear.js +28 -0
  3. package/lib/commonjs/dates/calendar/formatCalendarMonthYear.js.map +1 -0
  4. package/lib/commonjs/dates/calendar/formatDateTimeListDateRow.js +40 -0
  5. package/lib/commonjs/dates/calendar/formatDateTimeListDateRow.js.map +1 -0
  6. package/lib/commonjs/dates/calendar/formatMonthCalendarMonth.js +28 -0
  7. package/lib/commonjs/dates/calendar/formatMonthCalendarMonth.js.map +1 -0
  8. package/lib/commonjs/dates/calendar/formatMonthCalendarYear.js +16 -0
  9. package/lib/commonjs/dates/calendar/formatMonthCalendarYear.js.map +1 -0
  10. package/lib/commonjs/dates/calendar/getCalendarWeekdayLabels.js +23 -0
  11. package/lib/commonjs/dates/calendar/getCalendarWeekdayLabels.js.map +1 -0
  12. package/lib/commonjs/dates/datetime/clampDateTimeId.js +27 -0
  13. package/lib/commonjs/dates/datetime/clampDateTimeId.js.map +1 -0
  14. package/lib/commonjs/dates/datetime/compareDateTimeIds.js +28 -0
  15. package/lib/commonjs/dates/datetime/compareDateTimeIds.js.map +1 -0
  16. package/lib/commonjs/dates/datetime/dateTimeId.js +38 -0
  17. package/lib/commonjs/dates/datetime/dateTimeId.js.map +1 -0
  18. package/lib/commonjs/dates/datetime/formatDateTimeId.js +27 -0
  19. package/lib/commonjs/dates/datetime/formatDateTimeId.js.map +1 -0
  20. package/lib/commonjs/dates/datetime/formatDateTimeListHour.js +21 -0
  21. package/lib/commonjs/dates/datetime/formatDateTimeListHour.js.map +1 -0
  22. package/lib/commonjs/dates/datetime/formatDateTimeListMinute.js +16 -0
  23. package/lib/commonjs/dates/datetime/formatDateTimeListMinute.js.map +1 -0
  24. package/lib/commonjs/dates/datetime/formatDateTimeListPeriod.js +17 -0
  25. package/lib/commonjs/dates/datetime/formatDateTimeListPeriod.js.map +1 -0
  26. package/lib/commonjs/dates/datetime/isLocaleHour12.js +30 -0
  27. package/lib/commonjs/dates/datetime/isLocaleHour12.js.map +1 -0
  28. package/lib/commonjs/dates/datetime/isValidDateTimeId.js +23 -0
  29. package/lib/commonjs/dates/datetime/isValidDateTimeId.js.map +1 -0
  30. package/lib/commonjs/dates/datetime/nowDateTimeId.js +57 -0
  31. package/lib/commonjs/dates/datetime/nowDateTimeId.js.map +1 -0
  32. package/lib/commonjs/dates/datetime/parseDateTimeId.js +29 -0
  33. package/lib/commonjs/dates/datetime/parseDateTimeId.js.map +1 -0
  34. package/lib/commonjs/dates/display/formatDateForDisplay.js +28 -0
  35. package/lib/commonjs/dates/display/formatDateForDisplay.js.map +1 -0
  36. package/lib/commonjs/dates/display/formatDateRangeForDisplay.js +25 -0
  37. package/lib/commonjs/dates/display/formatDateRangeForDisplay.js.map +1 -0
  38. package/lib/commonjs/dates/display/formatDateTimeForDisplay.js +34 -0
  39. package/lib/commonjs/dates/display/formatDateTimeForDisplay.js.map +1 -0
  40. package/lib/commonjs/dates/display/formatMonthForDisplay.js +33 -0
  41. package/lib/commonjs/dates/display/formatMonthForDisplay.js.map +1 -0
  42. package/lib/commonjs/dates/index.js +367 -0
  43. package/lib/commonjs/dates/index.js.map +1 -0
  44. package/lib/commonjs/dates/internal/brand.js +19 -0
  45. package/lib/commonjs/dates/internal/brand.js.map +1 -0
  46. package/lib/commonjs/dates/internal/calendarHelpers.js +22 -0
  47. package/lib/commonjs/dates/internal/calendarHelpers.js.map +1 -0
  48. package/lib/commonjs/dates/internal/clampHelpers.js +20 -0
  49. package/lib/commonjs/dates/internal/clampHelpers.js.map +1 -0
  50. package/lib/commonjs/dates/internal/dateIdToNativeDate.js +20 -0
  51. package/lib/commonjs/dates/internal/dateIdToNativeDate.js.map +1 -0
  52. package/lib/commonjs/dates/internal/intlCache.js +52 -0
  53. package/lib/commonjs/dates/internal/intlCache.js.map +1 -0
  54. package/lib/commonjs/dates/internal/intlCopy.js +72 -0
  55. package/lib/commonjs/dates/internal/intlCopy.js.map +1 -0
  56. package/lib/commonjs/dates/internal/segmentBuilders.js +98 -0
  57. package/lib/commonjs/dates/internal/segmentBuilders.js.map +1 -0
  58. package/lib/commonjs/dates/labels/dateComponentLabels.js +57 -0
  59. package/lib/commonjs/dates/labels/dateComponentLabels.js.map +1 -0
  60. package/lib/commonjs/dates/ranges/compareDateIds.js +26 -0
  61. package/lib/commonjs/dates/ranges/compareDateIds.js.map +1 -0
  62. package/lib/commonjs/dates/ranges/compareMonthIds.js +31 -0
  63. package/lib/commonjs/dates/ranges/compareMonthIds.js.map +1 -0
  64. package/lib/commonjs/dates/ranges/dateRangeAroundDay.js +25 -0
  65. package/lib/commonjs/dates/ranges/dateRangeAroundDay.js.map +1 -0
  66. package/lib/commonjs/dates/ranges/dateRangeFromLastNDays.js +28 -0
  67. package/lib/commonjs/dates/ranges/dateRangeFromLastNDays.js.map +1 -0
  68. package/lib/commonjs/dates/ranges/eachDateIdInRange.js +29 -0
  69. package/lib/commonjs/dates/ranges/eachDateIdInRange.js.map +1 -0
  70. package/lib/commonjs/dates/ranges/normalizeDateRange.js +23 -0
  71. package/lib/commonjs/dates/ranges/normalizeDateRange.js.map +1 -0
  72. package/lib/commonjs/dates/segments/applyDateSegmentChange.js +77 -0
  73. package/lib/commonjs/dates/segments/applyDateSegmentChange.js.map +1 -0
  74. package/lib/commonjs/dates/segments/formatDateSegment.js +19 -0
  75. package/lib/commonjs/dates/segments/formatDateSegment.js.map +1 -0
  76. package/lib/commonjs/dates/segments/getDateFieldSegments.js +44 -0
  77. package/lib/commonjs/dates/segments/getDateFieldSegments.js.map +1 -0
  78. package/lib/commonjs/dates/segments/getDateTimeFieldSegments.js +150 -0
  79. package/lib/commonjs/dates/segments/getDateTimeFieldSegments.js.map +1 -0
  80. package/lib/commonjs/dates/segments/getDateTimeSegmentVisibility.js +15 -0
  81. package/lib/commonjs/dates/segments/getDateTimeSegmentVisibility.js.map +1 -0
  82. package/lib/commonjs/dates/segments/getEmptyDateSegmentText.js +17 -0
  83. package/lib/commonjs/dates/segments/getEmptyDateSegmentText.js.map +1 -0
  84. package/lib/commonjs/dates/segments/parseDateSegment.js +26 -0
  85. package/lib/commonjs/dates/segments/parseDateSegment.js.map +1 -0
  86. package/lib/commonjs/dates/types.js +2 -0
  87. package/lib/commonjs/dates/types.js.map +1 -0
  88. package/lib/commonjs/dates/wire/clampDateParts.js +26 -0
  89. package/lib/commonjs/dates/wire/clampDateParts.js.map +1 -0
  90. package/lib/commonjs/dates/wire/clampMonthParts.js +23 -0
  91. package/lib/commonjs/dates/wire/clampMonthParts.js.map +1 -0
  92. package/lib/commonjs/dates/wire/dateId.js +50 -0
  93. package/lib/commonjs/dates/wire/dateId.js.map +1 -0
  94. package/lib/commonjs/dates/wire/formatDateId.js +25 -0
  95. package/lib/commonjs/dates/wire/formatDateId.js.map +1 -0
  96. package/lib/commonjs/dates/wire/formatMonthId.js +21 -0
  97. package/lib/commonjs/dates/wire/formatMonthId.js.map +1 -0
  98. package/lib/commonjs/dates/wire/isValidDateId.js +27 -0
  99. package/lib/commonjs/dates/wire/isValidDateId.js.map +1 -0
  100. package/lib/commonjs/dates/wire/isValidDateParts.js +18 -0
  101. package/lib/commonjs/dates/wire/isValidDateParts.js.map +1 -0
  102. package/lib/commonjs/dates/wire/isValidMonthId.js +27 -0
  103. package/lib/commonjs/dates/wire/isValidMonthId.js.map +1 -0
  104. package/lib/commonjs/dates/wire/isValidMonthParts.js +16 -0
  105. package/lib/commonjs/dates/wire/isValidMonthParts.js.map +1 -0
  106. package/lib/commonjs/dates/wire/monthId.js +47 -0
  107. package/lib/commonjs/dates/wire/monthId.js.map +1 -0
  108. package/lib/commonjs/dates/wire/parseDateId.js +29 -0
  109. package/lib/commonjs/dates/wire/parseDateId.js.map +1 -0
  110. package/lib/commonjs/dates/wire/parseMonthId.js +28 -0
  111. package/lib/commonjs/dates/wire/parseMonthId.js.map +1 -0
  112. package/lib/commonjs/dates/wire/toMonthId.js +22 -0
  113. package/lib/commonjs/dates/wire/toMonthId.js.map +1 -0
  114. package/lib/commonjs/dates/wire/todayDateId.js +17 -0
  115. package/lib/commonjs/dates/wire/todayDateId.js.map +1 -0
  116. package/lib/commonjs/dates/wire/todayMonthId.js +17 -0
  117. package/lib/commonjs/dates/wire/todayMonthId.js.map +1 -0
  118. package/lib/commonjs/formatNumber.js +50 -0
  119. package/lib/commonjs/formatNumber.js.map +1 -0
  120. package/lib/commonjs/index.js +326 -0
  121. package/lib/commonjs/index.js.map +1 -0
  122. package/lib/commonjs/package.json +1 -0
  123. package/lib/commonjs/types.js +2 -0
  124. package/lib/commonjs/types.js.map +1 -0
  125. package/lib/commonjs/utils.js +33 -0
  126. package/lib/commonjs/utils.js.map +1 -0
  127. package/lib/module/dates/calendar/formatCalendarMonthYear.js +24 -0
  128. package/lib/module/dates/calendar/formatCalendarMonthYear.js.map +1 -0
  129. package/lib/module/dates/calendar/formatDateTimeListDateRow.js +36 -0
  130. package/lib/module/dates/calendar/formatDateTimeListDateRow.js.map +1 -0
  131. package/lib/module/dates/calendar/formatMonthCalendarMonth.js +24 -0
  132. package/lib/module/dates/calendar/formatMonthCalendarMonth.js.map +1 -0
  133. package/lib/module/dates/calendar/formatMonthCalendarYear.js +12 -0
  134. package/lib/module/dates/calendar/formatMonthCalendarYear.js.map +1 -0
  135. package/lib/module/dates/calendar/getCalendarWeekdayLabels.js +19 -0
  136. package/lib/module/dates/calendar/getCalendarWeekdayLabels.js.map +1 -0
  137. package/lib/module/dates/datetime/clampDateTimeId.js +24 -0
  138. package/lib/module/dates/datetime/clampDateTimeId.js.map +1 -0
  139. package/lib/module/dates/datetime/compareDateTimeIds.js +24 -0
  140. package/lib/module/dates/datetime/compareDateTimeIds.js.map +1 -0
  141. package/lib/module/dates/datetime/dateTimeId.js +35 -0
  142. package/lib/module/dates/datetime/dateTimeId.js.map +1 -0
  143. package/lib/module/dates/datetime/formatDateTimeId.js +23 -0
  144. package/lib/module/dates/datetime/formatDateTimeId.js.map +1 -0
  145. package/lib/module/dates/datetime/formatDateTimeListHour.js +17 -0
  146. package/lib/module/dates/datetime/formatDateTimeListHour.js.map +1 -0
  147. package/lib/module/dates/datetime/formatDateTimeListMinute.js +12 -0
  148. package/lib/module/dates/datetime/formatDateTimeListMinute.js.map +1 -0
  149. package/lib/module/dates/datetime/formatDateTimeListPeriod.js +13 -0
  150. package/lib/module/dates/datetime/formatDateTimeListPeriod.js.map +1 -0
  151. package/lib/module/dates/datetime/isLocaleHour12.js +26 -0
  152. package/lib/module/dates/datetime/isLocaleHour12.js.map +1 -0
  153. package/lib/module/dates/datetime/isValidDateTimeId.js +19 -0
  154. package/lib/module/dates/datetime/isValidDateTimeId.js.map +1 -0
  155. package/lib/module/dates/datetime/nowDateTimeId.js +54 -0
  156. package/lib/module/dates/datetime/nowDateTimeId.js.map +1 -0
  157. package/lib/module/dates/datetime/parseDateTimeId.js +26 -0
  158. package/lib/module/dates/datetime/parseDateTimeId.js.map +1 -0
  159. package/lib/module/dates/display/formatDateForDisplay.js +24 -0
  160. package/lib/module/dates/display/formatDateForDisplay.js.map +1 -0
  161. package/lib/module/dates/display/formatDateRangeForDisplay.js +22 -0
  162. package/lib/module/dates/display/formatDateRangeForDisplay.js.map +1 -0
  163. package/lib/module/dates/display/formatDateTimeForDisplay.js +30 -0
  164. package/lib/module/dates/display/formatDateTimeForDisplay.js.map +1 -0
  165. package/lib/module/dates/display/formatMonthForDisplay.js +29 -0
  166. package/lib/module/dates/display/formatMonthForDisplay.js.map +1 -0
  167. package/lib/module/dates/index.js +59 -0
  168. package/lib/module/dates/index.js.map +1 -0
  169. package/lib/module/dates/internal/brand.js +12 -0
  170. package/lib/module/dates/internal/brand.js.map +1 -0
  171. package/lib/module/dates/internal/calendarHelpers.js +19 -0
  172. package/lib/module/dates/internal/calendarHelpers.js.map +1 -0
  173. package/lib/module/dates/internal/clampHelpers.js +14 -0
  174. package/lib/module/dates/internal/clampHelpers.js.map +1 -0
  175. package/lib/module/dates/internal/dateIdToNativeDate.js +16 -0
  176. package/lib/module/dates/internal/dateIdToNativeDate.js.map +1 -0
  177. package/lib/module/dates/internal/intlCache.js +47 -0
  178. package/lib/module/dates/internal/intlCache.js.map +1 -0
  179. package/lib/module/dates/internal/intlCopy.js +66 -0
  180. package/lib/module/dates/internal/intlCopy.js.map +1 -0
  181. package/lib/module/dates/internal/segmentBuilders.js +91 -0
  182. package/lib/module/dates/internal/segmentBuilders.js.map +1 -0
  183. package/lib/module/dates/labels/dateComponentLabels.js +50 -0
  184. package/lib/module/dates/labels/dateComponentLabels.js.map +1 -0
  185. package/lib/module/dates/ranges/compareDateIds.js +22 -0
  186. package/lib/module/dates/ranges/compareDateIds.js.map +1 -0
  187. package/lib/module/dates/ranges/compareMonthIds.js +27 -0
  188. package/lib/module/dates/ranges/compareMonthIds.js.map +1 -0
  189. package/lib/module/dates/ranges/dateRangeAroundDay.js +21 -0
  190. package/lib/module/dates/ranges/dateRangeAroundDay.js.map +1 -0
  191. package/lib/module/dates/ranges/dateRangeFromLastNDays.js +24 -0
  192. package/lib/module/dates/ranges/dateRangeFromLastNDays.js.map +1 -0
  193. package/lib/module/dates/ranges/eachDateIdInRange.js +26 -0
  194. package/lib/module/dates/ranges/eachDateIdInRange.js.map +1 -0
  195. package/lib/module/dates/ranges/normalizeDateRange.js +20 -0
  196. package/lib/module/dates/ranges/normalizeDateRange.js.map +1 -0
  197. package/lib/module/dates/segments/applyDateSegmentChange.js +73 -0
  198. package/lib/module/dates/segments/applyDateSegmentChange.js.map +1 -0
  199. package/lib/module/dates/segments/formatDateSegment.js +15 -0
  200. package/lib/module/dates/segments/formatDateSegment.js.map +1 -0
  201. package/lib/module/dates/segments/getDateFieldSegments.js +40 -0
  202. package/lib/module/dates/segments/getDateFieldSegments.js.map +1 -0
  203. package/lib/module/dates/segments/getDateTimeFieldSegments.js +147 -0
  204. package/lib/module/dates/segments/getDateTimeFieldSegments.js.map +1 -0
  205. package/lib/module/dates/segments/getDateTimeSegmentVisibility.js +11 -0
  206. package/lib/module/dates/segments/getDateTimeSegmentVisibility.js.map +1 -0
  207. package/lib/module/dates/segments/getEmptyDateSegmentText.js +13 -0
  208. package/lib/module/dates/segments/getEmptyDateSegmentText.js.map +1 -0
  209. package/lib/module/dates/segments/parseDateSegment.js +22 -0
  210. package/lib/module/dates/segments/parseDateSegment.js.map +1 -0
  211. package/lib/module/dates/types.js +2 -0
  212. package/lib/module/dates/types.js.map +1 -0
  213. package/lib/module/dates/wire/clampDateParts.js +22 -0
  214. package/lib/module/dates/wire/clampDateParts.js.map +1 -0
  215. package/lib/module/dates/wire/clampMonthParts.js +19 -0
  216. package/lib/module/dates/wire/clampMonthParts.js.map +1 -0
  217. package/lib/module/dates/wire/dateId.js +47 -0
  218. package/lib/module/dates/wire/dateId.js.map +1 -0
  219. package/lib/module/dates/wire/formatDateId.js +22 -0
  220. package/lib/module/dates/wire/formatDateId.js.map +1 -0
  221. package/lib/module/dates/wire/formatMonthId.js +17 -0
  222. package/lib/module/dates/wire/formatMonthId.js.map +1 -0
  223. package/lib/module/dates/wire/isValidDateId.js +23 -0
  224. package/lib/module/dates/wire/isValidDateId.js.map +1 -0
  225. package/lib/module/dates/wire/isValidDateParts.js +14 -0
  226. package/lib/module/dates/wire/isValidDateParts.js.map +1 -0
  227. package/lib/module/dates/wire/isValidMonthId.js +23 -0
  228. package/lib/module/dates/wire/isValidMonthId.js.map +1 -0
  229. package/lib/module/dates/wire/isValidMonthParts.js +12 -0
  230. package/lib/module/dates/wire/isValidMonthParts.js.map +1 -0
  231. package/lib/module/dates/wire/monthId.js +44 -0
  232. package/lib/module/dates/wire/monthId.js.map +1 -0
  233. package/lib/module/dates/wire/parseDateId.js +26 -0
  234. package/lib/module/dates/wire/parseDateId.js.map +1 -0
  235. package/lib/module/dates/wire/parseMonthId.js +25 -0
  236. package/lib/module/dates/wire/parseMonthId.js.map +1 -0
  237. package/lib/module/dates/wire/toMonthId.js +18 -0
  238. package/lib/module/dates/wire/toMonthId.js.map +1 -0
  239. package/lib/module/dates/wire/todayDateId.js +13 -0
  240. package/lib/module/dates/wire/todayDateId.js.map +1 -0
  241. package/lib/module/dates/wire/todayMonthId.js +13 -0
  242. package/lib/module/dates/wire/todayMonthId.js.map +1 -0
  243. package/lib/module/formatNumber.js +46 -0
  244. package/lib/module/formatNumber.js.map +1 -0
  245. package/lib/module/index.js +17 -0
  246. package/lib/module/index.js.map +1 -0
  247. package/lib/module/types.js +2 -0
  248. package/lib/module/types.js.map +1 -0
  249. package/lib/module/utils.js +29 -0
  250. package/lib/module/utils.js.map +1 -0
  251. package/lib/typescript/dates/calendar/formatCalendarMonthYear.d.ts +12 -0
  252. package/lib/typescript/dates/calendar/formatCalendarMonthYear.d.ts.map +1 -0
  253. package/lib/typescript/dates/calendar/formatDateTimeListDateRow.d.ts +13 -0
  254. package/lib/typescript/dates/calendar/formatDateTimeListDateRow.d.ts.map +1 -0
  255. package/lib/typescript/dates/calendar/formatMonthCalendarMonth.d.ts +13 -0
  256. package/lib/typescript/dates/calendar/formatMonthCalendarMonth.d.ts.map +1 -0
  257. package/lib/typescript/dates/calendar/formatMonthCalendarYear.d.ts +8 -0
  258. package/lib/typescript/dates/calendar/formatMonthCalendarYear.d.ts.map +1 -0
  259. package/lib/typescript/dates/calendar/getCalendarWeekdayLabels.d.ts +12 -0
  260. package/lib/typescript/dates/calendar/getCalendarWeekdayLabels.d.ts.map +1 -0
  261. package/lib/typescript/dates/datetime/clampDateTimeId.d.ts +16 -0
  262. package/lib/typescript/dates/datetime/clampDateTimeId.d.ts.map +1 -0
  263. package/lib/typescript/dates/datetime/compareDateTimeIds.d.ts +13 -0
  264. package/lib/typescript/dates/datetime/compareDateTimeIds.d.ts.map +1 -0
  265. package/lib/typescript/dates/datetime/dateTimeId.d.ts +18 -0
  266. package/lib/typescript/dates/datetime/dateTimeId.d.ts.map +1 -0
  267. package/lib/typescript/dates/datetime/formatDateTimeId.d.ts +12 -0
  268. package/lib/typescript/dates/datetime/formatDateTimeId.d.ts.map +1 -0
  269. package/lib/typescript/dates/datetime/formatDateTimeListHour.d.ts +11 -0
  270. package/lib/typescript/dates/datetime/formatDateTimeListHour.d.ts.map +1 -0
  271. package/lib/typescript/dates/datetime/formatDateTimeListMinute.d.ts +8 -0
  272. package/lib/typescript/dates/datetime/formatDateTimeListMinute.d.ts.map +1 -0
  273. package/lib/typescript/dates/datetime/formatDateTimeListPeriod.d.ts +9 -0
  274. package/lib/typescript/dates/datetime/formatDateTimeListPeriod.d.ts.map +1 -0
  275. package/lib/typescript/dates/datetime/isLocaleHour12.d.ts +12 -0
  276. package/lib/typescript/dates/datetime/isLocaleHour12.d.ts.map +1 -0
  277. package/lib/typescript/dates/datetime/isValidDateTimeId.d.ts +9 -0
  278. package/lib/typescript/dates/datetime/isValidDateTimeId.d.ts.map +1 -0
  279. package/lib/typescript/dates/datetime/nowDateTimeId.d.ts +14 -0
  280. package/lib/typescript/dates/datetime/nowDateTimeId.d.ts.map +1 -0
  281. package/lib/typescript/dates/datetime/parseDateTimeId.d.ts +9 -0
  282. package/lib/typescript/dates/datetime/parseDateTimeId.d.ts.map +1 -0
  283. package/lib/typescript/dates/display/formatDateForDisplay.d.ts +13 -0
  284. package/lib/typescript/dates/display/formatDateForDisplay.d.ts.map +1 -0
  285. package/lib/typescript/dates/display/formatDateRangeForDisplay.d.ts +16 -0
  286. package/lib/typescript/dates/display/formatDateRangeForDisplay.d.ts.map +1 -0
  287. package/lib/typescript/dates/display/formatDateTimeForDisplay.d.ts +13 -0
  288. package/lib/typescript/dates/display/formatDateTimeForDisplay.d.ts.map +1 -0
  289. package/lib/typescript/dates/display/formatMonthForDisplay.d.ts +13 -0
  290. package/lib/typescript/dates/display/formatMonthForDisplay.d.ts.map +1 -0
  291. package/lib/typescript/dates/index.d.ts +58 -0
  292. package/lib/typescript/dates/index.d.ts.map +1 -0
  293. package/lib/typescript/dates/internal/brand.d.ts +11 -0
  294. package/lib/typescript/dates/internal/brand.d.ts.map +1 -0
  295. package/lib/typescript/dates/internal/calendarHelpers.d.ts +8 -0
  296. package/lib/typescript/dates/internal/calendarHelpers.d.ts.map +1 -0
  297. package/lib/typescript/dates/internal/clampHelpers.d.ts +5 -0
  298. package/lib/typescript/dates/internal/clampHelpers.d.ts.map +1 -0
  299. package/lib/typescript/dates/internal/dateIdToNativeDate.d.ts +12 -0
  300. package/lib/typescript/dates/internal/dateIdToNativeDate.d.ts.map +1 -0
  301. package/lib/typescript/dates/internal/intlCache.d.ts +12 -0
  302. package/lib/typescript/dates/internal/intlCache.d.ts.map +1 -0
  303. package/lib/typescript/dates/internal/intlCopy.d.ts +10 -0
  304. package/lib/typescript/dates/internal/intlCopy.d.ts.map +1 -0
  305. package/lib/typescript/dates/internal/segmentBuilders.d.ts +12 -0
  306. package/lib/typescript/dates/internal/segmentBuilders.d.ts.map +1 -0
  307. package/lib/typescript/dates/labels/dateComponentLabels.d.ts +31 -0
  308. package/lib/typescript/dates/labels/dateComponentLabels.d.ts.map +1 -0
  309. package/lib/typescript/dates/ranges/compareDateIds.d.ts +10 -0
  310. package/lib/typescript/dates/ranges/compareDateIds.d.ts.map +1 -0
  311. package/lib/typescript/dates/ranges/compareMonthIds.d.ts +10 -0
  312. package/lib/typescript/dates/ranges/compareMonthIds.d.ts.map +1 -0
  313. package/lib/typescript/dates/ranges/dateRangeAroundDay.d.ts +14 -0
  314. package/lib/typescript/dates/ranges/dateRangeAroundDay.d.ts.map +1 -0
  315. package/lib/typescript/dates/ranges/dateRangeFromLastNDays.d.ts +16 -0
  316. package/lib/typescript/dates/ranges/dateRangeFromLastNDays.d.ts.map +1 -0
  317. package/lib/typescript/dates/ranges/eachDateIdInRange.d.ts +10 -0
  318. package/lib/typescript/dates/ranges/eachDateIdInRange.d.ts.map +1 -0
  319. package/lib/typescript/dates/ranges/normalizeDateRange.d.ts +15 -0
  320. package/lib/typescript/dates/ranges/normalizeDateRange.d.ts.map +1 -0
  321. package/lib/typescript/dates/segments/applyDateSegmentChange.d.ts +21 -0
  322. package/lib/typescript/dates/segments/applyDateSegmentChange.d.ts.map +1 -0
  323. package/lib/typescript/dates/segments/formatDateSegment.d.ts +13 -0
  324. package/lib/typescript/dates/segments/formatDateSegment.d.ts.map +1 -0
  325. package/lib/typescript/dates/segments/getDateFieldSegments.d.ts +13 -0
  326. package/lib/typescript/dates/segments/getDateFieldSegments.d.ts.map +1 -0
  327. package/lib/typescript/dates/segments/getDateTimeFieldSegments.d.ts +14 -0
  328. package/lib/typescript/dates/segments/getDateTimeFieldSegments.d.ts.map +1 -0
  329. package/lib/typescript/dates/segments/getDateTimeSegmentVisibility.d.ts +8 -0
  330. package/lib/typescript/dates/segments/getDateTimeSegmentVisibility.d.ts.map +1 -0
  331. package/lib/typescript/dates/segments/getEmptyDateSegmentText.d.ts +9 -0
  332. package/lib/typescript/dates/segments/getEmptyDateSegmentText.d.ts.map +1 -0
  333. package/lib/typescript/dates/segments/parseDateSegment.d.ts +13 -0
  334. package/lib/typescript/dates/segments/parseDateSegment.d.ts.map +1 -0
  335. package/lib/typescript/dates/types.d.ts +66 -0
  336. package/lib/typescript/dates/types.d.ts.map +1 -0
  337. package/lib/typescript/dates/wire/clampDateParts.d.ts +12 -0
  338. package/lib/typescript/dates/wire/clampDateParts.d.ts.map +1 -0
  339. package/lib/typescript/dates/wire/clampMonthParts.d.ts +12 -0
  340. package/lib/typescript/dates/wire/clampMonthParts.d.ts.map +1 -0
  341. package/lib/typescript/dates/wire/dateId.d.ts +24 -0
  342. package/lib/typescript/dates/wire/dateId.d.ts.map +1 -0
  343. package/lib/typescript/dates/wire/formatDateId.d.ts +12 -0
  344. package/lib/typescript/dates/wire/formatDateId.d.ts.map +1 -0
  345. package/lib/typescript/dates/wire/formatMonthId.d.ts +12 -0
  346. package/lib/typescript/dates/wire/formatMonthId.d.ts.map +1 -0
  347. package/lib/typescript/dates/wire/isValidDateId.d.ts +13 -0
  348. package/lib/typescript/dates/wire/isValidDateId.d.ts.map +1 -0
  349. package/lib/typescript/dates/wire/isValidDateParts.d.ts +9 -0
  350. package/lib/typescript/dates/wire/isValidDateParts.d.ts.map +1 -0
  351. package/lib/typescript/dates/wire/isValidMonthId.d.ts +13 -0
  352. package/lib/typescript/dates/wire/isValidMonthId.d.ts.map +1 -0
  353. package/lib/typescript/dates/wire/isValidMonthParts.d.ts +9 -0
  354. package/lib/typescript/dates/wire/isValidMonthParts.d.ts.map +1 -0
  355. package/lib/typescript/dates/wire/monthId.d.ts +22 -0
  356. package/lib/typescript/dates/wire/monthId.d.ts.map +1 -0
  357. package/lib/typescript/dates/wire/parseDateId.d.ts +12 -0
  358. package/lib/typescript/dates/wire/parseDateId.d.ts.map +1 -0
  359. package/lib/typescript/dates/wire/parseMonthId.d.ts +12 -0
  360. package/lib/typescript/dates/wire/parseMonthId.d.ts.map +1 -0
  361. package/lib/typescript/dates/wire/toMonthId.d.ts +12 -0
  362. package/lib/typescript/dates/wire/toMonthId.d.ts.map +1 -0
  363. package/lib/typescript/dates/wire/todayDateId.d.ts +8 -0
  364. package/lib/typescript/dates/wire/todayDateId.d.ts.map +1 -0
  365. package/lib/typescript/dates/wire/todayMonthId.d.ts +8 -0
  366. package/lib/typescript/dates/wire/todayMonthId.d.ts.map +1 -0
  367. package/lib/typescript/formatNumber.d.ts +19 -0
  368. package/lib/typescript/formatNumber.d.ts.map +1 -0
  369. package/lib/typescript/index.d.ts +5 -0
  370. package/lib/typescript/index.d.ts.map +1 -0
  371. package/lib/typescript/types.d.ts +2 -0
  372. package/lib/typescript/types.d.ts.map +1 -0
  373. package/lib/typescript/utils.d.ts +10 -0
  374. package/lib/typescript/utils.d.ts.map +1 -0
  375. package/package.json +50 -0
  376. package/src/__tests__/applyDateSegmentChange.test.ts +26 -0
  377. package/src/__tests__/calendarFormatters.test.ts +35 -0
  378. package/src/__tests__/clampDateParts.test.ts +16 -0
  379. package/src/__tests__/compareDateIds.test.ts +7 -0
  380. package/src/__tests__/compareMonthIds.test.ts +19 -0
  381. package/src/__tests__/dateComponentLabels.test.ts +25 -0
  382. package/src/__tests__/dateRangeAroundDay.test.ts +10 -0
  383. package/src/__tests__/dateRangeFromLastNDays.test.ts +8 -0
  384. package/src/__tests__/dateSegmentHelpers.test.ts +24 -0
  385. package/src/__tests__/datetimeHelpers.test.ts +65 -0
  386. package/src/__tests__/displayFormatters.test.ts +34 -0
  387. package/src/__tests__/eachDateIdInRange.test.ts +11 -0
  388. package/src/__tests__/formatCalendarMonthYear.test.ts +9 -0
  389. package/src/__tests__/formatDateForDisplay.test.ts +11 -0
  390. package/src/__tests__/formatDateId.test.ts +15 -0
  391. package/src/__tests__/formatMonthId.test.ts +7 -0
  392. package/src/__tests__/formatNumber.test.ts +35 -0
  393. package/src/__tests__/getDateFieldSegments.test.ts +35 -0
  394. package/src/__tests__/getDateTimeFieldSegments.test.ts +140 -0
  395. package/src/__tests__/getDateTimeSegmentVisibility.test.ts +12 -0
  396. package/src/__tests__/intlCopy.test.ts +64 -0
  397. package/src/__tests__/isValidDateId.test.ts +8 -0
  398. package/src/__tests__/isValidMonthId.test.ts +8 -0
  399. package/src/__tests__/normalizeDateRange.test.ts +10 -0
  400. package/src/__tests__/toMonthId.test.ts +7 -0
  401. package/src/__tests__/todayDateId.test.ts +7 -0
  402. package/src/__tests__/wireConstructors.test.ts +74 -0
  403. package/src/dates/calendar/formatCalendarMonthYear.ts +21 -0
  404. package/src/dates/calendar/formatDateTimeListDateRow.ts +41 -0
  405. package/src/dates/calendar/formatMonthCalendarMonth.ts +21 -0
  406. package/src/dates/calendar/formatMonthCalendarYear.ts +9 -0
  407. package/src/dates/calendar/getCalendarWeekdayLabels.ts +23 -0
  408. package/src/dates/datetime/clampDateTimeId.ts +25 -0
  409. package/src/dates/datetime/compareDateTimeIds.ts +23 -0
  410. package/src/dates/datetime/dateTimeId.ts +36 -0
  411. package/src/dates/datetime/formatDateTimeId.ts +35 -0
  412. package/src/dates/datetime/formatDateTimeListHour.ts +14 -0
  413. package/src/dates/datetime/formatDateTimeListMinute.ts +9 -0
  414. package/src/dates/datetime/formatDateTimeListPeriod.ts +12 -0
  415. package/src/dates/datetime/isLocaleHour12.ts +23 -0
  416. package/src/dates/datetime/isValidDateTimeId.ts +18 -0
  417. package/src/dates/datetime/nowDateTimeId.ts +53 -0
  418. package/src/dates/datetime/parseDateTimeId.ts +24 -0
  419. package/src/dates/display/formatDateForDisplay.ts +21 -0
  420. package/src/dates/display/formatDateRangeForDisplay.ts +23 -0
  421. package/src/dates/display/formatDateTimeForDisplay.ts +37 -0
  422. package/src/dates/display/formatMonthForDisplay.ts +26 -0
  423. package/src/dates/index.ts +86 -0
  424. package/src/dates/internal/brand.ts +11 -0
  425. package/src/dates/internal/calendarHelpers.ts +18 -0
  426. package/src/dates/internal/clampHelpers.ts +15 -0
  427. package/src/dates/internal/dateIdToNativeDate.ts +15 -0
  428. package/src/dates/internal/intlCache.ts +40 -0
  429. package/src/dates/internal/intlCopy.ts +75 -0
  430. package/src/dates/internal/segmentBuilders.ts +94 -0
  431. package/src/dates/labels/dateComponentLabels.ts +79 -0
  432. package/src/dates/ranges/compareDateIds.ts +21 -0
  433. package/src/dates/ranges/compareMonthIds.ts +26 -0
  434. package/src/dates/ranges/dateRangeAroundDay.ts +24 -0
  435. package/src/dates/ranges/dateRangeFromLastNDays.ts +26 -0
  436. package/src/dates/ranges/eachDateIdInRange.ts +21 -0
  437. package/src/dates/ranges/normalizeDateRange.ts +18 -0
  438. package/src/dates/segments/applyDateSegmentChange.ts +57 -0
  439. package/src/dates/segments/formatDateSegment.ts +18 -0
  440. package/src/dates/segments/getDateFieldSegments.ts +45 -0
  441. package/src/dates/segments/getDateTimeFieldSegments.ts +126 -0
  442. package/src/dates/segments/getDateTimeSegmentVisibility.ts +14 -0
  443. package/src/dates/segments/getEmptyDateSegmentText.ts +12 -0
  444. package/src/dates/segments/parseDateSegment.ts +25 -0
  445. package/src/dates/types.ts +80 -0
  446. package/src/dates/wire/clampDateParts.ts +17 -0
  447. package/src/dates/wire/clampMonthParts.ts +15 -0
  448. package/src/dates/wire/dateId.ts +44 -0
  449. package/src/dates/wire/formatDateId.ts +20 -0
  450. package/src/dates/wire/formatMonthId.ts +16 -0
  451. package/src/dates/wire/isValidDateId.ts +22 -0
  452. package/src/dates/wire/isValidDateParts.ts +17 -0
  453. package/src/dates/wire/isValidMonthId.ts +22 -0
  454. package/src/dates/wire/isValidMonthParts.ts +11 -0
  455. package/src/dates/wire/monthId.ts +42 -0
  456. package/src/dates/wire/parseDateId.ts +20 -0
  457. package/src/dates/wire/parseMonthId.ts +20 -0
  458. package/src/dates/wire/toMonthId.ts +17 -0
  459. package/src/dates/wire/todayDateId.ts +12 -0
  460. package/src/dates/wire/todayMonthId.ts +12 -0
  461. package/src/formatNumber.ts +56 -0
  462. package/src/index.ts +82 -0
  463. package/src/types.ts +1 -0
  464. package/src/utils.ts +29 -0
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.parseDateId = parseDateId;
7
+ var _dateIdToNativeDate = require("../internal/dateIdToNativeDate");
8
+ var _isValidDateId = require("./isValidDateId");
9
+ /**
10
+ * Parses a wire `DateId` into numeric parts, or `null` when invalid.
11
+ *
12
+ * @param dateId - Wire date string (`YYYY-MM-DD`).
13
+ * @returns Parsed parts, or `null` when `dateId` is invalid.
14
+ *
15
+ * @example
16
+ * parseDateId('2026-07-28') // { year: 2026, month: 7, day: 28 }
17
+ */
18
+ function parseDateId(dateId) {
19
+ if (!(0, _isValidDateId.isValidDateId)(dateId)) {
20
+ return null;
21
+ }
22
+ const date = (0, _dateIdToNativeDate.dateIdToNativeDate)(dateId);
23
+ return {
24
+ year: date.getFullYear(),
25
+ month: date.getMonth() + 1,
26
+ day: date.getDate()
27
+ };
28
+ }
29
+ //# sourceMappingURL=parseDateId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateIdToNativeDate","require","_isValidDateId","parseDateId","dateId","isValidDateId","date","dateIdToNativeDate","year","getFullYear","month","getMonth","day","getDate"],"sourceRoot":"../../../../src","sources":["dates/wire/parseDateId.ts"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,WAAWA,CAACC,MAAc,EAAoB;EAC5D,IAAI,CAAC,IAAAC,4BAAa,EAACD,MAAM,CAAC,EAAE;IAC1B,OAAO,IAAI;EACb;EACA,MAAME,IAAI,GAAG,IAAAC,sCAAkB,EAACH,MAAM,CAAC;EACvC,OAAO;IAAEI,IAAI,EAAEF,IAAI,CAACG,WAAW,CAAC,CAAC;IAAEC,KAAK,EAAEJ,IAAI,CAACK,QAAQ,CAAC,CAAC,GAAG,CAAC;IAAEC,GAAG,EAAEN,IAAI,CAACO,OAAO,CAAC;EAAE,CAAC;AACtF","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.parseMonthId = parseMonthId;
7
+ var _dateIdToNativeDate = require("../internal/dateIdToNativeDate");
8
+ var _isValidMonthId = require("./isValidMonthId");
9
+ /**
10
+ * Parses a wire `MonthId` into numeric parts, or `null` when invalid.
11
+ *
12
+ * @param monthId - Wire month string (`YYYY-MM-01`).
13
+ * @returns Parsed parts, or `null` when `monthId` is invalid.
14
+ *
15
+ * @example
16
+ * parseMonthId('2026-07-01') // { year: 2026, month: 7 }
17
+ */
18
+ function parseMonthId(monthId) {
19
+ if (!(0, _isValidMonthId.isValidMonthId)(monthId)) {
20
+ return null;
21
+ }
22
+ const date = (0, _dateIdToNativeDate.dateIdToNativeDate)(monthId);
23
+ return {
24
+ year: date.getFullYear(),
25
+ month: date.getMonth() + 1
26
+ };
27
+ }
28
+ //# sourceMappingURL=parseMonthId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateIdToNativeDate","require","_isValidMonthId","parseMonthId","monthId","isValidMonthId","date","dateIdToNativeDate","year","getFullYear","month","getMonth"],"sourceRoot":"../../../../src","sources":["dates/wire/parseMonthId.ts"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,YAAYA,CAACC,OAAgB,EAAqB;EAChE,IAAI,CAAC,IAAAC,8BAAc,EAACD,OAAO,CAAC,EAAE;IAC5B,OAAO,IAAI;EACb;EACA,MAAME,IAAI,GAAG,IAAAC,sCAAkB,EAACH,OAAO,CAAC;EACxC,OAAO;IAAEI,IAAI,EAAEF,IAAI,CAACG,WAAW,CAAC,CAAC;IAAEC,KAAK,EAAEJ,IAAI,CAACK,QAAQ,CAAC,CAAC,GAAG;EAAE,CAAC;AACjE","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toMonthId = toMonthId;
7
+ var _dateFns = require("date-fns");
8
+ var _brand = require("../internal/brand");
9
+ var _dateIdToNativeDate = require("../internal/dateIdToNativeDate");
10
+ /**
11
+ * Truncates a `DateId` to its month wire id.
12
+ *
13
+ * @param dateId - Wire date string.
14
+ * @returns Wire `MonthId` for the same calendar month.
15
+ *
16
+ * @example
17
+ * toMonthId('2026-07-28') // '2026-07-01'
18
+ */
19
+ function toMonthId(dateId) {
20
+ return (0, _brand.asMonthId)((0, _dateFns.format)((0, _dateFns.startOfMonth)((0, _dateIdToNativeDate.dateIdToNativeDate)(dateId)), 'yyyy-MM-dd'));
21
+ }
22
+ //# sourceMappingURL=toMonthId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateFns","require","_brand","_dateIdToNativeDate","toMonthId","dateId","asMonthId","format","startOfMonth","dateIdToNativeDate"],"sourceRoot":"../../../../src","sources":["dates/wire/toMonthId.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,SAASA,CAACC,MAAc,EAAW;EACjD,OAAO,IAAAC,gBAAS,EAAC,IAAAC,eAAM,EAAC,IAAAC,qBAAY,EAAC,IAAAC,sCAAkB,EAACJ,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAClF","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.todayDateId = todayDateId;
7
+ var _dateFns = require("date-fns");
8
+ var _brand = require("../internal/brand");
9
+ /**
10
+ * Returns the device-local calendar date as a wire `DateId`.
11
+ *
12
+ * @returns Today's date as `YYYY-MM-DD`.
13
+ */
14
+ function todayDateId() {
15
+ return (0, _brand.asDateId)((0, _dateFns.format)(new Date(), 'yyyy-MM-dd'));
16
+ }
17
+ //# sourceMappingURL=todayDateId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateFns","require","_brand","todayDateId","asDateId","format","Date"],"sourceRoot":"../../../../src","sources":["dates/wire/todayDateId.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACA;AACO,SAASE,WAAWA,CAAA,EAAW;EACpC,OAAO,IAAAC,eAAQ,EAAC,IAAAC,eAAM,EAAC,IAAIC,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AACnD","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.todayMonthId = todayMonthId;
7
+ var _dateFns = require("date-fns");
8
+ var _brand = require("../internal/brand");
9
+ /**
10
+ * Returns the device-local calendar month as a wire `MonthId`.
11
+ *
12
+ * @returns Current month as `YYYY-MM-01`.
13
+ */
14
+ function todayMonthId() {
15
+ return (0, _brand.asMonthId)((0, _dateFns.format)((0, _dateFns.startOfMonth)(new Date()), 'yyyy-MM-dd'));
16
+ }
17
+ //# sourceMappingURL=todayMonthId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateFns","require","_brand","todayMonthId","asMonthId","format","startOfMonth","Date"],"sourceRoot":"../../../../src","sources":["dates/wire/todayMonthId.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACA;AACO,SAASE,YAAYA,CAAA,EAAY;EACtC,OAAO,IAAAC,gBAAS,EAAC,IAAAC,eAAM,EAAC,IAAAC,qBAAY,EAAC,IAAIC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAClE","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatNumber = formatNumber;
7
+ var _utils = require("./utils");
8
+ const formatterCache = new Map();
9
+
10
+ /**
11
+ * Cache NumberFormat by locale/fraction digits.
12
+ * Constructing Intl formatters is expensive on RN/Hermes; reuse the instance and only call `.format`.
13
+ */
14
+ function getDecimalFormatter(locale, decimalPlaces) {
15
+ const key = `${String(locale)}|${String(decimalPlaces)}`;
16
+ let formatter = formatterCache.get(key);
17
+ if (!formatter) {
18
+ formatter = new Intl.NumberFormat(locale, {
19
+ style: 'decimal',
20
+ notation: 'standard',
21
+ minimumFractionDigits: decimalPlaces,
22
+ maximumFractionDigits: decimalPlaces
23
+ });
24
+ formatterCache.set(key, formatter);
25
+ }
26
+ return formatter;
27
+ }
28
+
29
+ /**
30
+ * Formats a value as a number with decimal places for display.
31
+ *
32
+ * @param value - Value to format (`number`, plain numeric `string` like `'1234.56'`, `null`, or `undefined`).
33
+ * @param options - Formatting options.
34
+ * @param options.locale - BCP 47 locale; defaults to `en-US`.
35
+ * @param options.decimalPlaces - Fraction digits; defaults to `2`.
36
+ * @returns Locale-formatted decimal string, or `''` for nullish, blank, or non-numeric values.
37
+ *
38
+ * @example
39
+ * formatNumber(3247.19) // '3,247.19'
40
+ */
41
+ function formatNumber(value, options) {
42
+ const locale = options?.locale ?? 'en-US';
43
+ const decimalPlaces = options?.decimalPlaces ?? 2;
44
+ const number = (0, _utils.toFiniteNumber)(value);
45
+ if (number == null) {
46
+ return '';
47
+ }
48
+ return getDecimalFormatter(locale, decimalPlaces).format(number);
49
+ }
50
+ //# sourceMappingURL=formatNumber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_utils","require","formatterCache","Map","getDecimalFormatter","locale","decimalPlaces","key","String","formatter","get","Intl","NumberFormat","style","notation","minimumFractionDigits","maximumFractionDigits","set","formatNumber","value","options","number","toFiniteNumber","format"],"sourceRoot":"../../src","sources":["formatNumber.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAOA,MAAMC,cAAc,GAAG,IAAIC,GAAG,CAA4B,CAAC;;AAE3D;AACA;AACA;AACA;AACA,SAASC,mBAAmBA,CAC1BC,MAA4B,EAC5BC,aAAqB,EACF;EACnB,MAAMC,GAAG,GAAG,GAAGC,MAAM,CAACH,MAAM,CAAC,IAAIG,MAAM,CAACF,aAAa,CAAC,EAAE;EACxD,IAAIG,SAAS,GAAGP,cAAc,CAACQ,GAAG,CAACH,GAAG,CAAC;EACvC,IAAI,CAACE,SAAS,EAAE;IACdA,SAAS,GAAG,IAAIE,IAAI,CAACC,YAAY,CAACP,MAAM,EAAE;MACxCQ,KAAK,EAAE,SAAS;MAChBC,QAAQ,EAAE,UAAU;MACpBC,qBAAqB,EAAET,aAAa;MACpCU,qBAAqB,EAAEV;IACzB,CAAC,CAAC;IACFJ,cAAc,CAACe,GAAG,CAACV,GAAG,EAAEE,SAAS,CAAC;EACpC;EACA,OAAOA,SAAS;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASS,YAAYA,CAC1BC,KAAgC,EAChCC,OAAuC,EAC/B;EACR,MAAMf,MAAM,GAAGe,OAAO,EAAEf,MAAM,IAAI,OAAO;EACzC,MAAMC,aAAa,GAAGc,OAAO,EAAEd,aAAa,IAAI,CAAC;EACjD,MAAMe,MAAM,GAAG,IAAAC,qBAAc,EAACH,KAAK,CAAC;EACpC,IAAIE,MAAM,IAAI,IAAI,EAAE;IAClB,OAAO,EAAE;EACX;EACA,OAAOjB,mBAAmB,CAACC,MAAM,EAAEC,aAAa,CAAC,CAACiB,MAAM,CAACF,MAAM,CAAC;AAClE","ignoreList":[]}
@@ -0,0 +1,326 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "DEFAULT_DATE_COMPONENT_LABELS", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _dates.DEFAULT_DATE_COMPONENT_LABELS;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "applyDateSegmentChange", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _dates.applyDateSegmentChange;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "clampDateParts", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _dates.clampDateParts;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "clampDateTimeId", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _dates.clampDateTimeId;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "clampMonthParts", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _dates.clampMonthParts;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "compareDateIds", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _dates.compareDateIds;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "compareDateTimeIds", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _dates.compareDateTimeIds;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "compareMonthIds", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _dates.compareMonthIds;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "dateId", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _dates.dateId;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "dateRangeAroundDay", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _dates.dateRangeAroundDay;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "dateRangeFromLastNDays", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _dates.dateRangeFromLastNDays;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "dateTimeId", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _dates.dateTimeId;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "eachDateIdInRange", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _dates.eachDateIdInRange;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "formatCalendarMonthYear", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _dates.formatCalendarMonthYear;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "formatDateForDisplay", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _dates.formatDateForDisplay;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "formatDateId", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _dates.formatDateId;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "formatDateRangeForDisplay", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _dates.formatDateRangeForDisplay;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, "formatDateSegment", {
109
+ enumerable: true,
110
+ get: function () {
111
+ return _dates.formatDateSegment;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, "formatDateTimeForDisplay", {
115
+ enumerable: true,
116
+ get: function () {
117
+ return _dates.formatDateTimeForDisplay;
118
+ }
119
+ });
120
+ Object.defineProperty(exports, "formatDateTimeId", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _dates.formatDateTimeId;
124
+ }
125
+ });
126
+ Object.defineProperty(exports, "formatDateTimeListDateRow", {
127
+ enumerable: true,
128
+ get: function () {
129
+ return _dates.formatDateTimeListDateRow;
130
+ }
131
+ });
132
+ Object.defineProperty(exports, "formatDateTimeListHour", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _dates.formatDateTimeListHour;
136
+ }
137
+ });
138
+ Object.defineProperty(exports, "formatDateTimeListMinute", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _dates.formatDateTimeListMinute;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "formatDateTimeListPeriod", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _dates.formatDateTimeListPeriod;
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "formatMonthCalendarMonth", {
151
+ enumerable: true,
152
+ get: function () {
153
+ return _dates.formatMonthCalendarMonth;
154
+ }
155
+ });
156
+ Object.defineProperty(exports, "formatMonthCalendarYear", {
157
+ enumerable: true,
158
+ get: function () {
159
+ return _dates.formatMonthCalendarYear;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "formatMonthForDisplay", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _dates.formatMonthForDisplay;
166
+ }
167
+ });
168
+ Object.defineProperty(exports, "formatMonthId", {
169
+ enumerable: true,
170
+ get: function () {
171
+ return _dates.formatMonthId;
172
+ }
173
+ });
174
+ Object.defineProperty(exports, "formatNumber", {
175
+ enumerable: true,
176
+ get: function () {
177
+ return _formatNumber.formatNumber;
178
+ }
179
+ });
180
+ Object.defineProperty(exports, "formatSelectYear", {
181
+ enumerable: true,
182
+ get: function () {
183
+ return _dates.formatSelectYear;
184
+ }
185
+ });
186
+ Object.defineProperty(exports, "getCalendarWeekdayLabels", {
187
+ enumerable: true,
188
+ get: function () {
189
+ return _dates.getCalendarWeekdayLabels;
190
+ }
191
+ });
192
+ Object.defineProperty(exports, "getDateFieldSegments", {
193
+ enumerable: true,
194
+ get: function () {
195
+ return _dates.getDateFieldSegments;
196
+ }
197
+ });
198
+ Object.defineProperty(exports, "getDateSegmentAccessibilityLabel", {
199
+ enumerable: true,
200
+ get: function () {
201
+ return _dates.getDateSegmentAccessibilityLabel;
202
+ }
203
+ });
204
+ Object.defineProperty(exports, "getDateTimeFieldSegments", {
205
+ enumerable: true,
206
+ get: function () {
207
+ return _dates.getDateTimeFieldSegments;
208
+ }
209
+ });
210
+ Object.defineProperty(exports, "getDateTimeSegmentVisibility", {
211
+ enumerable: true,
212
+ get: function () {
213
+ return _dates.getDateTimeSegmentVisibility;
214
+ }
215
+ });
216
+ Object.defineProperty(exports, "getEmptyDateSegmentText", {
217
+ enumerable: true,
218
+ get: function () {
219
+ return _dates.getEmptyDateSegmentText;
220
+ }
221
+ });
222
+ Object.defineProperty(exports, "isLocaleHour12", {
223
+ enumerable: true,
224
+ get: function () {
225
+ return _dates.isLocaleHour12;
226
+ }
227
+ });
228
+ Object.defineProperty(exports, "isValidDateId", {
229
+ enumerable: true,
230
+ get: function () {
231
+ return _dates.isValidDateId;
232
+ }
233
+ });
234
+ Object.defineProperty(exports, "isValidDateParts", {
235
+ enumerable: true,
236
+ get: function () {
237
+ return _dates.isValidDateParts;
238
+ }
239
+ });
240
+ Object.defineProperty(exports, "isValidDateTimeId", {
241
+ enumerable: true,
242
+ get: function () {
243
+ return _dates.isValidDateTimeId;
244
+ }
245
+ });
246
+ Object.defineProperty(exports, "isValidMonthId", {
247
+ enumerable: true,
248
+ get: function () {
249
+ return _dates.isValidMonthId;
250
+ }
251
+ });
252
+ Object.defineProperty(exports, "isValidMonthParts", {
253
+ enumerable: true,
254
+ get: function () {
255
+ return _dates.isValidMonthParts;
256
+ }
257
+ });
258
+ Object.defineProperty(exports, "monthId", {
259
+ enumerable: true,
260
+ get: function () {
261
+ return _dates.monthId;
262
+ }
263
+ });
264
+ Object.defineProperty(exports, "normalizeDateRange", {
265
+ enumerable: true,
266
+ get: function () {
267
+ return _dates.normalizeDateRange;
268
+ }
269
+ });
270
+ Object.defineProperty(exports, "nowDateTimeId", {
271
+ enumerable: true,
272
+ get: function () {
273
+ return _dates.nowDateTimeId;
274
+ }
275
+ });
276
+ Object.defineProperty(exports, "parseDateId", {
277
+ enumerable: true,
278
+ get: function () {
279
+ return _dates.parseDateId;
280
+ }
281
+ });
282
+ Object.defineProperty(exports, "parseDateSegment", {
283
+ enumerable: true,
284
+ get: function () {
285
+ return _dates.parseDateSegment;
286
+ }
287
+ });
288
+ Object.defineProperty(exports, "parseDateTimeId", {
289
+ enumerable: true,
290
+ get: function () {
291
+ return _dates.parseDateTimeId;
292
+ }
293
+ });
294
+ Object.defineProperty(exports, "parseMonthId", {
295
+ enumerable: true,
296
+ get: function () {
297
+ return _dates.parseMonthId;
298
+ }
299
+ });
300
+ Object.defineProperty(exports, "resolveDateComponentLabels", {
301
+ enumerable: true,
302
+ get: function () {
303
+ return _dates.resolveDateComponentLabels;
304
+ }
305
+ });
306
+ Object.defineProperty(exports, "toMonthId", {
307
+ enumerable: true,
308
+ get: function () {
309
+ return _dates.toMonthId;
310
+ }
311
+ });
312
+ Object.defineProperty(exports, "todayDateId", {
313
+ enumerable: true,
314
+ get: function () {
315
+ return _dates.todayDateId;
316
+ }
317
+ });
318
+ Object.defineProperty(exports, "todayMonthId", {
319
+ enumerable: true,
320
+ get: function () {
321
+ return _dates.todayMonthId;
322
+ }
323
+ });
324
+ var _formatNumber = require("./formatNumber");
325
+ var _dates = require("./dates");
326
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_formatNumber","require","_dates"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAoBA,IAAAC,MAAA,GAAAD,OAAA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toFiniteNumber = toFiniteNumber;
7
+ /**
8
+ * Coerce a nullable number/string to a finite number for display formatters.
9
+ *
10
+ * Hermes does not support the `signDisplay` property on iOS (and is unreliable on Android 11),
11
+ * so `-0` can still format as `"-0.00"`. Normalize before Intl to avoid this issue.
12
+ * @see https://github.com/facebook/hermes/blob/main/doc/IntlAPIs.md#limited-ios-property-support
13
+ */
14
+ function toFiniteNumber(value) {
15
+ if (value == null) {
16
+ return undefined;
17
+ }
18
+ let number;
19
+ if (typeof value === 'string') {
20
+ const trimmed = value.trim();
21
+ if (!trimmed) {
22
+ return undefined;
23
+ }
24
+ number = Number(trimmed);
25
+ } else {
26
+ number = value;
27
+ }
28
+ if (Number.isNaN(number)) {
29
+ return undefined;
30
+ }
31
+ return Object.is(number, -0) ? 0 : number;
32
+ }
33
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["toFiniteNumber","value","undefined","number","trimmed","trim","Number","isNaN","Object","is"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAACC,KAAgC,EAAsB;EACnF,IAAIA,KAAK,IAAI,IAAI,EAAE;IACjB,OAAOC,SAAS;EAClB;EACA,IAAIC,MAAc;EAClB,IAAI,OAAOF,KAAK,KAAK,QAAQ,EAAE;IAC7B,MAAMG,OAAO,GAAGH,KAAK,CAACI,IAAI,CAAC,CAAC;IAC5B,IAAI,CAACD,OAAO,EAAE;MACZ,OAAOF,SAAS;IAClB;IACAC,MAAM,GAAGG,MAAM,CAACF,OAAO,CAAC;EAC1B,CAAC,MAAM;IACLD,MAAM,GAAGF,KAAK;EAChB;EACA,IAAIK,MAAM,CAACC,KAAK,CAACJ,MAAM,CAAC,EAAE;IACxB,OAAOD,SAAS;EAClB;EAEA,OAAOM,MAAM,CAACC,EAAE,CAACN,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAGA,MAAM;AAC3C","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ import { dateIdToNativeDate } from '../internal/dateIdToNativeDate';
4
+ import { getCachedDateFormatter } from '../internal/intlCache';
5
+ /**
6
+ * Formats a calendar header label, e.g. `July 2026`.
7
+ *
8
+ * Uses `Intl` so `options.locale` is respected (same pattern as display formatters).
9
+ *
10
+ * @param monthId - Wire month string (`YYYY-MM-01`).
11
+ * @param options - Locale and optional time zone.
12
+ * @returns Long month and year label.
13
+ */
14
+ export function formatCalendarMonthYear(monthId, options) {
15
+ const formatter = getCachedDateFormatter(options?.locale ?? 'en-US', {
16
+ month: 'long',
17
+ year: 'numeric',
18
+ ...(options?.timeZone ? {
19
+ timeZone: options.timeZone
20
+ } : {})
21
+ });
22
+ return formatter.format(dateIdToNativeDate(monthId));
23
+ }
24
+ //# sourceMappingURL=formatCalendarMonthYear.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["dateIdToNativeDate","getCachedDateFormatter","formatCalendarMonthYear","monthId","options","formatter","locale","month","year","timeZone","format"],"sourceRoot":"../../../../src","sources":["dates/calendar/formatCalendarMonthYear.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,gCAAgC;AACnE,SAASC,sBAAsB,QAAQ,uBAAuB;AAG9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAACC,OAAgB,EAAEC,OAA2B,EAAU;EAC7F,MAAMC,SAAS,GAAGJ,sBAAsB,CAACG,OAAO,EAAEE,MAAM,IAAI,OAAO,EAAE;IACnEC,KAAK,EAAE,MAAM;IACbC,IAAI,EAAE,SAAS;IACf,IAAIJ,OAAO,EAAEK,QAAQ,GAAG;MAAEA,QAAQ,EAAEL,OAAO,CAACK;IAAS,CAAC,GAAG,CAAC,CAAC;EAC7D,CAAC,CAAC;EACF,OAAOJ,SAAS,CAACK,MAAM,CAACV,kBAAkB,CAACG,OAAO,CAAC,CAAC;AACtD","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ import { dateIdToNativeDate } from '../internal/dateIdToNativeDate';
4
+ import { formatRelativeToday } from '../internal/intlCopy';
5
+ import { getCachedDateFormatter } from '../internal/intlCache';
6
+ /**
7
+ * Formats a row label for a scrollable date list. Returns a locale-aware "today" label when the
8
+ * id matches today (pass a precomputed `todayDateId` when comparing wire ids).
9
+ *
10
+ * @param dateId - Wire date string.
11
+ * @param options - Locale, optional `todayDateId` override, and time zone.
12
+ * @returns Relative today label or a short weekday/month/day label.
13
+ */
14
+ export function formatDateTimeListDateRow(dateId, options) {
15
+ const locale = options?.locale ?? 'en-US';
16
+ const todayId = options?.todayDateId;
17
+ if (todayId && dateId === todayId) {
18
+ return formatRelativeToday(locale);
19
+ }
20
+ const date = dateIdToNativeDate(dateId);
21
+ const todayParts = new Date();
22
+ const isToday = date.getFullYear() === todayParts.getFullYear() && date.getMonth() === todayParts.getMonth() && date.getDate() === todayParts.getDate();
23
+ if (isToday) {
24
+ return formatRelativeToday(locale);
25
+ }
26
+ const formatter = getCachedDateFormatter(locale, {
27
+ weekday: 'short',
28
+ month: 'short',
29
+ day: 'numeric',
30
+ ...(options?.timeZone ? {
31
+ timeZone: options.timeZone
32
+ } : {})
33
+ });
34
+ return formatter.format(date);
35
+ }
36
+ //# sourceMappingURL=formatDateTimeListDateRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["dateIdToNativeDate","formatRelativeToday","getCachedDateFormatter","formatDateTimeListDateRow","dateId","options","locale","todayId","todayDateId","date","todayParts","Date","isToday","getFullYear","getMonth","getDate","formatter","weekday","month","day","timeZone","format"],"sourceRoot":"../../../../src","sources":["dates/calendar/formatDateTimeListDateRow.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,gCAAgC;AACnE,SAASC,mBAAmB,QAAQ,sBAAsB;AAC1D,SAASC,sBAAsB,QAAQ,uBAAuB;AAG9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CACvCC,MAAc,EACdC,OAAsD,EAC9C;EACR,MAAMC,MAAM,GAAGD,OAAO,EAAEC,MAAM,IAAI,OAAO;EACzC,MAAMC,OAAO,GAAGF,OAAO,EAAEG,WAAW;EACpC,IAAID,OAAO,IAAIH,MAAM,KAAKG,OAAO,EAAE;IACjC,OAAON,mBAAmB,CAACK,MAAM,CAAC;EACpC;EAEA,MAAMG,IAAI,GAAGT,kBAAkB,CAACI,MAAM,CAAC;EACvC,MAAMM,UAAU,GAAG,IAAIC,IAAI,CAAC,CAAC;EAC7B,MAAMC,OAAO,GACXH,IAAI,CAACI,WAAW,CAAC,CAAC,KAAKH,UAAU,CAACG,WAAW,CAAC,CAAC,IAC/CJ,IAAI,CAACK,QAAQ,CAAC,CAAC,KAAKJ,UAAU,CAACI,QAAQ,CAAC,CAAC,IACzCL,IAAI,CAACM,OAAO,CAAC,CAAC,KAAKL,UAAU,CAACK,OAAO,CAAC,CAAC;EACzC,IAAIH,OAAO,EAAE;IACX,OAAOX,mBAAmB,CAACK,MAAM,CAAC;EACpC;EAEA,MAAMU,SAAS,GAAGd,sBAAsB,CAACI,MAAM,EAAE;IAC/CW,OAAO,EAAE,OAAO;IAChBC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE,SAAS;IACd,IAAId,OAAO,EAAEe,QAAQ,GAAG;MAAEA,QAAQ,EAAEf,OAAO,CAACe;IAAS,CAAC,GAAG,CAAC,CAAC;EAC7D,CAAC,CAAC;EACF,OAAOJ,SAAS,CAACK,MAAM,CAACZ,IAAI,CAAC;AAC/B","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ import { getCachedDateFormatter } from '../internal/intlCache';
4
+ /**
5
+ * Formats a short month name for month-grid cells (1–12).
6
+ *
7
+ * @param month - Month number (1–12).
8
+ * @param options - Locale and optional time zone.
9
+ * @returns Short month name.
10
+ *
11
+ * @example
12
+ * formatMonthCalendarMonth(7, { locale: 'en-US' }) // 'Jul'
13
+ */
14
+ export function formatMonthCalendarMonth(month, options) {
15
+ const date = new Date(2024, month - 1, 1);
16
+ const formatter = getCachedDateFormatter(options?.locale ?? 'en-US', {
17
+ month: 'short',
18
+ ...(options?.timeZone ? {
19
+ timeZone: options.timeZone
20
+ } : {})
21
+ });
22
+ return formatter.format(date);
23
+ }
24
+ //# sourceMappingURL=formatMonthCalendarMonth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getCachedDateFormatter","formatMonthCalendarMonth","month","options","date","Date","formatter","locale","timeZone","format"],"sourceRoot":"../../../../src","sources":["dates/calendar/formatMonthCalendarMonth.ts"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,uBAAuB;AAG9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,KAAa,EAAEC,OAA2B,EAAU;EAC3F,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAAC,IAAI,EAAEH,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;EACzC,MAAMI,SAAS,GAAGN,sBAAsB,CAACG,OAAO,EAAEI,MAAM,IAAI,OAAO,EAAE;IACnEL,KAAK,EAAE,OAAO;IACd,IAAIC,OAAO,EAAEK,QAAQ,GAAG;MAAEA,QAAQ,EAAEL,OAAO,CAACK;IAAS,CAAC,GAAG,CAAC,CAAC;EAC7D,CAAC,CAAC;EACF,OAAOF,SAAS,CAACG,MAAM,CAACL,IAAI,CAAC;AAC/B","ignoreList":[]}