@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 @@
1
+ {"version":3,"names":["_dateFns","require","_isValidDateTimeId","parseDateTimeId","dateTimeId","isValidDateTimeId","date","parseISO","year","getFullYear","month","getMonth","day","getDate","hour","getHours","minute","getMinutes","second","getSeconds"],"sourceRoot":"../../../../src","sources":["dates/datetime/parseDateTimeId.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,eAAeA,CAACC,UAAsB,EAAwB;EAC5E,IAAI,CAAC,IAAAC,oCAAiB,EAACD,UAAU,CAAC,EAAE;IAClC,OAAO,IAAI;EACb;EACA,MAAME,IAAI,GAAG,IAAAC,iBAAQ,EAACH,UAAU,CAAC;EACjC,OAAO;IACLI,IAAI,EAAEF,IAAI,CAACG,WAAW,CAAC,CAAC;IACxBC,KAAK,EAAEJ,IAAI,CAACK,QAAQ,CAAC,CAAC,GAAG,CAAC;IAC1BC,GAAG,EAAEN,IAAI,CAACO,OAAO,CAAC,CAAC;IACnBC,IAAI,EAAER,IAAI,CAACS,QAAQ,CAAC,CAAC;IACrBC,MAAM,EAAEV,IAAI,CAACW,UAAU,CAAC,CAAC;IACzBC,MAAM,EAAEZ,IAAI,CAACa,UAAU,CAAC;EAC1B,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatDateForDisplay = formatDateForDisplay;
7
+ var _dateIdToNativeDate = require("../internal/dateIdToNativeDate");
8
+ var _intlCache = require("../internal/intlCache");
9
+ /**
10
+ * Formats a locale-aware date string for UI labels (never store the result in form state).
11
+ *
12
+ * @param dateId - Wire date string (`YYYY-MM-DD`).
13
+ * @param options - Locale, date style, and optional time zone.
14
+ * @returns Locale-formatted date string.
15
+ *
16
+ * @example
17
+ * formatDateForDisplay('2026-07-28', { locale: 'en-US' }) // e.g. '7/28/26'
18
+ */
19
+ function formatDateForDisplay(dateId, options) {
20
+ const formatter = (0, _intlCache.getCachedDateFormatter)(options?.locale ?? 'en-US', {
21
+ dateStyle: options?.dateStyle ?? 'short',
22
+ ...(options?.timeZone ? {
23
+ timeZone: options.timeZone
24
+ } : {})
25
+ });
26
+ return formatter.format((0, _dateIdToNativeDate.dateIdToNativeDate)(dateId));
27
+ }
28
+ //# sourceMappingURL=formatDateForDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateIdToNativeDate","require","_intlCache","formatDateForDisplay","dateId","options","formatter","getCachedDateFormatter","locale","dateStyle","timeZone","format","dateIdToNativeDate"],"sourceRoot":"../../../../src","sources":["dates/display/formatDateForDisplay.ts"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,oBAAoBA,CAACC,MAAc,EAAEC,OAAkC,EAAU;EAC/F,MAAMC,SAAS,GAAG,IAAAC,iCAAsB,EAACF,OAAO,EAAEG,MAAM,IAAI,OAAO,EAAE;IACnEC,SAAS,EAAEJ,OAAO,EAAEI,SAAS,IAAI,OAAO;IACxC,IAAIJ,OAAO,EAAEK,QAAQ,GAAG;MAAEA,QAAQ,EAAEL,OAAO,CAACK;IAAS,CAAC,GAAG,CAAC,CAAC;EAC7D,CAAC,CAAC;EACF,OAAOJ,SAAS,CAACK,MAAM,CAAC,IAAAC,sCAAkB,EAACR,MAAM,CAAC,CAAC;AACrD","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatDateRangeForDisplay = formatDateRangeForDisplay;
7
+ var _intlCopy = require("../internal/intlCopy");
8
+ var _formatDateForDisplay = require("./formatDateForDisplay");
9
+ /**
10
+ * Formats an inclusive date range for display.
11
+ *
12
+ * @param range - Start and end wire date ids.
13
+ * @param options - Locale, separator, and display options passed to `formatDateForDisplay`.
14
+ * @returns Formatted range string.
15
+ *
16
+ * @example
17
+ * formatDateRangeForDisplay({ startId: '2026-07-01', endId: '2026-07-28' })
18
+ */
19
+ function formatDateRangeForDisplay(range, options) {
20
+ const separator = options?.rangeSeparator ?? (0, _intlCopy.getDateRangeSeparator)(options?.locale);
21
+ const start = (0, _formatDateForDisplay.formatDateForDisplay)(range.startId, options);
22
+ const end = (0, _formatDateForDisplay.formatDateForDisplay)(range.endId, options);
23
+ return `${start}${separator}${end}`;
24
+ }
25
+ //# sourceMappingURL=formatDateRangeForDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_intlCopy","require","_formatDateForDisplay","formatDateRangeForDisplay","range","options","separator","rangeSeparator","getDateRangeSeparator","locale","start","formatDateForDisplay","startId","end","endId"],"sourceRoot":"../../../../src","sources":["dates/display/formatDateRangeForDisplay.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,yBAAyBA,CACvCC,KAAyC,EACzCC,OAAiC,EACzB;EACR,MAAMC,SAAS,GAAGD,OAAO,EAAEE,cAAc,IAAI,IAAAC,+BAAqB,EAACH,OAAO,EAAEI,MAAM,CAAC;EACnF,MAAMC,KAAK,GAAG,IAAAC,0CAAoB,EAACP,KAAK,CAACQ,OAAO,EAAEP,OAAO,CAAC;EAC1D,MAAMQ,GAAG,GAAG,IAAAF,0CAAoB,EAACP,KAAK,CAACU,KAAK,EAAET,OAAO,CAAC;EACtD,OAAO,GAAGK,KAAK,GAAGJ,SAAS,GAAGO,GAAG,EAAE;AACrC","ignoreList":[]}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatDateTimeForDisplay = formatDateTimeForDisplay;
7
+ var _intlCache = require("../internal/intlCache");
8
+ var _parseDateTimeId = require("../datetime/parseDateTimeId");
9
+ /**
10
+ * Formats a locale-aware date-time string for UI labels.
11
+ *
12
+ * @param dateTimeId - Wire date-time string.
13
+ * @param options - Locale, date/time styles, and optional time zone.
14
+ * @returns Locale-formatted date-time string, or `''` when invalid.
15
+ *
16
+ * @example
17
+ * formatDateTimeForDisplay('2026-07-28T10:01', { locale: 'en-US' })
18
+ */
19
+ function formatDateTimeForDisplay(dateTimeId, options) {
20
+ const parts = (0, _parseDateTimeId.parseDateTimeId)(dateTimeId);
21
+ if (!parts) {
22
+ return '';
23
+ }
24
+ const date = new Date(parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second ?? 0);
25
+ const formatter = (0, _intlCache.getCachedDateFormatter)(options?.locale ?? 'en-US', {
26
+ dateStyle: options?.dateStyle ?? 'medium',
27
+ timeStyle: options?.timeStyle ?? 'short',
28
+ ...(options?.timeZone ? {
29
+ timeZone: options.timeZone
30
+ } : {})
31
+ });
32
+ return formatter.format(date);
33
+ }
34
+ //# sourceMappingURL=formatDateTimeForDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_intlCache","require","_parseDateTimeId","formatDateTimeForDisplay","dateTimeId","options","parts","parseDateTimeId","date","Date","year","month","day","hour","minute","second","formatter","getCachedDateFormatter","locale","dateStyle","timeStyle","timeZone","format"],"sourceRoot":"../../../../src","sources":["dates/display/formatDateTimeForDisplay.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,wBAAwBA,CACtCC,UAAsB,EACtBC,OAAsC,EAC9B;EACR,MAAMC,KAAK,GAAG,IAAAC,gCAAe,EAACH,UAAU,CAAC;EACzC,IAAI,CAACE,KAAK,EAAE;IACV,OAAO,EAAE;EACX;EACA,MAAME,IAAI,GAAG,IAAIC,IAAI,CACnBH,KAAK,CAACI,IAAI,EACVJ,KAAK,CAACK,KAAK,GAAG,CAAC,EACfL,KAAK,CAACM,GAAG,EACTN,KAAK,CAACO,IAAI,EACVP,KAAK,CAACQ,MAAM,EACZR,KAAK,CAACS,MAAM,IAAI,CAClB,CAAC;EACD,MAAMC,SAAS,GAAG,IAAAC,iCAAsB,EAACZ,OAAO,EAAEa,MAAM,IAAI,OAAO,EAAE;IACnEC,SAAS,EAAEd,OAAO,EAAEc,SAAS,IAAI,QAAQ;IACzCC,SAAS,EAAEf,OAAO,EAAEe,SAAS,IAAI,OAAO;IACxC,IAAIf,OAAO,EAAEgB,QAAQ,GAAG;MAAEA,QAAQ,EAAEhB,OAAO,CAACgB;IAAS,CAAC,GAAG,CAAC,CAAC;EAC7D,CAAC,CAAC;EACF,OAAOL,SAAS,CAACM,MAAM,CAACd,IAAI,CAAC;AAC/B","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatMonthForDisplay = formatMonthForDisplay;
7
+ var _dateIdToNativeDate = require("../internal/dateIdToNativeDate");
8
+ var _intlCache = require("../internal/intlCache");
9
+ /**
10
+ * Formats a locale-aware month/year string for UI labels.
11
+ *
12
+ * @param monthId - Wire month string (`YYYY-MM-01`).
13
+ * @param options - Locale, date style, and optional time zone.
14
+ * @returns Locale-formatted month/year string.
15
+ *
16
+ * @example
17
+ * formatMonthForDisplay('2026-07-01', { locale: 'en-US' }) // e.g. '07/2026'
18
+ */
19
+ function formatMonthForDisplay(monthId, options) {
20
+ const formatter = (0, _intlCache.getCachedDateFormatter)(options?.locale ?? 'en-US', {
21
+ month: '2-digit',
22
+ year: 'numeric',
23
+ ...(options?.dateStyle === 'long' ? {
24
+ month: 'long',
25
+ year: 'numeric'
26
+ } : {}),
27
+ ...(options?.timeZone ? {
28
+ timeZone: options.timeZone
29
+ } : {})
30
+ });
31
+ return formatter.format((0, _dateIdToNativeDate.dateIdToNativeDate)(monthId));
32
+ }
33
+ //# sourceMappingURL=formatMonthForDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateIdToNativeDate","require","_intlCache","formatMonthForDisplay","monthId","options","formatter","getCachedDateFormatter","locale","month","year","dateStyle","timeZone","format","dateIdToNativeDate"],"sourceRoot":"../../../../src","sources":["dates/display/formatMonthForDisplay.ts"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,qBAAqBA,CACnCC,OAAgB,EAChBC,OAAkC,EAC1B;EACR,MAAMC,SAAS,GAAG,IAAAC,iCAAsB,EAACF,OAAO,EAAEG,MAAM,IAAI,OAAO,EAAE;IACnEC,KAAK,EAAE,SAAS;IAChBC,IAAI,EAAE,SAAS;IACf,IAAIL,OAAO,EAAEM,SAAS,KAAK,MAAM,GAAG;MAAEF,KAAK,EAAE,MAAM;MAAEC,IAAI,EAAE;IAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5E,IAAIL,OAAO,EAAEO,QAAQ,GAAG;MAAEA,QAAQ,EAAEP,OAAO,CAACO;IAAS,CAAC,GAAG,CAAC,CAAC;EAC7D,CAAC,CAAC;EACF,OAAON,SAAS,CAACO,MAAM,CAAC,IAAAC,sCAAkB,EAACV,OAAO,CAAC,CAAC;AACtD","ignoreList":[]}
@@ -0,0 +1,367 @@
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 _dateComponentLabels.DEFAULT_DATE_COMPONENT_LABELS;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "applyDateSegmentChange", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _applyDateSegmentChange.applyDateSegmentChange;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "clampDateParts", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _clampDateParts.clampDateParts;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "clampDateTimeId", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _clampDateTimeId.clampDateTimeId;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "clampMonthParts", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _clampMonthParts.clampMonthParts;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "compareDateIds", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _compareDateIds.compareDateIds;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "compareDateTimeIds", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _compareDateTimeIds.compareDateTimeIds;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "compareMonthIds", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _compareMonthIds.compareMonthIds;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "dateId", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _dateId.dateId;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "dateRangeAroundDay", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _dateRangeAroundDay.dateRangeAroundDay;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "dateRangeFromLastNDays", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _dateRangeFromLastNDays.dateRangeFromLastNDays;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "dateTimeId", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _dateTimeId.dateTimeId;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "eachDateIdInRange", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _eachDateIdInRange.eachDateIdInRange;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "formatCalendarMonthYear", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _formatCalendarMonthYear.formatCalendarMonthYear;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "formatDateForDisplay", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _formatDateForDisplay.formatDateForDisplay;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "formatDateId", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _formatDateId.formatDateId;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "formatDateRangeForDisplay", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _formatDateRangeForDisplay.formatDateRangeForDisplay;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, "formatDateSegment", {
109
+ enumerable: true,
110
+ get: function () {
111
+ return _formatDateSegment.formatDateSegment;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, "formatDateTimeForDisplay", {
115
+ enumerable: true,
116
+ get: function () {
117
+ return _formatDateTimeForDisplay.formatDateTimeForDisplay;
118
+ }
119
+ });
120
+ Object.defineProperty(exports, "formatDateTimeId", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _formatDateTimeId.formatDateTimeId;
124
+ }
125
+ });
126
+ Object.defineProperty(exports, "formatDateTimeListDateRow", {
127
+ enumerable: true,
128
+ get: function () {
129
+ return _formatDateTimeListDateRow.formatDateTimeListDateRow;
130
+ }
131
+ });
132
+ Object.defineProperty(exports, "formatDateTimeListHour", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _formatDateTimeListHour.formatDateTimeListHour;
136
+ }
137
+ });
138
+ Object.defineProperty(exports, "formatDateTimeListMinute", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _formatDateTimeListMinute.formatDateTimeListMinute;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "formatDateTimeListPeriod", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _formatDateTimeListPeriod.formatDateTimeListPeriod;
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "formatMonthCalendarMonth", {
151
+ enumerable: true,
152
+ get: function () {
153
+ return _formatMonthCalendarMonth.formatMonthCalendarMonth;
154
+ }
155
+ });
156
+ Object.defineProperty(exports, "formatMonthCalendarYear", {
157
+ enumerable: true,
158
+ get: function () {
159
+ return _formatMonthCalendarYear.formatMonthCalendarYear;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "formatMonthForDisplay", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _formatMonthForDisplay.formatMonthForDisplay;
166
+ }
167
+ });
168
+ Object.defineProperty(exports, "formatMonthId", {
169
+ enumerable: true,
170
+ get: function () {
171
+ return _formatMonthId.formatMonthId;
172
+ }
173
+ });
174
+ Object.defineProperty(exports, "formatSelectYear", {
175
+ enumerable: true,
176
+ get: function () {
177
+ return _dateComponentLabels.formatSelectYear;
178
+ }
179
+ });
180
+ Object.defineProperty(exports, "getCalendarWeekdayLabels", {
181
+ enumerable: true,
182
+ get: function () {
183
+ return _getCalendarWeekdayLabels.getCalendarWeekdayLabels;
184
+ }
185
+ });
186
+ Object.defineProperty(exports, "getDateFieldSegments", {
187
+ enumerable: true,
188
+ get: function () {
189
+ return _getDateFieldSegments.getDateFieldSegments;
190
+ }
191
+ });
192
+ Object.defineProperty(exports, "getDateSegmentAccessibilityLabel", {
193
+ enumerable: true,
194
+ get: function () {
195
+ return _dateComponentLabels.getDateSegmentAccessibilityLabel;
196
+ }
197
+ });
198
+ Object.defineProperty(exports, "getDateTimeFieldSegments", {
199
+ enumerable: true,
200
+ get: function () {
201
+ return _getDateTimeFieldSegments.getDateTimeFieldSegments;
202
+ }
203
+ });
204
+ Object.defineProperty(exports, "getDateTimeSegmentVisibility", {
205
+ enumerable: true,
206
+ get: function () {
207
+ return _getDateTimeSegmentVisibility.getDateTimeSegmentVisibility;
208
+ }
209
+ });
210
+ Object.defineProperty(exports, "getEmptyDateSegmentText", {
211
+ enumerable: true,
212
+ get: function () {
213
+ return _getEmptyDateSegmentText.getEmptyDateSegmentText;
214
+ }
215
+ });
216
+ Object.defineProperty(exports, "isLocaleHour12", {
217
+ enumerable: true,
218
+ get: function () {
219
+ return _isLocaleHour.isLocaleHour12;
220
+ }
221
+ });
222
+ Object.defineProperty(exports, "isValidDateId", {
223
+ enumerable: true,
224
+ get: function () {
225
+ return _isValidDateId.isValidDateId;
226
+ }
227
+ });
228
+ Object.defineProperty(exports, "isValidDateParts", {
229
+ enumerable: true,
230
+ get: function () {
231
+ return _isValidDateParts.isValidDateParts;
232
+ }
233
+ });
234
+ Object.defineProperty(exports, "isValidDateTimeId", {
235
+ enumerable: true,
236
+ get: function () {
237
+ return _isValidDateTimeId.isValidDateTimeId;
238
+ }
239
+ });
240
+ Object.defineProperty(exports, "isValidMonthId", {
241
+ enumerable: true,
242
+ get: function () {
243
+ return _isValidMonthId.isValidMonthId;
244
+ }
245
+ });
246
+ Object.defineProperty(exports, "isValidMonthParts", {
247
+ enumerable: true,
248
+ get: function () {
249
+ return _isValidMonthParts.isValidMonthParts;
250
+ }
251
+ });
252
+ Object.defineProperty(exports, "monthId", {
253
+ enumerable: true,
254
+ get: function () {
255
+ return _monthId.monthId;
256
+ }
257
+ });
258
+ Object.defineProperty(exports, "normalizeDateRange", {
259
+ enumerable: true,
260
+ get: function () {
261
+ return _normalizeDateRange.normalizeDateRange;
262
+ }
263
+ });
264
+ Object.defineProperty(exports, "nowDateTimeId", {
265
+ enumerable: true,
266
+ get: function () {
267
+ return _nowDateTimeId.nowDateTimeId;
268
+ }
269
+ });
270
+ Object.defineProperty(exports, "parseDateId", {
271
+ enumerable: true,
272
+ get: function () {
273
+ return _parseDateId.parseDateId;
274
+ }
275
+ });
276
+ Object.defineProperty(exports, "parseDateSegment", {
277
+ enumerable: true,
278
+ get: function () {
279
+ return _parseDateSegment.parseDateSegment;
280
+ }
281
+ });
282
+ Object.defineProperty(exports, "parseDateTimeId", {
283
+ enumerable: true,
284
+ get: function () {
285
+ return _parseDateTimeId.parseDateTimeId;
286
+ }
287
+ });
288
+ Object.defineProperty(exports, "parseMonthId", {
289
+ enumerable: true,
290
+ get: function () {
291
+ return _parseMonthId.parseMonthId;
292
+ }
293
+ });
294
+ Object.defineProperty(exports, "resolveDateComponentLabels", {
295
+ enumerable: true,
296
+ get: function () {
297
+ return _dateComponentLabels.resolveDateComponentLabels;
298
+ }
299
+ });
300
+ Object.defineProperty(exports, "toMonthId", {
301
+ enumerable: true,
302
+ get: function () {
303
+ return _toMonthId.toMonthId;
304
+ }
305
+ });
306
+ Object.defineProperty(exports, "todayDateId", {
307
+ enumerable: true,
308
+ get: function () {
309
+ return _todayDateId.todayDateId;
310
+ }
311
+ });
312
+ Object.defineProperty(exports, "todayMonthId", {
313
+ enumerable: true,
314
+ get: function () {
315
+ return _todayMonthId.todayMonthId;
316
+ }
317
+ });
318
+ var _clampDateParts = require("./wire/clampDateParts");
319
+ var _clampMonthParts = require("./wire/clampMonthParts");
320
+ var _dateId = require("./wire/dateId");
321
+ var _monthId = require("./wire/monthId");
322
+ var _formatDateId = require("./wire/formatDateId");
323
+ var _formatMonthId = require("./wire/formatMonthId");
324
+ var _isValidDateId = require("./wire/isValidDateId");
325
+ var _isValidDateParts = require("./wire/isValidDateParts");
326
+ var _isValidMonthId = require("./wire/isValidMonthId");
327
+ var _isValidMonthParts = require("./wire/isValidMonthParts");
328
+ var _parseDateId = require("./wire/parseDateId");
329
+ var _parseMonthId = require("./wire/parseMonthId");
330
+ var _toMonthId = require("./wire/toMonthId");
331
+ var _todayDateId = require("./wire/todayDateId");
332
+ var _todayMonthId = require("./wire/todayMonthId");
333
+ var _clampDateTimeId = require("./datetime/clampDateTimeId");
334
+ var _compareDateTimeIds = require("./datetime/compareDateTimeIds");
335
+ var _dateTimeId = require("./datetime/dateTimeId");
336
+ var _formatDateTimeId = require("./datetime/formatDateTimeId");
337
+ var _isLocaleHour = require("./datetime/isLocaleHour12");
338
+ var _formatDateTimeListHour = require("./datetime/formatDateTimeListHour");
339
+ var _formatDateTimeListMinute = require("./datetime/formatDateTimeListMinute");
340
+ var _formatDateTimeListPeriod = require("./datetime/formatDateTimeListPeriod");
341
+ var _isValidDateTimeId = require("./datetime/isValidDateTimeId");
342
+ var _nowDateTimeId = require("./datetime/nowDateTimeId");
343
+ var _parseDateTimeId = require("./datetime/parseDateTimeId");
344
+ var _formatDateForDisplay = require("./display/formatDateForDisplay");
345
+ var _formatDateRangeForDisplay = require("./display/formatDateRangeForDisplay");
346
+ var _formatDateTimeForDisplay = require("./display/formatDateTimeForDisplay");
347
+ var _formatMonthForDisplay = require("./display/formatMonthForDisplay");
348
+ var _compareDateIds = require("./ranges/compareDateIds");
349
+ var _compareMonthIds = require("./ranges/compareMonthIds");
350
+ var _dateRangeAroundDay = require("./ranges/dateRangeAroundDay");
351
+ var _dateRangeFromLastNDays = require("./ranges/dateRangeFromLastNDays");
352
+ var _eachDateIdInRange = require("./ranges/eachDateIdInRange");
353
+ var _normalizeDateRange = require("./ranges/normalizeDateRange");
354
+ var _applyDateSegmentChange = require("./segments/applyDateSegmentChange");
355
+ var _formatDateSegment = require("./segments/formatDateSegment");
356
+ var _getDateFieldSegments = require("./segments/getDateFieldSegments");
357
+ var _getDateTimeFieldSegments = require("./segments/getDateTimeFieldSegments");
358
+ var _getDateTimeSegmentVisibility = require("./segments/getDateTimeSegmentVisibility");
359
+ var _getEmptyDateSegmentText = require("./segments/getEmptyDateSegmentText");
360
+ var _parseDateSegment = require("./segments/parseDateSegment");
361
+ var _formatCalendarMonthYear = require("./calendar/formatCalendarMonthYear");
362
+ var _formatDateTimeListDateRow = require("./calendar/formatDateTimeListDateRow");
363
+ var _formatMonthCalendarMonth = require("./calendar/formatMonthCalendarMonth");
364
+ var _formatMonthCalendarYear = require("./calendar/formatMonthCalendarYear");
365
+ var _getCalendarWeekdayLabels = require("./calendar/getCalendarWeekdayLabels");
366
+ var _dateComponentLabels = require("./labels/dateComponentLabels");
367
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_clampDateParts","require","_clampMonthParts","_dateId","_monthId","_formatDateId","_formatMonthId","_isValidDateId","_isValidDateParts","_isValidMonthId","_isValidMonthParts","_parseDateId","_parseMonthId","_toMonthId","_todayDateId","_todayMonthId","_clampDateTimeId","_compareDateTimeIds","_dateTimeId","_formatDateTimeId","_isLocaleHour","_formatDateTimeListHour","_formatDateTimeListMinute","_formatDateTimeListPeriod","_isValidDateTimeId","_nowDateTimeId","_parseDateTimeId","_formatDateForDisplay","_formatDateRangeForDisplay","_formatDateTimeForDisplay","_formatMonthForDisplay","_compareDateIds","_compareMonthIds","_dateRangeAroundDay","_dateRangeFromLastNDays","_eachDateIdInRange","_normalizeDateRange","_applyDateSegmentChange","_formatDateSegment","_getDateFieldSegments","_getDateTimeFieldSegments","_getDateTimeSegmentVisibility","_getEmptyDateSegmentText","_parseDateSegment","_formatCalendarMonthYear","_formatDateTimeListDateRow","_formatMonthCalendarMonth","_formatMonthCalendarYear","_getCalendarWeekdayLabels","_dateComponentLabels"],"sourceRoot":"../../../src","sources":["dates/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AACA,IAAAa,YAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AAEA,IAAAe,gBAAA,GAAAf,OAAA;AACA,IAAAgB,mBAAA,GAAAhB,OAAA;AACA,IAAAiB,WAAA,GAAAjB,OAAA;AACA,IAAAkB,iBAAA,GAAAlB,OAAA;AACA,IAAAmB,aAAA,GAAAnB,OAAA;AACA,IAAAoB,uBAAA,GAAApB,OAAA;AACA,IAAAqB,yBAAA,GAAArB,OAAA;AACA,IAAAsB,yBAAA,GAAAtB,OAAA;AACA,IAAAuB,kBAAA,GAAAvB,OAAA;AACA,IAAAwB,cAAA,GAAAxB,OAAA;AACA,IAAAyB,gBAAA,GAAAzB,OAAA;AAEA,IAAA0B,qBAAA,GAAA1B,OAAA;AACA,IAAA2B,0BAAA,GAAA3B,OAAA;AACA,IAAA4B,yBAAA,GAAA5B,OAAA;AACA,IAAA6B,sBAAA,GAAA7B,OAAA;AAEA,IAAA8B,eAAA,GAAA9B,OAAA;AACA,IAAA+B,gBAAA,GAAA/B,OAAA;AACA,IAAAgC,mBAAA,GAAAhC,OAAA;AACA,IAAAiC,uBAAA,GAAAjC,OAAA;AACA,IAAAkC,kBAAA,GAAAlC,OAAA;AACA,IAAAmC,mBAAA,GAAAnC,OAAA;AAEA,IAAAoC,uBAAA,GAAApC,OAAA;AACA,IAAAqC,kBAAA,GAAArC,OAAA;AACA,IAAAsC,qBAAA,GAAAtC,OAAA;AACA,IAAAuC,yBAAA,GAAAvC,OAAA;AACA,IAAAwC,6BAAA,GAAAxC,OAAA;AACA,IAAAyC,wBAAA,GAAAzC,OAAA;AACA,IAAA0C,iBAAA,GAAA1C,OAAA;AAEA,IAAA2C,wBAAA,GAAA3C,OAAA;AACA,IAAA4C,0BAAA,GAAA5C,OAAA;AACA,IAAA6C,yBAAA,GAAA7C,OAAA;AACA,IAAA8C,wBAAA,GAAA9C,OAAA;AACA,IAAA+C,yBAAA,GAAA/C,OAAA;AAGA,IAAAgD,oBAAA,GAAAhD,OAAA","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.asMonthId = exports.asDateTimeId = exports.asDateId = void 0;
7
+ /**
8
+ * @internal
9
+ * Unchecked brand casts for wire producers that have already guaranteed a
10
+ * well-formed wire string. Callers outside `@cdx-ui/formatters` must go through
11
+ * the validating smart constructors (`dateId`, `monthId`, `dateTimeId`) instead.
12
+ */
13
+ const asDateId = value => value;
14
+ exports.asDateId = asDateId;
15
+ const asMonthId = value => value;
16
+ exports.asMonthId = asMonthId;
17
+ const asDateTimeId = value => value;
18
+ exports.asDateTimeId = asDateTimeId;
19
+ //# sourceMappingURL=brand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["asDateId","value","exports","asMonthId","asDateTimeId"],"sourceRoot":"../../../../src","sources":["dates/internal/brand.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAIC,KAAa,IAAaA,KAAe;AAACC,OAAA,CAAAF,QAAA,GAAAA,QAAA;AAC5D,MAAMG,SAAS,GAAIF,KAAa,IAAcA,KAAgB;AAACC,OAAA,CAAAC,SAAA,GAAAA,SAAA;AAC/D,MAAMC,YAAY,GAAIH,KAAa,IAAiBA,KAAmB;AAACC,OAAA,CAAAE,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatCalendarWeekday = formatCalendarWeekday;
7
+ var _intlCache = require("./intlCache");
8
+ /**
9
+ * @internal
10
+ */
11
+ function formatCalendarWeekday(weekdayIndex, options) {
12
+ // 2023-01-01 was a Sunday — index 0..6 maps Sun..Sat regardless of locale week start.
13
+ const ref = new Date(2023, 0, 1 + weekdayIndex);
14
+ const formatter = (0, _intlCache.getCachedDateFormatter)(options?.locale ?? 'en-US', {
15
+ weekday: options?.weekday ?? 'short',
16
+ ...(options?.timeZone ? {
17
+ timeZone: options.timeZone
18
+ } : {})
19
+ });
20
+ return formatter.format(ref);
21
+ }
22
+ //# sourceMappingURL=calendarHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_intlCache","require","formatCalendarWeekday","weekdayIndex","options","ref","Date","formatter","getCachedDateFormatter","locale","weekday","timeZone","format"],"sourceRoot":"../../../../src","sources":["dates/internal/calendarHelpers.ts"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACO,SAASC,qBAAqBA,CACnCC,YAAoB,EACpBC,OAAuE,EAC/D;EACR;EACA,MAAMC,GAAG,GAAG,IAAIC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,GAAGH,YAAY,CAAC;EAC/C,MAAMI,SAAS,GAAG,IAAAC,iCAAsB,EAACJ,OAAO,EAAEK,MAAM,IAAI,OAAO,EAAE;IACnEC,OAAO,EAAEN,OAAO,EAAEM,OAAO,IAAI,OAAO;IACpC,IAAIN,OAAO,EAAEO,QAAQ,GAAG;MAAEA,QAAQ,EAAEP,OAAO,CAACO;IAAS,CAAC,GAAG,CAAC,CAAC;EAC7D,CAAC,CAAC;EACF,OAAOJ,SAAS,CAACK,MAAM,CAACP,GAAG,CAAC;AAC9B","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.clampDay = clampDay;
7
+ exports.clampMonth = clampMonth;
8
+ exports.partsToDate = partsToDate;
9
+ var _dateFns = require("date-fns");
10
+ function partsToDate(parts) {
11
+ return new Date(parts.year, parts.month - 1, parts.day);
12
+ }
13
+ function clampMonth(month) {
14
+ return Math.min(12, Math.max(1, month));
15
+ }
16
+ function clampDay(year, month, day) {
17
+ const maxDay = (0, _dateFns.getDaysInMonth)(new Date(year, month - 1, 1));
18
+ return Math.min(maxDay, Math.max(1, day));
19
+ }
20
+ //# sourceMappingURL=clampHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateFns","require","partsToDate","parts","Date","year","month","day","clampMonth","Math","min","max","clampDay","maxDay","getDaysInMonth"],"sourceRoot":"../../../../src","sources":["dates/internal/clampHelpers.ts"],"mappings":";;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAGO,SAASC,WAAWA,CAACC,KAAgB,EAAQ;EAClD,OAAO,IAAIC,IAAI,CAACD,KAAK,CAACE,IAAI,EAAEF,KAAK,CAACG,KAAK,GAAG,CAAC,EAAEH,KAAK,CAACI,GAAG,CAAC;AACzD;AAEO,SAASC,UAAUA,CAACF,KAAa,EAAU;EAChD,OAAOG,IAAI,CAACC,GAAG,CAAC,EAAE,EAAED,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEL,KAAK,CAAC,CAAC;AACzC;AAEO,SAASM,QAAQA,CAACP,IAAY,EAAEC,KAAa,EAAEC,GAAW,EAAU;EACzE,MAAMM,MAAM,GAAG,IAAAC,uBAAc,EAAC,IAAIV,IAAI,CAACC,IAAI,EAAEC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;EAC3D,OAAOG,IAAI,CAACC,GAAG,CAACG,MAAM,EAAEJ,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEJ,GAAG,CAAC,CAAC;AAC3C","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.dateIdToNativeDate = dateIdToNativeDate;
7
+ var _dateFns = require("date-fns");
8
+ /**
9
+ * Local calendar `Date` from a wire id. Never use `parseISO` for date-only ids
10
+ * (UTC midnight shifts the calendar day in western time zones).
11
+ *
12
+ * Accepts either a `DateId` or `MonthId` — both share the `YYYY-MM-DD` wire
13
+ * shape and only the date portion is parsed.
14
+ *
15
+ * @internal Not part of the public package API.
16
+ */
17
+ function dateIdToNativeDate(dateId) {
18
+ return (0, _dateFns.parse)(dateId, 'yyyy-MM-dd', new Date());
19
+ }
20
+ //# sourceMappingURL=dateIdToNativeDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_dateFns","require","dateIdToNativeDate","dateId","parse","Date"],"sourceRoot":"../../../../src","sources":["dates/internal/dateIdToNativeDate.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAACC,MAAwB,EAAQ;EACjE,OAAO,IAAAC,cAAK,EAACD,MAAM,EAAE,YAAY,EAAE,IAAIE,IAAI,CAAC,CAAC,CAAC;AAChD","ignoreList":[]}