@gobrand/tiempo 2.10.0 → 3.0.0

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 (336) hide show
  1. package/dist/addQuarters.d.ts +9 -9
  2. package/dist/addQuarters.d.ts.map +1 -1
  3. package/dist/addQuarters.js +1 -1
  4. package/dist/browserTimezone.d.ts +1 -1
  5. package/dist/chunk-25CVKMFC.js +21 -0
  6. package/dist/chunk-25CVKMFC.js.map +1 -0
  7. package/dist/{chunk-SDJJP4HW.js → chunk-3TS3D7WD.js} +4 -1
  8. package/dist/chunk-3TS3D7WD.js.map +1 -0
  9. package/dist/chunk-5Y5JH32Z.js +16 -0
  10. package/dist/chunk-5Y5JH32Z.js.map +1 -0
  11. package/dist/{chunk-KN45BU3W.js → chunk-7OEGJCW7.js} +10 -3
  12. package/dist/chunk-7OEGJCW7.js.map +1 -0
  13. package/dist/{chunk-XMW72PNW.js → chunk-7SCQV77A.js} +7 -1
  14. package/dist/chunk-7SCQV77A.js.map +1 -0
  15. package/dist/{chunk-5CFWMIHL.js → chunk-BV32K227.js} +7 -1
  16. package/dist/chunk-BV32K227.js.map +1 -0
  17. package/dist/chunk-GR7322AQ.js +20 -0
  18. package/dist/chunk-GR7322AQ.js.map +1 -0
  19. package/dist/chunk-KPB5ENNM.js +25 -0
  20. package/dist/chunk-KPB5ENNM.js.map +1 -0
  21. package/dist/{chunk-PVOGE6ME.js → chunk-MTDZG4HK.js} +4 -1
  22. package/dist/chunk-MTDZG4HK.js.map +1 -0
  23. package/dist/{chunk-SPK7C7RP.js → chunk-OSBVYUOQ.js} +13 -3
  24. package/dist/chunk-OSBVYUOQ.js.map +1 -0
  25. package/dist/{chunk-TGINH5JV.js → chunk-OVSCDXYN.js} +7 -1
  26. package/dist/chunk-OVSCDXYN.js.map +1 -0
  27. package/dist/{chunk-7HUJC5M6.js → chunk-S7L5KBI4.js} +4 -4
  28. package/dist/chunk-UQ2F3I2S.js +19 -0
  29. package/dist/chunk-UQ2F3I2S.js.map +1 -0
  30. package/dist/{chunk-RXTGHEHQ.js → chunk-VQAGV72H.js} +7 -6
  31. package/dist/chunk-VQAGV72H.js.map +1 -0
  32. package/dist/{chunk-VCWP3CZE.js → chunk-YNLBS34B.js} +9 -3
  33. package/dist/chunk-YNLBS34B.js.map +1 -0
  34. package/dist/chunk-YRCFMGBH.js +54 -0
  35. package/dist/chunk-YRCFMGBH.js.map +1 -0
  36. package/dist/differenceInDays.d.ts +2 -2
  37. package/dist/differenceInHours.d.ts +2 -2
  38. package/dist/differenceInMicroseconds.d.ts +1 -1
  39. package/dist/differenceInMilliseconds.d.ts +1 -1
  40. package/dist/differenceInMinutes.d.ts +2 -2
  41. package/dist/differenceInMonths.d.ts +2 -2
  42. package/dist/differenceInNanoseconds.d.ts +1 -1
  43. package/dist/differenceInQuarters.d.ts +13 -17
  44. package/dist/differenceInQuarters.d.ts.map +1 -1
  45. package/dist/differenceInQuarters.js +1 -1
  46. package/dist/differenceInSeconds.d.ts +2 -2
  47. package/dist/differenceInWeeks.d.ts +2 -2
  48. package/dist/differenceInYears.d.ts +2 -2
  49. package/dist/eachDayOfInterval.d.ts +1 -1
  50. package/dist/eachHourOfInterval.d.ts +1 -1
  51. package/dist/eachMinuteOfInterval.d.ts +1 -1
  52. package/dist/eachMonthOfInterval.d.ts +1 -1
  53. package/dist/eachQuarterOfInterval.d.ts +23 -27
  54. package/dist/eachQuarterOfInterval.d.ts.map +1 -1
  55. package/dist/eachQuarterOfInterval.js +1 -1
  56. package/dist/eachWeekOfInterval.d.ts +1 -1
  57. package/dist/eachYearOfInterval.d.ts +1 -1
  58. package/dist/endOfDay.d.ts +2 -2
  59. package/dist/endOfDay.js +2 -2
  60. package/dist/endOfMonth.d.ts +14 -4
  61. package/dist/endOfMonth.d.ts.map +1 -1
  62. package/dist/endOfMonth.js +2 -2
  63. package/dist/endOfQuarter.d.ts +3 -2
  64. package/dist/endOfQuarter.d.ts.map +1 -1
  65. package/dist/endOfQuarter.js +2 -2
  66. package/dist/endOfWeek.d.ts +13 -3
  67. package/dist/endOfWeek.d.ts.map +1 -1
  68. package/dist/endOfWeek.js +1 -1
  69. package/dist/endOfYear.d.ts +14 -4
  70. package/dist/endOfYear.d.ts.map +1 -1
  71. package/dist/endOfYear.js +2 -2
  72. package/dist/format.d.ts +1 -1
  73. package/dist/formatPlainDate.d.ts +1 -1
  74. package/dist/getQuarter.d.ts +8 -25
  75. package/dist/getQuarter.d.ts.map +1 -1
  76. package/dist/getQuarter.js +1 -3
  77. package/dist/index.d.ts +92 -92
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +23 -23
  80. package/dist/isAfter.d.ts +1 -1
  81. package/dist/isBefore.d.ts +1 -1
  82. package/dist/isPlainDateAfter.d.ts +1 -1
  83. package/dist/isPlainDateBefore.d.ts +1 -1
  84. package/dist/isPlainDateEqual.d.ts +1 -1
  85. package/dist/isPlainTimeAfter.d.ts +1 -1
  86. package/dist/isPlainTimeBefore.d.ts +1 -1
  87. package/dist/isPlainTimeEqual.d.ts +1 -1
  88. package/dist/isSameDay.d.ts +1 -1
  89. package/dist/isSameQuarter.d.ts +12 -23
  90. package/dist/isSameQuarter.d.ts.map +1 -1
  91. package/dist/isSameQuarter.js +1 -1
  92. package/dist/isWithinInterval.d.ts +1 -1
  93. package/dist/now.d.ts +2 -2
  94. package/dist/shared/differenceInMilliseconds.d.ts +1 -1
  95. package/dist/shared/isAfter.d.ts +1 -1
  96. package/dist/shared/isBefore.d.ts +1 -1
  97. package/dist/shared/normalizeWithPlainDate.d.ts +1 -1
  98. package/dist/shared/nowZoned.d.ts +1 -1
  99. package/dist/shared/plainDateToZonedDateTime.d.ts +2 -2
  100. package/dist/shared/temporal.d.ts +1 -1
  101. package/dist/simpleFormat.d.ts +2 -2
  102. package/dist/startOfDay.d.ts +2 -2
  103. package/dist/startOfMonth.d.ts +14 -4
  104. package/dist/startOfMonth.d.ts.map +1 -1
  105. package/dist/startOfMonth.js +1 -1
  106. package/dist/startOfQuarter.d.ts +3 -2
  107. package/dist/startOfQuarter.d.ts.map +1 -1
  108. package/dist/startOfQuarter.js +1 -1
  109. package/dist/startOfWeek.d.ts +13 -3
  110. package/dist/startOfWeek.d.ts.map +1 -1
  111. package/dist/startOfWeek.js +1 -1
  112. package/dist/startOfYear.d.ts +14 -4
  113. package/dist/startOfYear.d.ts.map +1 -1
  114. package/dist/startOfYear.js +1 -1
  115. package/dist/subQuarters.d.ts +12 -5
  116. package/dist/subQuarters.d.ts.map +1 -1
  117. package/dist/subQuarters.js +2 -2
  118. package/dist/toInstant.d.ts +27 -0
  119. package/dist/toInstant.d.ts.map +1 -0
  120. package/dist/toInstant.js +8 -0
  121. package/dist/toPlainDate.d.ts +2 -2
  122. package/dist/toPlainTime.d.ts +2 -2
  123. package/dist/toZonedTime.d.ts +2 -2
  124. package/dist/today.d.ts +2 -2
  125. package/dist/types.d.ts +1 -1
  126. package/package.json +5 -3
  127. package/dist/addDays.test.d.ts +0 -2
  128. package/dist/addDays.test.d.ts.map +0 -1
  129. package/dist/addHours.test.d.ts +0 -2
  130. package/dist/addHours.test.d.ts.map +0 -1
  131. package/dist/addMicroseconds.test.d.ts +0 -2
  132. package/dist/addMicroseconds.test.d.ts.map +0 -1
  133. package/dist/addMilliseconds.test.d.ts +0 -2
  134. package/dist/addMilliseconds.test.d.ts.map +0 -1
  135. package/dist/addMinutes.test.d.ts +0 -2
  136. package/dist/addMinutes.test.d.ts.map +0 -1
  137. package/dist/addMonths.test.d.ts +0 -2
  138. package/dist/addMonths.test.d.ts.map +0 -1
  139. package/dist/addNanoseconds.test.d.ts +0 -2
  140. package/dist/addNanoseconds.test.d.ts.map +0 -1
  141. package/dist/addQuarters.test.d.ts +0 -2
  142. package/dist/addQuarters.test.d.ts.map +0 -1
  143. package/dist/addSeconds.test.d.ts +0 -2
  144. package/dist/addSeconds.test.d.ts.map +0 -1
  145. package/dist/addWeeks.test.d.ts +0 -2
  146. package/dist/addWeeks.test.d.ts.map +0 -1
  147. package/dist/addYears.test.d.ts +0 -2
  148. package/dist/addYears.test.d.ts.map +0 -1
  149. package/dist/browserTimezone.test.d.ts +0 -2
  150. package/dist/browserTimezone.test.d.ts.map +0 -1
  151. package/dist/chunk-5CFWMIHL.js.map +0 -1
  152. package/dist/chunk-6UBZ5YB3.js +0 -43
  153. package/dist/chunk-6UBZ5YB3.js.map +0 -1
  154. package/dist/chunk-FYZNOTX3.js +0 -18
  155. package/dist/chunk-FYZNOTX3.js.map +0 -1
  156. package/dist/chunk-KN45BU3W.js.map +0 -1
  157. package/dist/chunk-NOV3D7OM.js +0 -17
  158. package/dist/chunk-NOV3D7OM.js.map +0 -1
  159. package/dist/chunk-PVOGE6ME.js.map +0 -1
  160. package/dist/chunk-RXTGHEHQ.js.map +0 -1
  161. package/dist/chunk-SDJJP4HW.js.map +0 -1
  162. package/dist/chunk-SPK7C7RP.js.map +0 -1
  163. package/dist/chunk-TGINH5JV.js.map +0 -1
  164. package/dist/chunk-VCWP3CZE.js.map +0 -1
  165. package/dist/chunk-VUKOSQWW.js +0 -14
  166. package/dist/chunk-VUKOSQWW.js.map +0 -1
  167. package/dist/chunk-W5YDBBNF.js +0 -13
  168. package/dist/chunk-W5YDBBNF.js.map +0 -1
  169. package/dist/chunk-XMW72PNW.js.map +0 -1
  170. package/dist/chunk-ZEL6JBBH.js +0 -14
  171. package/dist/chunk-ZEL6JBBH.js.map +0 -1
  172. package/dist/differenceInDays.test.d.ts +0 -2
  173. package/dist/differenceInDays.test.d.ts.map +0 -1
  174. package/dist/differenceInHours.test.d.ts +0 -2
  175. package/dist/differenceInHours.test.d.ts.map +0 -1
  176. package/dist/differenceInMicroseconds.test.d.ts +0 -2
  177. package/dist/differenceInMicroseconds.test.d.ts.map +0 -1
  178. package/dist/differenceInMilliseconds.test.d.ts +0 -2
  179. package/dist/differenceInMilliseconds.test.d.ts.map +0 -1
  180. package/dist/differenceInMinutes.test.d.ts +0 -2
  181. package/dist/differenceInMinutes.test.d.ts.map +0 -1
  182. package/dist/differenceInMonths.test.d.ts +0 -2
  183. package/dist/differenceInMonths.test.d.ts.map +0 -1
  184. package/dist/differenceInNanoseconds.test.d.ts +0 -2
  185. package/dist/differenceInNanoseconds.test.d.ts.map +0 -1
  186. package/dist/differenceInQuarters.test.d.ts +0 -2
  187. package/dist/differenceInQuarters.test.d.ts.map +0 -1
  188. package/dist/differenceInSeconds.test.d.ts +0 -2
  189. package/dist/differenceInSeconds.test.d.ts.map +0 -1
  190. package/dist/differenceInWeeks.test.d.ts +0 -2
  191. package/dist/differenceInWeeks.test.d.ts.map +0 -1
  192. package/dist/differenceInYears.test.d.ts +0 -2
  193. package/dist/differenceInYears.test.d.ts.map +0 -1
  194. package/dist/eachDayOfInterval.test.d.ts +0 -2
  195. package/dist/eachDayOfInterval.test.d.ts.map +0 -1
  196. package/dist/eachHourOfInterval.test.d.ts +0 -2
  197. package/dist/eachHourOfInterval.test.d.ts.map +0 -1
  198. package/dist/eachMinuteOfInterval.test.d.ts +0 -2
  199. package/dist/eachMinuteOfInterval.test.d.ts.map +0 -1
  200. package/dist/eachMonthOfInterval.test.d.ts +0 -2
  201. package/dist/eachMonthOfInterval.test.d.ts.map +0 -1
  202. package/dist/eachQuarterOfInterval.test.d.ts +0 -2
  203. package/dist/eachQuarterOfInterval.test.d.ts.map +0 -1
  204. package/dist/eachWeekOfInterval.test.d.ts +0 -2
  205. package/dist/eachWeekOfInterval.test.d.ts.map +0 -1
  206. package/dist/eachYearOfInterval.test.d.ts +0 -2
  207. package/dist/eachYearOfInterval.test.d.ts.map +0 -1
  208. package/dist/endOfDay.test.d.ts +0 -2
  209. package/dist/endOfDay.test.d.ts.map +0 -1
  210. package/dist/endOfMonth.test.d.ts +0 -2
  211. package/dist/endOfMonth.test.d.ts.map +0 -1
  212. package/dist/endOfQuarter.test.d.ts +0 -2
  213. package/dist/endOfQuarter.test.d.ts.map +0 -1
  214. package/dist/endOfWeek.test.d.ts +0 -2
  215. package/dist/endOfWeek.test.d.ts.map +0 -1
  216. package/dist/endOfYear.test.d.ts +0 -2
  217. package/dist/endOfYear.test.d.ts.map +0 -1
  218. package/dist/format.test.d.ts +0 -2
  219. package/dist/format.test.d.ts.map +0 -1
  220. package/dist/formatPlainDate.test.d.ts +0 -2
  221. package/dist/formatPlainDate.test.d.ts.map +0 -1
  222. package/dist/getQuarter.test.d.ts +0 -2
  223. package/dist/getQuarter.test.d.ts.map +0 -1
  224. package/dist/index.test.d.ts +0 -2
  225. package/dist/index.test.d.ts.map +0 -1
  226. package/dist/intlFormatDistance.test.d.ts +0 -2
  227. package/dist/intlFormatDistance.test.d.ts.map +0 -1
  228. package/dist/isAfter.test.d.ts +0 -2
  229. package/dist/isAfter.test.d.ts.map +0 -1
  230. package/dist/isBefore.test.d.ts +0 -2
  231. package/dist/isBefore.test.d.ts.map +0 -1
  232. package/dist/isFuture.test.d.ts +0 -2
  233. package/dist/isFuture.test.d.ts.map +0 -1
  234. package/dist/isPast.test.d.ts +0 -2
  235. package/dist/isPast.test.d.ts.map +0 -1
  236. package/dist/isPlainDateAfter.test.d.ts +0 -2
  237. package/dist/isPlainDateAfter.test.d.ts.map +0 -1
  238. package/dist/isPlainDateBefore.test.d.ts +0 -2
  239. package/dist/isPlainDateBefore.test.d.ts.map +0 -1
  240. package/dist/isPlainDateEqual.test.d.ts +0 -2
  241. package/dist/isPlainDateEqual.test.d.ts.map +0 -1
  242. package/dist/isPlainTimeAfter.test.d.ts +0 -2
  243. package/dist/isPlainTimeAfter.test.d.ts.map +0 -1
  244. package/dist/isPlainTimeBefore.test.d.ts +0 -2
  245. package/dist/isPlainTimeBefore.test.d.ts.map +0 -1
  246. package/dist/isPlainTimeEqual.test.d.ts +0 -2
  247. package/dist/isPlainTimeEqual.test.d.ts.map +0 -1
  248. package/dist/isSameDay.test.d.ts +0 -2
  249. package/dist/isSameDay.test.d.ts.map +0 -1
  250. package/dist/isSameHour.test.d.ts +0 -2
  251. package/dist/isSameHour.test.d.ts.map +0 -1
  252. package/dist/isSameMicrosecond.test.d.ts +0 -2
  253. package/dist/isSameMicrosecond.test.d.ts.map +0 -1
  254. package/dist/isSameMillisecond.test.d.ts +0 -2
  255. package/dist/isSameMillisecond.test.d.ts.map +0 -1
  256. package/dist/isSameMinute.test.d.ts +0 -2
  257. package/dist/isSameMinute.test.d.ts.map +0 -1
  258. package/dist/isSameMonth.test.d.ts +0 -2
  259. package/dist/isSameMonth.test.d.ts.map +0 -1
  260. package/dist/isSameNanosecond.test.d.ts +0 -2
  261. package/dist/isSameNanosecond.test.d.ts.map +0 -1
  262. package/dist/isSameQuarter.test.d.ts +0 -2
  263. package/dist/isSameQuarter.test.d.ts.map +0 -1
  264. package/dist/isSameSecond.test.d.ts +0 -2
  265. package/dist/isSameSecond.test.d.ts.map +0 -1
  266. package/dist/isSameWeek.test.d.ts +0 -2
  267. package/dist/isSameWeek.test.d.ts.map +0 -1
  268. package/dist/isSameYear.test.d.ts +0 -2
  269. package/dist/isSameYear.test.d.ts.map +0 -1
  270. package/dist/isWithinInterval.test.d.ts +0 -2
  271. package/dist/isWithinInterval.test.d.ts.map +0 -1
  272. package/dist/now.test.d.ts +0 -2
  273. package/dist/now.test.d.ts.map +0 -1
  274. package/dist/roundToNearestHour.test.d.ts +0 -2
  275. package/dist/roundToNearestHour.test.d.ts.map +0 -1
  276. package/dist/roundToNearestMinute.test.d.ts +0 -2
  277. package/dist/roundToNearestMinute.test.d.ts.map +0 -1
  278. package/dist/roundToNearestSecond.test.d.ts +0 -2
  279. package/dist/roundToNearestSecond.test.d.ts.map +0 -1
  280. package/dist/shared/temporal.test.d.ts +0 -2
  281. package/dist/shared/temporal.test.d.ts.map +0 -1
  282. package/dist/simpleFormat.test.d.ts +0 -2
  283. package/dist/simpleFormat.test.d.ts.map +0 -1
  284. package/dist/startOfDay.test.d.ts +0 -2
  285. package/dist/startOfDay.test.d.ts.map +0 -1
  286. package/dist/startOfMonth.test.d.ts +0 -2
  287. package/dist/startOfMonth.test.d.ts.map +0 -1
  288. package/dist/startOfQuarter.test.d.ts +0 -2
  289. package/dist/startOfQuarter.test.d.ts.map +0 -1
  290. package/dist/startOfWeek.test.d.ts +0 -2
  291. package/dist/startOfWeek.test.d.ts.map +0 -1
  292. package/dist/startOfYear.test.d.ts +0 -2
  293. package/dist/startOfYear.test.d.ts.map +0 -1
  294. package/dist/subDays.test.d.ts +0 -2
  295. package/dist/subDays.test.d.ts.map +0 -1
  296. package/dist/subHours.test.d.ts +0 -2
  297. package/dist/subHours.test.d.ts.map +0 -1
  298. package/dist/subMicroseconds.test.d.ts +0 -2
  299. package/dist/subMicroseconds.test.d.ts.map +0 -1
  300. package/dist/subMilliseconds.test.d.ts +0 -2
  301. package/dist/subMilliseconds.test.d.ts.map +0 -1
  302. package/dist/subMinutes.test.d.ts +0 -2
  303. package/dist/subMinutes.test.d.ts.map +0 -1
  304. package/dist/subMonths.test.d.ts +0 -2
  305. package/dist/subMonths.test.d.ts.map +0 -1
  306. package/dist/subNanoseconds.test.d.ts +0 -2
  307. package/dist/subNanoseconds.test.d.ts.map +0 -1
  308. package/dist/subQuarters.test.d.ts +0 -2
  309. package/dist/subQuarters.test.d.ts.map +0 -1
  310. package/dist/subSeconds.test.d.ts +0 -2
  311. package/dist/subSeconds.test.d.ts.map +0 -1
  312. package/dist/subWeeks.test.d.ts +0 -2
  313. package/dist/subWeeks.test.d.ts.map +0 -1
  314. package/dist/subYears.test.d.ts +0 -2
  315. package/dist/subYears.test.d.ts.map +0 -1
  316. package/dist/toDate.test.d.ts +0 -2
  317. package/dist/toDate.test.d.ts.map +0 -1
  318. package/dist/toIso.test.d.ts +0 -2
  319. package/dist/toIso.test.d.ts.map +0 -1
  320. package/dist/toIso9075.test.d.ts +0 -2
  321. package/dist/toIso9075.test.d.ts.map +0 -1
  322. package/dist/toPlainDate.test.d.ts +0 -2
  323. package/dist/toPlainDate.test.d.ts.map +0 -1
  324. package/dist/toPlainTime.test.d.ts +0 -2
  325. package/dist/toPlainTime.test.d.ts.map +0 -1
  326. package/dist/toUtc.d.ts +0 -27
  327. package/dist/toUtc.d.ts.map +0 -1
  328. package/dist/toUtc.js +0 -8
  329. package/dist/toUtc.test.d.ts +0 -2
  330. package/dist/toUtc.test.d.ts.map +0 -1
  331. package/dist/toZonedTime.test.d.ts +0 -2
  332. package/dist/toZonedTime.test.d.ts.map +0 -1
  333. package/dist/today.test.d.ts +0 -2
  334. package/dist/today.test.d.ts.map +0 -1
  335. /package/dist/{chunk-7HUJC5M6.js.map → chunk-S7L5KBI4.js.map} +0 -0
  336. /package/dist/{toUtc.js.map → toInstant.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { Temporal } from './shared/temporal';
2
- import type { DifferenceOptions } from './shared/differenceOptions';
1
+ import { Temporal } from './shared/temporal.js';
2
+ import type { DifferenceOptions } from './shared/differenceOptions.js';
3
3
  /**
4
4
  * Returns the number of minutes between two datetimes.
5
5
  * The result is positive if laterDate is after earlierDate, negative if before.
@@ -1,5 +1,5 @@
1
- import { Temporal } from './shared/temporal';
2
- import type { DifferenceOptions } from './shared/differenceOptions';
1
+ import { Temporal } from './shared/temporal.js';
2
+ import type { DifferenceOptions } from './shared/differenceOptions.js';
3
3
  /**
4
4
  * Returns the number of months between two datetimes.
5
5
  * The result is positive if laterDate is after earlierDate, negative if before.
@@ -1,4 +1,4 @@
1
- import { Temporal } from './shared/temporal';
1
+ import { Temporal } from './shared/temporal.js';
2
2
  /**
3
3
  * Returns the number of nanoseconds between two datetimes.
4
4
  * The result is positive if laterDate is after earlierDate, negative if before.
@@ -1,37 +1,33 @@
1
1
  import type { Temporal } from "@js-temporal/polyfill";
2
- import type { DifferenceOptions } from "./shared/differenceOptions";
2
+ import type { DifferenceOptions } from "./shared/differenceOptions.js";
3
3
  /**
4
- * Returns the number of quarters (3-month blocks) between two datetimes.
4
+ * Returns the number of quarters (3-month blocks) between two datetimes or dates.
5
5
  * The result is positive if laterDate is after earlierDate, negative if before.
6
6
  *
7
- * This function uses calendar-aware calculation, which means it properly handles
8
- * months with different numbers of days (28, 29, 30, or 31).
7
+ * Uses calendar-aware, elapsed-time calculation (a quarter is three months).
8
+ * Instant inputs are converted to UTC; ZonedDateTime inputs keep their timezone.
9
+ * PlainDate inputs are compared directly — no timezone needed.
9
10
  *
10
- * Instant inputs are converted to UTC for calendar calculations.
11
- * For ZonedDateTime inputs, their timezone is preserved.
12
- *
13
- * @param laterDate - The later datetime (Instant or ZonedDateTime)
14
- * @param earlierDate - The earlier datetime (Instant or ZonedDateTime)
11
+ * @param laterDate - The later Instant or ZonedDateTime
12
+ * @param earlierDate - The earlier Instant or ZonedDateTime
15
13
  * @param options - Optional { fractional } to return the precise value
16
- * @returns The number of quarters between the dates, truncated toward zero (pass { fractional: true } for the precise value)
14
+ * @returns The number of quarters, truncated toward zero (pass { fractional: true } for the precise value)
17
15
  *
18
16
  * @example
19
17
  * ```ts
20
18
  * const later = Temporal.Instant.from('2025-07-20T12:00:00Z');
21
19
  * const earlier = Temporal.Instant.from('2025-01-20T12:00:00Z');
22
- *
23
20
  * differenceInQuarters(later, earlier); // 2
24
21
  * ```
25
22
  *
26
23
  * @example
27
24
  * ```ts
28
- * // Pass { fractional: true } for partial-unit precision
29
- * const later = Temporal.Instant.from('2025-03-20T12:00:00Z');
30
- * const earlier = Temporal.Instant.from('2025-01-20T12:00:00Z');
31
- *
32
- * differenceInQuarters(later, earlier); // 0
33
- * differenceInQuarters(later, earlier, { fractional: true }); // ~0.67
25
+ * // PlainDate comparison needs no timezone
26
+ * const later = Temporal.PlainDate.from('2025-07-20');
27
+ * const earlier = Temporal.PlainDate.from('2025-01-20');
28
+ * differenceInQuarters(later, earlier); // 2
34
29
  * ```
35
30
  */
36
31
  export declare function differenceInQuarters(laterDate: Temporal.Instant | Temporal.ZonedDateTime, earlierDate: Temporal.Instant | Temporal.ZonedDateTime, options?: DifferenceOptions): number;
32
+ export declare function differenceInQuarters(laterDate: Temporal.PlainDate, earlierDate: Temporal.PlainDate, options?: DifferenceOptions): number;
37
33
  //# sourceMappingURL=differenceInQuarters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"differenceInQuarters.d.ts","sourceRoot":"","sources":["../src/differenceInQuarters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EACpD,WAAW,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EACtD,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAIR"}
1
+ {"version":3,"file":"differenceInQuarters.d.ts","sourceRoot":"","sources":["../src/differenceInQuarters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EACpD,WAAW,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,EACtD,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAAC;AACV,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,QAAQ,CAAC,SAAS,EAC7B,WAAW,EAAE,QAAQ,CAAC,SAAS,EAC/B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  differenceInQuarters
3
- } from "./chunk-VUKOSQWW.js";
3
+ } from "./chunk-KPB5ENNM.js";
4
4
  import "./chunk-CIA46DWB.js";
5
5
  import "./chunk-NTMT5XGC.js";
6
6
  import "./chunk-R7ZCA6AQ.js";
@@ -1,5 +1,5 @@
1
- import { Temporal } from './shared/temporal';
2
- import type { DifferenceOptions } from './shared/differenceOptions';
1
+ import { Temporal } from './shared/temporal.js';
2
+ import type { DifferenceOptions } from './shared/differenceOptions.js';
3
3
  /**
4
4
  * Returns the number of seconds between two datetimes.
5
5
  * The result is positive if laterDate is after earlierDate, negative if before.
@@ -1,5 +1,5 @@
1
- import { Temporal } from './shared/temporal';
2
- import type { DifferenceOptions } from './shared/differenceOptions';
1
+ import { Temporal } from './shared/temporal.js';
2
+ import type { DifferenceOptions } from './shared/differenceOptions.js';
3
3
  /**
4
4
  * Returns the number of weeks between two datetimes.
5
5
  * The result is positive if laterDate is after earlierDate, negative if before.
@@ -1,5 +1,5 @@
1
- import { Temporal } from './shared/temporal';
2
- import type { DifferenceOptions } from './shared/differenceOptions';
1
+ import { Temporal } from './shared/temporal.js';
2
+ import type { DifferenceOptions } from './shared/differenceOptions.js';
3
3
  /**
4
4
  * Returns the number of years between two datetimes.
5
5
  * The result is positive if laterDate is after earlierDate, negative if before.
@@ -1,4 +1,4 @@
1
- import { Temporal } from './shared/temporal';
1
+ import { Temporal } from './shared/temporal.js';
2
2
  /**
3
3
  * Returns an array of ZonedDateTime objects for each calendar day within the interval.
4
4
  * Each element represents the start of day (midnight) in the timezone of the interval start.
@@ -1,4 +1,4 @@
1
- import { Temporal } from './shared/temporal';
1
+ import { Temporal } from './shared/temporal.js';
2
2
  /**
3
3
  * Returns an array of ZonedDateTime objects for each hour within the interval.
4
4
  * Each element represents the start of the hour (minute/second/etc. set to 0).
@@ -1,4 +1,4 @@
1
- import { Temporal } from './shared/temporal';
1
+ import { Temporal } from './shared/temporal.js';
2
2
  /**
3
3
  * Returns an array of ZonedDateTime objects for each minute within the interval.
4
4
  * Each element represents the start of the minute (seconds/etc. set to 0).
@@ -1,4 +1,4 @@
1
- import { Temporal } from './shared/temporal';
1
+ import { Temporal } from './shared/temporal.js';
2
2
  /**
3
3
  * Returns an array of ZonedDateTime objects for each month within the interval.
4
4
  * Each element represents the first moment of the month (day 1 at midnight).
@@ -1,47 +1,43 @@
1
- import { Temporal } from "./shared/temporal";
1
+ import { Temporal } from "./shared/temporal.js";
2
2
  /**
3
- * Returns an array of ZonedDateTime objects for each quarter within the interval.
4
- * Each element represents the first moment of the quarter (day 1 of the quarter's
5
- * starting month at midnight). The interval is inclusive of both start and end quarters.
3
+ * Returns an array with the start of each quarter within the interval, inclusive
4
+ * of both the start and end quarters.
6
5
  *
7
- * Quarters: Q1 = Jan–Mar, Q2 = Apr–Jun, Q3 = Jul–Sep, Q4 = Oct–Dec.
6
+ * Quarters: Q1 = Jan–Mar, Q2 = Apr–Jun, Q3 = Jul–Sep, Q4 = Oct–Dec. Each element
7
+ * is the first moment of the quarter (1st day of the quarter's starting month at
8
+ * midnight) for Instant/ZonedDateTime inputs, or the first day as a PlainDate for
9
+ * PlainDate inputs.
8
10
  *
9
- * For Instant inputs, UTC is used as the timezone.
10
- * For ZonedDateTime inputs, the timezone of the start date is preserved.
11
+ * For Instant inputs, UTC is used. For ZonedDateTime inputs, the timezone of the
12
+ * start date is preserved. PlainDate inputs need no timezone and return PlainDate[].
11
13
  *
12
- * @param interval - The interval with start and end datetimes
13
- * @returns Array of ZonedDateTime at start of each quarter in the interval
14
+ * @param interval - The interval with start and end
15
+ * @returns Array of ZonedDateTime (or PlainDate) at the start of each quarter
14
16
  *
15
17
  * @example
16
18
  * ```ts
17
19
  * const start = Temporal.ZonedDateTime.from('2025-02-15T10:00:00Z[UTC]');
18
20
  * const end = Temporal.ZonedDateTime.from('2025-11-20T14:00:00Z[UTC]');
19
- *
20
- * const quarters = eachQuarterOfInterval({ start, end });
21
- * // [
22
- * // 2025-01-01T00:00:00Z[UTC], // Q1
23
- * // 2025-04-01T00:00:00Z[UTC], // Q2
24
- * // 2025-07-01T00:00:00Z[UTC], // Q3
25
- * // 2025-10-01T00:00:00Z[UTC] // Q4
26
- * // ]
21
+ * eachQuarterOfInterval({ start, end });
22
+ * // [2025-01-01…, 2025-04-01…, 2025-07-01…, 2025-10-01…]
27
23
  * ```
28
24
  *
29
25
  * @example
30
26
  * ```ts
31
- * // Cross-year boundary
32
- * const start = Temporal.ZonedDateTime.from('2024-11-15T00:00:00Z[UTC]');
33
- * const end = Temporal.ZonedDateTime.from('2025-05-15T00:00:00Z[UTC]');
34
- *
35
- * const quarters = eachQuarterOfInterval({ start, end });
36
- * // [
37
- * // 2024-10-01T00:00:00Z[UTC], // Q4 2024
38
- * // 2025-01-01T00:00:00Z[UTC], // Q1 2025
39
- * // 2025-04-01T00:00:00Z[UTC] // Q2 2025
40
- * // ]
27
+ * // PlainDate interval returns PlainDate quarter starts (no timezone)
28
+ * eachQuarterOfInterval({
29
+ * start: Temporal.PlainDate.from('2025-02-15'),
30
+ * end: Temporal.PlainDate.from('2025-08-20'),
31
+ * });
32
+ * // [2025-01-01, 2025-04-01, 2025-07-01]
41
33
  * ```
42
34
  */
43
35
  export declare function eachQuarterOfInterval(interval: {
44
36
  start: Temporal.Instant | Temporal.ZonedDateTime;
45
37
  end: Temporal.Instant | Temporal.ZonedDateTime;
46
38
  }): Temporal.ZonedDateTime[];
39
+ export declare function eachQuarterOfInterval(interval: {
40
+ start: Temporal.PlainDate;
41
+ end: Temporal.PlainDate;
42
+ }): Temporal.PlainDate[];
47
43
  //# sourceMappingURL=eachQuarterOfInterval.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eachQuarterOfInterval.d.ts","sourceRoot":"","sources":["../src/eachQuarterOfInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE;IAC9C,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACjD,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CAChD,GAAG,QAAQ,CAAC,aAAa,EAAE,CAkC3B"}
1
+ {"version":3,"file":"eachQuarterOfInterval.d.ts","sourceRoot":"","sources":["../src/eachQuarterOfInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE;IAC9C,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACjD,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CAChD,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC;AAC7B,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE;IAC9C,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC1B,GAAG,EAAE,QAAQ,CAAC,SAAS,CAAC;CACzB,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  eachQuarterOfInterval
3
- } from "./chunk-6UBZ5YB3.js";
3
+ } from "./chunk-YRCFMGBH.js";
4
4
  import "./chunk-XS2HUADA.js";
5
5
  import "./chunk-NTMT5XGC.js";
6
6
  import "./chunk-R7ZCA6AQ.js";
@@ -1,4 +1,4 @@
1
- import { Temporal } from './shared/temporal';
1
+ import { Temporal } from './shared/temporal.js';
2
2
  /**
3
3
  * Returns an array of ZonedDateTime objects for each week within the interval.
4
4
  * Each element represents the first moment of the week (Monday at midnight).
@@ -1,4 +1,4 @@
1
- import { Temporal } from './shared/temporal';
1
+ import { Temporal } from './shared/temporal.js';
2
2
  /**
3
3
  * Returns an array of ZonedDateTime objects for each year within the interval.
4
4
  * Each element represents the first moment of the year (January 1st at midnight).
@@ -1,5 +1,5 @@
1
- import { Temporal } from './shared/temporal';
2
- import type { Timezone } from './types';
1
+ import { Temporal } from './shared/temporal.js';
2
+ import type { Timezone } from './types.js';
3
3
  /**
4
4
  * Returns a ZonedDateTime representing the last nanosecond of the day.
5
5
  *
package/dist/endOfDay.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  endOfDay
3
- } from "./chunk-7HUJC5M6.js";
4
- import "./chunk-AVGNRINZ.js";
3
+ } from "./chunk-S7L5KBI4.js";
5
4
  import "./chunk-ZOHYNJUD.js";
5
+ import "./chunk-AVGNRINZ.js";
6
6
  import "./chunk-L5AMAEWX.js";
7
7
  import "./chunk-NTMT5XGC.js";
8
8
  import "./chunk-R7ZCA6AQ.js";
@@ -1,7 +1,8 @@
1
- import { Temporal } from './shared/temporal';
2
- import type { Timezone } from './types';
1
+ import { Temporal } from './shared/temporal.js';
2
+ import type { Timezone } from './types.js';
3
3
  /**
4
- * Returns a ZonedDateTime representing the last moment of the month (last day at 23:59:59.999999999).
4
+ * Returns the last boundary of the month.
5
+ * PlainDate inputs stay in calendar space unless a timezone is provided.
5
6
  *
6
7
  * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime
7
8
  * @returns ZonedDateTime at the last day of the month at 23:59:59.999999999
@@ -24,12 +25,21 @@ import type { Timezone } from './types';
24
25
  *
25
26
  * @example
26
27
  * ```ts
27
- * // From PlainDate (requires timezone)
28
+ * // From PlainDate (stays a date)
29
+ * const date = Temporal.PlainDate.from('2025-02-15');
30
+ * const end = endOfMonth(date);
31
+ * // 2025-02-28
32
+ * ```
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // From PlainDate with a timezone (returns a ZonedDateTime)
28
37
  * const date = Temporal.PlainDate.from('2025-02-15');
29
38
  * const end = endOfMonth(date, 'America/New_York');
30
39
  * // 2025-02-28T23:59:59.999999999-05:00[America/New_York]
31
40
  * ```
32
41
  */
33
42
  export declare function endOfMonth(input: Temporal.Instant | Temporal.ZonedDateTime): Temporal.ZonedDateTime;
43
+ export declare function endOfMonth(input: Temporal.PlainDate): Temporal.PlainDate;
34
44
  export declare function endOfMonth(input: Temporal.PlainDate, timezone: Timezone): Temporal.ZonedDateTime;
35
45
  //# sourceMappingURL=endOfMonth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endOfMonth.d.ts","sourceRoot":"","sources":["../src/endOfMonth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
1
+ {"version":3,"file":"endOfMonth.d.ts","sourceRoot":"","sources":["../src/endOfMonth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAC1E,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  endOfMonth
3
- } from "./chunk-VCWP3CZE.js";
4
- import "./chunk-AVGNRINZ.js";
3
+ } from "./chunk-YNLBS34B.js";
5
4
  import "./chunk-ZOHYNJUD.js";
5
+ import "./chunk-AVGNRINZ.js";
6
6
  import "./chunk-L5AMAEWX.js";
7
7
  import "./chunk-NTMT5XGC.js";
8
8
  import "./chunk-R7ZCA6AQ.js";
@@ -1,5 +1,5 @@
1
- import { Temporal } from "./shared/temporal";
2
- import type { Timezone } from "./types";
1
+ import type { Temporal } from "@js-temporal/polyfill";
2
+ import type { Timezone } from "./types.js";
3
3
  /**
4
4
  * Returns a ZonedDateTime representing the last moment of the quarter
5
5
  * (last day of the quarter's ending month at 23:59:59.999999999).
@@ -34,5 +34,6 @@ import type { Timezone } from "./types";
34
34
  * ```
35
35
  */
36
36
  export declare function endOfQuarter(input: Temporal.Instant | Temporal.ZonedDateTime): Temporal.ZonedDateTime;
37
+ export declare function endOfQuarter(input: Temporal.PlainDate): Temporal.PlainDate;
37
38
  export declare function endOfQuarter(input: Temporal.PlainDate, timezone: Timezone): Temporal.ZonedDateTime;
38
39
  //# sourceMappingURL=endOfQuarter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endOfQuarter.d.ts","sourceRoot":"","sources":["../src/endOfQuarter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC"}
1
+ {"version":3,"file":"endOfQuarter.d.ts","sourceRoot":"","sources":["../src/endOfQuarter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAC5E,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  endOfQuarter
3
- } from "./chunk-SPK7C7RP.js";
3
+ } from "./chunk-OSBVYUOQ.js";
4
4
  import "./chunk-XS2HUADA.js";
5
- import "./chunk-AVGNRINZ.js";
6
5
  import "./chunk-ZOHYNJUD.js";
6
+ import "./chunk-AVGNRINZ.js";
7
7
  import "./chunk-L5AMAEWX.js";
8
8
  import "./chunk-NTMT5XGC.js";
9
9
  import "./chunk-R7ZCA6AQ.js";
@@ -1,8 +1,9 @@
1
1
  import type { Temporal } from '@js-temporal/polyfill';
2
- import type { Timezone } from './types';
2
+ import type { Timezone } from './types.js';
3
3
  /**
4
- * Returns a ZonedDateTime representing the last moment of the week (Sunday at 23:59:59.999999999).
4
+ * Returns the last boundary of the week (Sunday).
5
5
  * Uses ISO 8601 week definition: weeks end on Sunday.
6
+ * PlainDate inputs stay in calendar space unless a timezone is provided.
6
7
  *
7
8
  * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime
8
9
  * @returns ZonedDateTime at Sunday 23:59:59.999999999
@@ -25,12 +26,21 @@ import type { Timezone } from './types';
25
26
  *
26
27
  * @example
27
28
  * ```ts
28
- * // From PlainDate (requires timezone)
29
+ * // From PlainDate (stays a date)
30
+ * const date = Temporal.PlainDate.from('2025-01-22'); // Wednesday
31
+ * const end = endOfWeek(date);
32
+ * // 2025-01-26 (next Sunday)
33
+ * ```
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * // From PlainDate with a timezone (returns a ZonedDateTime)
29
38
  * const date = Temporal.PlainDate.from('2025-01-22'); // Wednesday
30
39
  * const end = endOfWeek(date, 'America/New_York');
31
40
  * // 2025-01-26T23:59:59.999999999-05:00[America/New_York] (next Sunday)
32
41
  * ```
33
42
  */
34
43
  export declare function endOfWeek(input: Temporal.Instant | Temporal.ZonedDateTime): Temporal.ZonedDateTime;
44
+ export declare function endOfWeek(input: Temporal.PlainDate): Temporal.PlainDate;
35
45
  export declare function endOfWeek(input: Temporal.PlainDate, timezone: Timezone): Temporal.ZonedDateTime;
36
46
  //# sourceMappingURL=endOfWeek.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endOfWeek.d.ts","sourceRoot":"","sources":["../src/endOfWeek.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
1
+ {"version":3,"file":"endOfWeek.d.ts","sourceRoot":"","sources":["../src/endOfWeek.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AACzE,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
package/dist/endOfWeek.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  endOfWeek
3
- } from "./chunk-PVOGE6ME.js";
3
+ } from "./chunk-MTDZG4HK.js";
4
4
  import "./chunk-AVGNRINZ.js";
5
5
  import "./chunk-L5AMAEWX.js";
6
6
  import "./chunk-NTMT5XGC.js";
@@ -1,7 +1,8 @@
1
- import { Temporal } from './shared/temporal';
2
- import type { Timezone } from './types';
1
+ import { Temporal } from './shared/temporal.js';
2
+ import type { Timezone } from './types.js';
3
3
  /**
4
- * Returns a ZonedDateTime representing the last moment of the year (last day at 23:59:59.999999999).
4
+ * Returns the last boundary of the year.
5
+ * PlainDate inputs stay in calendar space unless a timezone is provided.
5
6
  *
6
7
  * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime
7
8
  * @returns ZonedDateTime at the last day of the year at 23:59:59.999999999
@@ -24,12 +25,21 @@ import type { Timezone } from './types';
24
25
  *
25
26
  * @example
26
27
  * ```ts
27
- * // From PlainDate (requires timezone)
28
+ * // From PlainDate (stays a date)
29
+ * const date = Temporal.PlainDate.from('2025-06-15');
30
+ * const end = endOfYear(date);
31
+ * // 2025-12-31
32
+ * ```
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // From PlainDate with a timezone (returns a ZonedDateTime)
28
37
  * const date = Temporal.PlainDate.from('2025-06-15');
29
38
  * const end = endOfYear(date, 'America/New_York');
30
39
  * // 2025-12-31T23:59:59.999999999-05:00[America/New_York]
31
40
  * ```
32
41
  */
33
42
  export declare function endOfYear(input: Temporal.Instant | Temporal.ZonedDateTime): Temporal.ZonedDateTime;
43
+ export declare function endOfYear(input: Temporal.PlainDate): Temporal.PlainDate;
34
44
  export declare function endOfYear(input: Temporal.PlainDate, timezone: Timezone): Temporal.ZonedDateTime;
35
45
  //# sourceMappingURL=endOfYear.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endOfYear.d.ts","sourceRoot":"","sources":["../src/endOfYear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
1
+ {"version":3,"file":"endOfYear.d.ts","sourceRoot":"","sources":["../src/endOfYear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAC/C,QAAQ,CAAC,aAAa,CAAC;AAC1B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AACzE,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,CAAC,aAAa,CAAC"}
package/dist/endOfYear.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  endOfYear
3
- } from "./chunk-KN45BU3W.js";
4
- import "./chunk-AVGNRINZ.js";
3
+ } from "./chunk-7OEGJCW7.js";
5
4
  import "./chunk-ZOHYNJUD.js";
5
+ import "./chunk-AVGNRINZ.js";
6
6
  import "./chunk-L5AMAEWX.js";
7
7
  import "./chunk-NTMT5XGC.js";
8
8
  import "./chunk-R7ZCA6AQ.js";
package/dist/format.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Temporal } from '@js-temporal/polyfill';
2
- import type { Timezone } from './types';
2
+ import type { Timezone } from './types.js';
3
3
  export interface FormatOptions {
4
4
  locale?: string;
5
5
  timeZone?: Timezone;
@@ -1,4 +1,4 @@
1
- import { Temporal } from './shared/temporal';
1
+ import { Temporal } from './shared/temporal.js';
2
2
  export interface FormatPlainDateOptions {
3
3
  locale?: string;
4
4
  }
@@ -1,38 +1,21 @@
1
1
  import type { Temporal } from "@js-temporal/polyfill";
2
- import type { Timezone } from "./types";
3
2
  /**
4
- * Returns the quarter (1-4) that a datetime falls in.
3
+ * Returns the quarter (1-4) that a datetime or date falls in.
5
4
  *
6
5
  * Quarters: Q1 = Jan–Mar, Q2 = Apr–Jun, Q3 = Jul–Sep, Q4 = Oct–Dec.
7
6
  *
8
- * Instant inputs are interpreted in UTC. For ZonedDateTime inputs, their
9
- * timezone is used. For PlainDate inputs, a timezone is required for a
10
- * consistent input contract (the quarter itself is timezone-independent).
7
+ * A quarter is intrinsic to the calendar date, so no timezone is ever needed.
8
+ * `Instant` inputs are interpreted in UTC; `ZonedDateTime` inputs use their own
9
+ * timezone; `PlainDate` inputs use their calendar month directly.
11
10
  *
12
- * @param input - A Temporal.Instant (UTC) or Temporal.ZonedDateTime
11
+ * @param input - A Temporal.Instant (UTC), Temporal.ZonedDateTime, or Temporal.PlainDate
13
12
  * @returns The quarter number: 1, 2, 3, or 4
14
13
  *
15
14
  * @example
16
15
  * ```ts
17
- * // From Instant (always UTC)
18
- * const instant = Temporal.Instant.from('2025-05-15T12:00:00Z');
19
- * getQuarter(instant); // 2
20
- * ```
21
- *
22
- * @example
23
- * ```ts
24
- * // From ZonedDateTime (uses its timezone)
25
- * const zoned = Temporal.ZonedDateTime.from('2025-11-15T15:30:00-05:00[America/New_York]');
26
- * getQuarter(zoned); // 4
27
- * ```
28
- *
29
- * @example
30
- * ```ts
31
- * // From PlainDate (requires timezone)
32
- * const date = Temporal.PlainDate.from('2025-02-15');
33
- * getQuarter(date, 'America/New_York'); // 1
16
+ * getQuarter(Temporal.Instant.from('2025-05-15T12:00:00Z')); // 2
17
+ * getQuarter(Temporal.PlainDate.from('2025-11-15')); // 4
34
18
  * ```
35
19
  */
36
- export declare function getQuarter(input: Temporal.Instant | Temporal.ZonedDateTime): 1 | 2 | 3 | 4;
37
- export declare function getQuarter(input: Temporal.PlainDate, timezone: Timezone): 1 | 2 | 3 | 4;
20
+ export declare function getQuarter(input: Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDate): 1 | 2 | 3 | 4;
38
21
  //# sourceMappingURL=getQuarter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getQuarter.d.ts","sourceRoot":"","sources":["../src/getQuarter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5F,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"getQuarter.d.ts","sourceRoot":"","sources":["../src/getQuarter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,GAAG,QAAQ,CAAC,SAAS,GACpE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAGf"}
@@ -1,9 +1,7 @@
1
1
  import {
2
2
  getQuarter
3
- } from "./chunk-NOV3D7OM.js";
3
+ } from "./chunk-GR7322AQ.js";
4
4
  import "./chunk-XS2HUADA.js";
5
- import "./chunk-ZOHYNJUD.js";
6
- import "./chunk-L5AMAEWX.js";
7
5
  import "./chunk-NTMT5XGC.js";
8
6
  import "./chunk-R7ZCA6AQ.js";
9
7
  export {