react-day-picker 10.0.0-next.1 → 10.0.0-next.2

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 (359) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -5
  3. package/dist/cjs/locale.d.ts +0 -2
  4. package/dist/cjs/locale.js +2 -6
  5. package/dist/esm/locale.d.ts +0 -2
  6. package/dist/esm/locale.js +0 -2
  7. package/package.json +7 -104
  8. package/buddhist.d.ts +0 -1
  9. package/buddhist.js +0 -2
  10. package/dist/cjs/buddhist/index.d.ts +0 -26
  11. package/dist/cjs/buddhist/index.js +0 -48
  12. package/dist/cjs/buddhist/lib/format.d.ts +0 -3
  13. package/dist/cjs/buddhist/lib/format.js +0 -30
  14. package/dist/cjs/ethiopic/index.d.ts +0 -44
  15. package/dist/cjs/ethiopic/index.js +0 -77
  16. package/dist/cjs/ethiopic/lib/addMonths.d.ts +0 -9
  17. package/dist/cjs/ethiopic/lib/addMonths.js +0 -27
  18. package/dist/cjs/ethiopic/lib/addYears.d.ts +0 -9
  19. package/dist/cjs/ethiopic/lib/addYears.js +0 -26
  20. package/dist/cjs/ethiopic/lib/differenceInCalendarMonths.d.ts +0 -8
  21. package/dist/cjs/ethiopic/lib/differenceInCalendarMonths.js +0 -17
  22. package/dist/cjs/ethiopic/lib/eachMonthOfInterval.d.ts +0 -11
  23. package/dist/cjs/ethiopic/lib/eachMonthOfInterval.js +0 -30
  24. package/dist/cjs/ethiopic/lib/eachYearOfInterval.d.ts +0 -7
  25. package/dist/cjs/ethiopic/lib/eachYearOfInterval.js +0 -21
  26. package/dist/cjs/ethiopic/lib/endOfMonth.d.ts +0 -8
  27. package/dist/cjs/ethiopic/lib/endOfMonth.js +0 -17
  28. package/dist/cjs/ethiopic/lib/endOfWeek.d.ts +0 -9
  29. package/dist/cjs/ethiopic/lib/endOfWeek.js +0 -16
  30. package/dist/cjs/ethiopic/lib/endOfYear.d.ts +0 -7
  31. package/dist/cjs/ethiopic/lib/endOfYear.js +0 -15
  32. package/dist/cjs/ethiopic/lib/format.d.ts +0 -22
  33. package/dist/cjs/ethiopic/lib/format.js +0 -135
  34. package/dist/cjs/ethiopic/lib/formatNumber.d.ts +0 -19
  35. package/dist/cjs/ethiopic/lib/formatNumber.js +0 -32
  36. package/dist/cjs/ethiopic/lib/getMonth.d.ts +0 -7
  37. package/dist/cjs/ethiopic/lib/getMonth.js +0 -14
  38. package/dist/cjs/ethiopic/lib/getWeek.d.ts +0 -9
  39. package/dist/cjs/ethiopic/lib/getWeek.js +0 -44
  40. package/dist/cjs/ethiopic/lib/getYear.d.ts +0 -7
  41. package/dist/cjs/ethiopic/lib/getYear.js +0 -14
  42. package/dist/cjs/ethiopic/lib/index.d.ts +0 -22
  43. package/dist/cjs/ethiopic/lib/index.js +0 -38
  44. package/dist/cjs/ethiopic/lib/isSameMonth.d.ts +0 -8
  45. package/dist/cjs/ethiopic/lib/isSameMonth.js +0 -16
  46. package/dist/cjs/ethiopic/lib/isSameYear.d.ts +0 -8
  47. package/dist/cjs/ethiopic/lib/isSameYear.js +0 -16
  48. package/dist/cjs/ethiopic/lib/newDate.d.ts +0 -9
  49. package/dist/cjs/ethiopic/lib/newDate.js +0 -25
  50. package/dist/cjs/ethiopic/lib/setMonth.d.ts +0 -8
  51. package/dist/cjs/ethiopic/lib/setMonth.js +0 -17
  52. package/dist/cjs/ethiopic/lib/setYear.d.ts +0 -8
  53. package/dist/cjs/ethiopic/lib/setYear.js +0 -19
  54. package/dist/cjs/ethiopic/lib/startOfDay.d.ts +0 -7
  55. package/dist/cjs/ethiopic/lib/startOfDay.js +0 -14
  56. package/dist/cjs/ethiopic/lib/startOfMonth.d.ts +0 -7
  57. package/dist/cjs/ethiopic/lib/startOfMonth.js +0 -14
  58. package/dist/cjs/ethiopic/lib/startOfWeek.d.ts +0 -9
  59. package/dist/cjs/ethiopic/lib/startOfWeek.js +0 -15
  60. package/dist/cjs/ethiopic/lib/startOfYear.d.ts +0 -7
  61. package/dist/cjs/ethiopic/lib/startOfYear.js +0 -14
  62. package/dist/cjs/ethiopic/utils/EthiopicDate.d.ts +0 -17
  63. package/dist/cjs/ethiopic/utils/EthiopicDate.js +0 -2
  64. package/dist/cjs/ethiopic/utils/daysInMonth.d.ts +0 -13
  65. package/dist/cjs/ethiopic/utils/daysInMonth.js +0 -22
  66. package/dist/cjs/ethiopic/utils/index.d.ts +0 -6
  67. package/dist/cjs/ethiopic/utils/index.js +0 -22
  68. package/dist/cjs/ethiopic/utils/isEthiopicDateValid.d.ts +0 -2
  69. package/dist/cjs/ethiopic/utils/isEthiopicDateValid.js +0 -15
  70. package/dist/cjs/ethiopic/utils/isEthiopicLeapYear.d.ts +0 -7
  71. package/dist/cjs/ethiopic/utils/isEthiopicLeapYear.js +0 -12
  72. package/dist/cjs/ethiopic/utils/toEthiopicDate.d.ts +0 -17
  73. package/dist/cjs/ethiopic/utils/toEthiopicDate.js +0 -54
  74. package/dist/cjs/ethiopic/utils/toGeezNumerals.d.ts +0 -8
  75. package/dist/cjs/ethiopic/utils/toGeezNumerals.js +0 -51
  76. package/dist/cjs/ethiopic/utils/toGregorianDate.d.ts +0 -9
  77. package/dist/cjs/ethiopic/utils/toGregorianDate.js +0 -59
  78. package/dist/cjs/hebrew/index.d.ts +0 -26
  79. package/dist/cjs/hebrew/index.js +0 -76
  80. package/dist/cjs/hebrew/lib/addMonths.d.ts +0 -1
  81. package/dist/cjs/hebrew/lib/addMonths.js +0 -15
  82. package/dist/cjs/hebrew/lib/addYears.d.ts +0 -1
  83. package/dist/cjs/hebrew/lib/addYears.js +0 -12
  84. package/dist/cjs/hebrew/lib/differenceInCalendarMonths.d.ts +0 -1
  85. package/dist/cjs/hebrew/lib/differenceInCalendarMonths.js +0 -10
  86. package/dist/cjs/hebrew/lib/eachMonthOfInterval.d.ts +0 -2
  87. package/dist/cjs/hebrew/lib/eachMonthOfInterval.js +0 -23
  88. package/dist/cjs/hebrew/lib/eachYearOfInterval.d.ts +0 -2
  89. package/dist/cjs/hebrew/lib/eachYearOfInterval.js +0 -19
  90. package/dist/cjs/hebrew/lib/endOfMonth.d.ts +0 -1
  91. package/dist/cjs/hebrew/lib/endOfMonth.js +0 -10
  92. package/dist/cjs/hebrew/lib/endOfYear.d.ts +0 -1
  93. package/dist/cjs/hebrew/lib/endOfYear.js +0 -11
  94. package/dist/cjs/hebrew/lib/findMonthIndexByCode.d.ts +0 -1
  95. package/dist/cjs/hebrew/lib/findMonthIndexByCode.js +0 -13
  96. package/dist/cjs/hebrew/lib/format.d.ts +0 -3
  97. package/dist/cjs/hebrew/lib/format.js +0 -152
  98. package/dist/cjs/hebrew/lib/getMonth.d.ts +0 -1
  99. package/dist/cjs/hebrew/lib/getMonth.js +0 -7
  100. package/dist/cjs/hebrew/lib/getYear.d.ts +0 -1
  101. package/dist/cjs/hebrew/lib/getYear.js +0 -7
  102. package/dist/cjs/hebrew/lib/index.d.ts +0 -17
  103. package/dist/cjs/hebrew/lib/index.js +0 -33
  104. package/dist/cjs/hebrew/lib/isSameMonth.d.ts +0 -1
  105. package/dist/cjs/hebrew/lib/isSameMonth.js +0 -9
  106. package/dist/cjs/hebrew/lib/isSameYear.d.ts +0 -1
  107. package/dist/cjs/hebrew/lib/isSameYear.js +0 -7
  108. package/dist/cjs/hebrew/lib/newDate.d.ts +0 -1
  109. package/dist/cjs/hebrew/lib/newDate.js +0 -7
  110. package/dist/cjs/hebrew/lib/setMonth.d.ts +0 -1
  111. package/dist/cjs/hebrew/lib/setMonth.js +0 -12
  112. package/dist/cjs/hebrew/lib/setYear.d.ts +0 -1
  113. package/dist/cjs/hebrew/lib/setYear.js +0 -31
  114. package/dist/cjs/hebrew/lib/startOfMonth.d.ts +0 -1
  115. package/dist/cjs/hebrew/lib/startOfMonth.js +0 -8
  116. package/dist/cjs/hebrew/lib/startOfYear.d.ts +0 -1
  117. package/dist/cjs/hebrew/lib/startOfYear.js +0 -8
  118. package/dist/cjs/hebrew/utils/calendarMath.d.ts +0 -17
  119. package/dist/cjs/hebrew/utils/calendarMath.js +0 -139
  120. package/dist/cjs/hebrew/utils/constants.d.ts +0 -13
  121. package/dist/cjs/hebrew/utils/constants.js +0 -36
  122. package/dist/cjs/hebrew/utils/dateConversion.d.ts +0 -5
  123. package/dist/cjs/hebrew/utils/dateConversion.js +0 -74
  124. package/dist/cjs/hebrew/utils/serial.d.ts +0 -9
  125. package/dist/cjs/hebrew/utils/serial.js +0 -76
  126. package/dist/cjs/hijri/index.d.ts +0 -28
  127. package/dist/cjs/hijri/index.js +0 -92
  128. package/dist/cjs/hijri/lib/addMonths.d.ts +0 -1
  129. package/dist/cjs/hijri/lib/addMonths.js +0 -9
  130. package/dist/cjs/hijri/lib/addYears.d.ts +0 -1
  131. package/dist/cjs/hijri/lib/addYears.js +0 -9
  132. package/dist/cjs/hijri/lib/differenceInCalendarMonths.d.ts +0 -1
  133. package/dist/cjs/hijri/lib/differenceInCalendarMonths.js +0 -10
  134. package/dist/cjs/hijri/lib/eachMonthOfInterval.d.ts +0 -2
  135. package/dist/cjs/hijri/lib/eachMonthOfInterval.js +0 -29
  136. package/dist/cjs/hijri/lib/eachYearOfInterval.d.ts +0 -2
  137. package/dist/cjs/hijri/lib/eachYearOfInterval.js +0 -19
  138. package/dist/cjs/hijri/lib/endOfMonth.d.ts +0 -1
  139. package/dist/cjs/hijri/lib/endOfMonth.js +0 -14
  140. package/dist/cjs/hijri/lib/endOfYear.d.ts +0 -1
  141. package/dist/cjs/hijri/lib/endOfYear.js +0 -14
  142. package/dist/cjs/hijri/lib/fallbackLocaleData.d.ts +0 -5
  143. package/dist/cjs/hijri/lib/fallbackLocaleData.js +0 -111
  144. package/dist/cjs/hijri/lib/format.d.ts +0 -3
  145. package/dist/cjs/hijri/lib/format.js +0 -149
  146. package/dist/cjs/hijri/lib/getMonth.d.ts +0 -1
  147. package/dist/cjs/hijri/lib/getMonth.js +0 -7
  148. package/dist/cjs/hijri/lib/getYear.d.ts +0 -1
  149. package/dist/cjs/hijri/lib/getYear.js +0 -7
  150. package/dist/cjs/hijri/lib/index.d.ts +0 -17
  151. package/dist/cjs/hijri/lib/index.js +0 -33
  152. package/dist/cjs/hijri/lib/isSameMonth.d.ts +0 -1
  153. package/dist/cjs/hijri/lib/isSameMonth.js +0 -10
  154. package/dist/cjs/hijri/lib/isSameYear.d.ts +0 -1
  155. package/dist/cjs/hijri/lib/isSameYear.js +0 -9
  156. package/dist/cjs/hijri/lib/newDate.d.ts +0 -1
  157. package/dist/cjs/hijri/lib/newDate.js +0 -7
  158. package/dist/cjs/hijri/lib/setMonth.d.ts +0 -1
  159. package/dist/cjs/hijri/lib/setMonth.js +0 -27
  160. package/dist/cjs/hijri/lib/setYear.d.ts +0 -1
  161. package/dist/cjs/hijri/lib/setYear.js +0 -15
  162. package/dist/cjs/hijri/lib/startOfMonth.d.ts +0 -1
  163. package/dist/cjs/hijri/lib/startOfMonth.js +0 -12
  164. package/dist/cjs/hijri/lib/startOfYear.d.ts +0 -1
  165. package/dist/cjs/hijri/lib/startOfYear.js +0 -12
  166. package/dist/cjs/hijri/utils/conversion.d.ts +0 -5
  167. package/dist/cjs/hijri/utils/conversion.js +0 -40
  168. package/dist/cjs/hijri/utils/daysInMonth.d.ts +0 -1
  169. package/dist/cjs/hijri/utils/daysInMonth.js +0 -24
  170. package/dist/cjs/hijri/utils/range.d.ts +0 -21
  171. package/dist/cjs/hijri/utils/range.js +0 -104
  172. package/dist/cjs/hijri/utils/types.d.ts +0 -5
  173. package/dist/cjs/hijri/utils/types.js +0 -2
  174. package/dist/cjs/locale/en-US-jalali.d.ts +0 -6
  175. package/dist/cjs/locale/en-US-jalali.js +0 -74
  176. package/dist/cjs/locale/fa-IR-jalali.d.ts +0 -6
  177. package/dist/cjs/locale/fa-IR-jalali.js +0 -74
  178. package/dist/cjs/noonJalaliDateLib.d.ts +0 -9
  179. package/dist/cjs/noonJalaliDateLib.js +0 -113
  180. package/dist/cjs/persian.d.ts +0 -71
  181. package/dist/cjs/persian.js +0 -106
  182. package/dist/esm/buddhist/index.d.ts +0 -26
  183. package/dist/esm/buddhist/index.js +0 -40
  184. package/dist/esm/buddhist/lib/format.d.ts +0 -3
  185. package/dist/esm/buddhist/lib/format.js +0 -27
  186. package/dist/esm/ethiopic/index.d.ts +0 -44
  187. package/dist/esm/ethiopic/index.js +0 -34
  188. package/dist/esm/ethiopic/lib/addMonths.d.ts +0 -9
  189. package/dist/esm/ethiopic/lib/addMonths.js +0 -24
  190. package/dist/esm/ethiopic/lib/addYears.d.ts +0 -9
  191. package/dist/esm/ethiopic/lib/addYears.js +0 -23
  192. package/dist/esm/ethiopic/lib/differenceInCalendarMonths.d.ts +0 -8
  193. package/dist/esm/ethiopic/lib/differenceInCalendarMonths.js +0 -14
  194. package/dist/esm/ethiopic/lib/eachMonthOfInterval.d.ts +0 -11
  195. package/dist/esm/ethiopic/lib/eachMonthOfInterval.js +0 -27
  196. package/dist/esm/ethiopic/lib/eachYearOfInterval.d.ts +0 -7
  197. package/dist/esm/ethiopic/lib/eachYearOfInterval.js +0 -18
  198. package/dist/esm/ethiopic/lib/endOfMonth.d.ts +0 -8
  199. package/dist/esm/ethiopic/lib/endOfMonth.js +0 -14
  200. package/dist/esm/ethiopic/lib/endOfWeek.d.ts +0 -9
  201. package/dist/esm/ethiopic/lib/endOfWeek.js +0 -13
  202. package/dist/esm/ethiopic/lib/endOfYear.d.ts +0 -7
  203. package/dist/esm/ethiopic/lib/endOfYear.js +0 -12
  204. package/dist/esm/ethiopic/lib/format.d.ts +0 -22
  205. package/dist/esm/ethiopic/lib/format.js +0 -131
  206. package/dist/esm/ethiopic/lib/formatNumber.d.ts +0 -19
  207. package/dist/esm/ethiopic/lib/formatNumber.js +0 -29
  208. package/dist/esm/ethiopic/lib/getMonth.d.ts +0 -7
  209. package/dist/esm/ethiopic/lib/getMonth.js +0 -11
  210. package/dist/esm/ethiopic/lib/getWeek.d.ts +0 -9
  211. package/dist/esm/ethiopic/lib/getWeek.js +0 -41
  212. package/dist/esm/ethiopic/lib/getYear.d.ts +0 -7
  213. package/dist/esm/ethiopic/lib/getYear.js +0 -11
  214. package/dist/esm/ethiopic/lib/index.d.ts +0 -22
  215. package/dist/esm/ethiopic/lib/index.js +0 -22
  216. package/dist/esm/ethiopic/lib/isSameMonth.d.ts +0 -8
  217. package/dist/esm/ethiopic/lib/isSameMonth.js +0 -13
  218. package/dist/esm/ethiopic/lib/isSameYear.d.ts +0 -8
  219. package/dist/esm/ethiopic/lib/isSameYear.js +0 -13
  220. package/dist/esm/ethiopic/lib/newDate.d.ts +0 -9
  221. package/dist/esm/ethiopic/lib/newDate.js +0 -22
  222. package/dist/esm/ethiopic/lib/setMonth.d.ts +0 -8
  223. package/dist/esm/ethiopic/lib/setMonth.js +0 -14
  224. package/dist/esm/ethiopic/lib/setYear.d.ts +0 -8
  225. package/dist/esm/ethiopic/lib/setYear.js +0 -16
  226. package/dist/esm/ethiopic/lib/startOfDay.d.ts +0 -7
  227. package/dist/esm/ethiopic/lib/startOfDay.js +0 -11
  228. package/dist/esm/ethiopic/lib/startOfMonth.d.ts +0 -7
  229. package/dist/esm/ethiopic/lib/startOfMonth.js +0 -11
  230. package/dist/esm/ethiopic/lib/startOfWeek.d.ts +0 -9
  231. package/dist/esm/ethiopic/lib/startOfWeek.js +0 -12
  232. package/dist/esm/ethiopic/lib/startOfYear.d.ts +0 -7
  233. package/dist/esm/ethiopic/lib/startOfYear.js +0 -11
  234. package/dist/esm/ethiopic/utils/EthiopicDate.d.ts +0 -17
  235. package/dist/esm/ethiopic/utils/EthiopicDate.js +0 -1
  236. package/dist/esm/ethiopic/utils/daysInMonth.d.ts +0 -13
  237. package/dist/esm/ethiopic/utils/daysInMonth.js +0 -19
  238. package/dist/esm/ethiopic/utils/index.d.ts +0 -6
  239. package/dist/esm/ethiopic/utils/index.js +0 -6
  240. package/dist/esm/ethiopic/utils/isEthiopicDateValid.d.ts +0 -2
  241. package/dist/esm/ethiopic/utils/isEthiopicDateValid.js +0 -12
  242. package/dist/esm/ethiopic/utils/isEthiopicLeapYear.d.ts +0 -7
  243. package/dist/esm/ethiopic/utils/isEthiopicLeapYear.js +0 -9
  244. package/dist/esm/ethiopic/utils/toEthiopicDate.d.ts +0 -17
  245. package/dist/esm/ethiopic/utils/toEthiopicDate.js +0 -50
  246. package/dist/esm/ethiopic/utils/toGeezNumerals.d.ts +0 -8
  247. package/dist/esm/ethiopic/utils/toGeezNumerals.js +0 -48
  248. package/dist/esm/ethiopic/utils/toGregorianDate.d.ts +0 -9
  249. package/dist/esm/ethiopic/utils/toGregorianDate.js +0 -55
  250. package/dist/esm/hebrew/index.d.ts +0 -26
  251. package/dist/esm/hebrew/index.js +0 -33
  252. package/dist/esm/hebrew/lib/addMonths.d.ts +0 -1
  253. package/dist/esm/hebrew/lib/addMonths.js +0 -12
  254. package/dist/esm/hebrew/lib/addYears.d.ts +0 -1
  255. package/dist/esm/hebrew/lib/addYears.js +0 -9
  256. package/dist/esm/hebrew/lib/differenceInCalendarMonths.d.ts +0 -1
  257. package/dist/esm/hebrew/lib/differenceInCalendarMonths.js +0 -7
  258. package/dist/esm/hebrew/lib/eachMonthOfInterval.d.ts +0 -2
  259. package/dist/esm/hebrew/lib/eachMonthOfInterval.js +0 -20
  260. package/dist/esm/hebrew/lib/eachYearOfInterval.d.ts +0 -2
  261. package/dist/esm/hebrew/lib/eachYearOfInterval.js +0 -16
  262. package/dist/esm/hebrew/lib/endOfMonth.d.ts +0 -1
  263. package/dist/esm/hebrew/lib/endOfMonth.js +0 -7
  264. package/dist/esm/hebrew/lib/endOfYear.d.ts +0 -1
  265. package/dist/esm/hebrew/lib/endOfYear.js +0 -8
  266. package/dist/esm/hebrew/lib/findMonthIndexByCode.d.ts +0 -1
  267. package/dist/esm/hebrew/lib/findMonthIndexByCode.js +0 -10
  268. package/dist/esm/hebrew/lib/format.d.ts +0 -3
  269. package/dist/esm/hebrew/lib/format.js +0 -149
  270. package/dist/esm/hebrew/lib/getMonth.d.ts +0 -1
  271. package/dist/esm/hebrew/lib/getMonth.js +0 -4
  272. package/dist/esm/hebrew/lib/getYear.d.ts +0 -1
  273. package/dist/esm/hebrew/lib/getYear.js +0 -4
  274. package/dist/esm/hebrew/lib/index.d.ts +0 -17
  275. package/dist/esm/hebrew/lib/index.js +0 -17
  276. package/dist/esm/hebrew/lib/isSameMonth.d.ts +0 -1
  277. package/dist/esm/hebrew/lib/isSameMonth.js +0 -6
  278. package/dist/esm/hebrew/lib/isSameYear.d.ts +0 -1
  279. package/dist/esm/hebrew/lib/isSameYear.js +0 -4
  280. package/dist/esm/hebrew/lib/newDate.d.ts +0 -1
  281. package/dist/esm/hebrew/lib/newDate.js +0 -4
  282. package/dist/esm/hebrew/lib/setMonth.d.ts +0 -1
  283. package/dist/esm/hebrew/lib/setMonth.js +0 -9
  284. package/dist/esm/hebrew/lib/setYear.d.ts +0 -1
  285. package/dist/esm/hebrew/lib/setYear.js +0 -28
  286. package/dist/esm/hebrew/lib/startOfMonth.d.ts +0 -1
  287. package/dist/esm/hebrew/lib/startOfMonth.js +0 -5
  288. package/dist/esm/hebrew/lib/startOfYear.d.ts +0 -1
  289. package/dist/esm/hebrew/lib/startOfYear.js +0 -5
  290. package/dist/esm/hebrew/utils/calendarMath.d.ts +0 -17
  291. package/dist/esm/hebrew/utils/calendarMath.js +0 -130
  292. package/dist/esm/hebrew/utils/constants.d.ts +0 -13
  293. package/dist/esm/hebrew/utils/constants.js +0 -33
  294. package/dist/esm/hebrew/utils/dateConversion.d.ts +0 -5
  295. package/dist/esm/hebrew/utils/dateConversion.js +0 -70
  296. package/dist/esm/hebrew/utils/serial.d.ts +0 -9
  297. package/dist/esm/hebrew/utils/serial.js +0 -70
  298. package/dist/esm/hijri/index.d.ts +0 -28
  299. package/dist/esm/hijri/index.js +0 -49
  300. package/dist/esm/hijri/lib/addMonths.d.ts +0 -1
  301. package/dist/esm/hijri/lib/addMonths.js +0 -6
  302. package/dist/esm/hijri/lib/addYears.d.ts +0 -1
  303. package/dist/esm/hijri/lib/addYears.js +0 -6
  304. package/dist/esm/hijri/lib/differenceInCalendarMonths.d.ts +0 -1
  305. package/dist/esm/hijri/lib/differenceInCalendarMonths.js +0 -7
  306. package/dist/esm/hijri/lib/eachMonthOfInterval.d.ts +0 -2
  307. package/dist/esm/hijri/lib/eachMonthOfInterval.js +0 -26
  308. package/dist/esm/hijri/lib/eachYearOfInterval.d.ts +0 -2
  309. package/dist/esm/hijri/lib/eachYearOfInterval.js +0 -16
  310. package/dist/esm/hijri/lib/endOfMonth.d.ts +0 -1
  311. package/dist/esm/hijri/lib/endOfMonth.js +0 -11
  312. package/dist/esm/hijri/lib/endOfYear.d.ts +0 -1
  313. package/dist/esm/hijri/lib/endOfYear.js +0 -11
  314. package/dist/esm/hijri/lib/fallbackLocaleData.d.ts +0 -5
  315. package/dist/esm/hijri/lib/fallbackLocaleData.js +0 -105
  316. package/dist/esm/hijri/lib/format.d.ts +0 -3
  317. package/dist/esm/hijri/lib/format.js +0 -146
  318. package/dist/esm/hijri/lib/getMonth.d.ts +0 -1
  319. package/dist/esm/hijri/lib/getMonth.js +0 -4
  320. package/dist/esm/hijri/lib/getYear.d.ts +0 -1
  321. package/dist/esm/hijri/lib/getYear.js +0 -4
  322. package/dist/esm/hijri/lib/index.d.ts +0 -17
  323. package/dist/esm/hijri/lib/index.js +0 -17
  324. package/dist/esm/hijri/lib/isSameMonth.d.ts +0 -1
  325. package/dist/esm/hijri/lib/isSameMonth.js +0 -7
  326. package/dist/esm/hijri/lib/isSameYear.d.ts +0 -1
  327. package/dist/esm/hijri/lib/isSameYear.js +0 -6
  328. package/dist/esm/hijri/lib/newDate.d.ts +0 -1
  329. package/dist/esm/hijri/lib/newDate.js +0 -4
  330. package/dist/esm/hijri/lib/setMonth.d.ts +0 -1
  331. package/dist/esm/hijri/lib/setMonth.js +0 -24
  332. package/dist/esm/hijri/lib/setYear.d.ts +0 -1
  333. package/dist/esm/hijri/lib/setYear.js +0 -12
  334. package/dist/esm/hijri/lib/startOfMonth.d.ts +0 -1
  335. package/dist/esm/hijri/lib/startOfMonth.js +0 -9
  336. package/dist/esm/hijri/lib/startOfYear.d.ts +0 -1
  337. package/dist/esm/hijri/lib/startOfYear.js +0 -9
  338. package/dist/esm/hijri/utils/conversion.d.ts +0 -5
  339. package/dist/esm/hijri/utils/conversion.js +0 -36
  340. package/dist/esm/hijri/utils/daysInMonth.d.ts +0 -1
  341. package/dist/esm/hijri/utils/daysInMonth.js +0 -21
  342. package/dist/esm/hijri/utils/range.d.ts +0 -21
  343. package/dist/esm/hijri/utils/range.js +0 -96
  344. package/dist/esm/hijri/utils/types.d.ts +0 -5
  345. package/dist/esm/hijri/utils/types.js +0 -1
  346. package/dist/esm/locale/en-US-jalali.d.ts +0 -6
  347. package/dist/esm/locale/en-US-jalali.js +0 -38
  348. package/dist/esm/locale/fa-IR-jalali.d.ts +0 -6
  349. package/dist/esm/locale/fa-IR-jalali.js +0 -38
  350. package/dist/esm/noonJalaliDateLib.d.ts +0 -9
  351. package/dist/esm/noonJalaliDateLib.js +0 -110
  352. package/dist/esm/persian.d.ts +0 -71
  353. package/dist/esm/persian.js +0 -65
  354. package/hebrew.d.ts +0 -1
  355. package/hebrew.js +0 -2
  356. package/hijri.d.ts +0 -1
  357. package/hijri.js +0 -2
  358. package/persian.d.ts +0 -1
  359. package/persian.js +0 -2
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eachMonthOfInterval = eachMonthOfInterval;
4
- const index_js_1 = require("../utils/index.js");
5
- /**
6
- * Each month of an interval
7
- *
8
- * @param {Object} interval - The interval object
9
- * @param {Date} interval.start - The start date of the interval
10
- * @param {Date} interval.end - The end date of the interval
11
- * @returns {Date[]} An array of dates representing the start of each month in
12
- * the interval
13
- */
14
- function eachMonthOfInterval(interval) {
15
- const start = (0, index_js_1.toEthiopicDate)(new Date(interval.start));
16
- const end = (0, index_js_1.toEthiopicDate)(new Date(interval.end));
17
- const dates = [];
18
- let currentYear = start.year;
19
- let currentMonth = start.month;
20
- while (currentYear < end.year ||
21
- (currentYear === end.year && currentMonth <= end.month)) {
22
- dates.push((0, index_js_1.toGregorianDate)({ year: currentYear, month: currentMonth, day: 1 }));
23
- currentMonth++;
24
- if (currentMonth > 13) {
25
- currentMonth = 1;
26
- currentYear++;
27
- }
28
- }
29
- return dates;
30
- }
@@ -1,7 +0,0 @@
1
- import type { Interval } from "date-fns";
2
- /**
3
- * Returns the start of each Ethiopic year included in the given interval.
4
- *
5
- * @param interval The interval whose years should be returned.
6
- */
7
- export declare function eachYearOfInterval(interval: Interval): Date[];
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eachYearOfInterval = eachYearOfInterval;
4
- const index_js_1 = require("../utils/index.js");
5
- /**
6
- * Returns the start of each Ethiopic year included in the given interval.
7
- *
8
- * @param interval The interval whose years should be returned.
9
- */
10
- function eachYearOfInterval(interval) {
11
- const start = (0, index_js_1.toEthiopicDate)(new Date(interval.start));
12
- const end = (0, index_js_1.toEthiopicDate)(new Date(interval.end));
13
- if (end.year < start.year) {
14
- return [];
15
- }
16
- const years = [];
17
- for (let year = start.year; year <= end.year; year += 1) {
18
- years.push((0, index_js_1.toGregorianDate)({ year, month: 1, day: 1 }));
19
- }
20
- return years;
21
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Returns the last day of the Ethiopian month for the given date.
3
- *
4
- * @param date - The gregorian date to get the end of month for
5
- * @returns A new gregorian date representing the last day of the Ethiopian
6
- * month
7
- */
8
- export declare function endOfMonth(date: Date): Date;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.endOfMonth = endOfMonth;
4
- const daysInMonth_js_1 = require("../utils/daysInMonth.js");
5
- const index_js_1 = require("../utils/index.js");
6
- /**
7
- * Returns the last day of the Ethiopian month for the given date.
8
- *
9
- * @param date - The gregorian date to get the end of month for
10
- * @returns A new gregorian date representing the last day of the Ethiopian
11
- * month
12
- */
13
- function endOfMonth(date) {
14
- const { year, month } = (0, index_js_1.toEthiopicDate)(date);
15
- const day = (0, daysInMonth_js_1.daysInMonth)(month, year);
16
- return (0, index_js_1.toGregorianDate)({ year, month, day: day });
17
- }
@@ -1,9 +0,0 @@
1
- import { type EndOfWeekOptions } from "date-fns";
2
- /**
3
- * End of week
4
- *
5
- * @param {Date} date - The original date
6
- * @param {EndOfWeekOptions} [options] - The options object
7
- * @returns {Date} The end of the week
8
- */
9
- export declare function endOfWeek(date: Date, options?: EndOfWeekOptions): Date;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.endOfWeek = endOfWeek;
4
- const date_fns_1 = require("date-fns");
5
- /**
6
- * End of week
7
- *
8
- * @param {Date} date - The original date
9
- * @param {EndOfWeekOptions} [options] - The options object
10
- * @returns {Date} The end of the week
11
- */
12
- function endOfWeek(date, options) {
13
- const weekStartsOn = options?.weekStartsOn ?? 0; // Default to Monday (1)
14
- const endOfWeek = (0, date_fns_1.endOfWeek)(date, { weekStartsOn });
15
- return endOfWeek;
16
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * End of year
3
- *
4
- * @param {Date} date - The original date
5
- * @returns {Date} The end of the year
6
- */
7
- export declare function endOfYear(date: Date): Date;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.endOfYear = endOfYear;
4
- const index_js_1 = require("../utils/index.js");
5
- /**
6
- * End of year
7
- *
8
- * @param {Date} date - The original date
9
- * @returns {Date} The end of the year
10
- */
11
- function endOfYear(date) {
12
- const { year } = (0, index_js_1.toEthiopicDate)(date);
13
- const day = (0, index_js_1.isEthiopicLeapYear)(year) ? 6 : 5;
14
- return (0, index_js_1.toGregorianDate)({ year, month: 13, day });
15
- }
@@ -1,22 +0,0 @@
1
- import type { FormatOptions as DateFnsFormatOptions } from "date-fns";
2
- /** Options for formatting dates in the Ethiopian calendar */
3
- export type FormatOptions = DateFnsFormatOptions;
4
- /**
5
- * Format an Ethiopic calendar date using a subset of date-fns tokens.
6
- *
7
- * Behavior specifics for Ethiopic mode:
8
- *
9
- * - Weekday names ("cccc", "cccccc") come from `Intl.DateTimeFormat` using
10
- * `options.locale?.code` (default: `am-ET`). Narrow form is a single letter.
11
- * - Month names ("LLLL") are Amharic by default and switch to Latin
12
- * transliteration when the locale code starts with `en` or when
13
- * `options.numerals === 'latn'`.
14
- * - Time parts such as `hh:mm a` are delegated to `Intl.DateTimeFormat` with the
15
- * given locale.
16
- * - Digits are converted to Ethiopic (Geez) when `options.numerals === 'geez'`.
17
- */
18
- export declare function format(date: Date, formatStr: string, options?: DateFnsFormatOptions): string;
19
- export declare const ethMonths: string[];
20
- export declare const ethMonthsLatin: string[];
21
- export declare const shortDays: string[];
22
- export declare const longDays: string[];
@@ -1,135 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.longDays = exports.shortDays = exports.ethMonthsLatin = exports.ethMonths = void 0;
4
- exports.format = format;
5
- const index_js_1 = require("../utils/index.js");
6
- const formatNumber_js_1 = require("./formatNumber.js");
7
- function getEtDayName(day, short = true, localeCode = "am-ET") {
8
- try {
9
- const dtf = new Intl.DateTimeFormat(localeCode, {
10
- // Ethiopic calendar expects single-letter for "cccccc" -> use narrow
11
- weekday: short ? "narrow" : "long",
12
- });
13
- return dtf.format(day);
14
- }
15
- catch {
16
- const dayOfWeek = day.getDay();
17
- return short ? exports.shortDays[dayOfWeek] : exports.longDays[dayOfWeek];
18
- }
19
- }
20
- function getEtMonthName(m, latin = false) {
21
- if (m > 0 && m <= 13) {
22
- return latin ? exports.ethMonthsLatin[m - 1] : exports.ethMonths[m - 1];
23
- }
24
- return "";
25
- }
26
- function formatEthiopianDate(dateObj, formatStr, numerals, localeCode) {
27
- const etDate = dateObj ? (0, index_js_1.toEthiopicDate)(dateObj) : undefined;
28
- if (!etDate)
29
- return "";
30
- const useLatin = (localeCode?.startsWith("en") ?? false) || numerals === "latn";
31
- const yearTokenMatch = formatStr.match(/^(\s*)(y+)(\s*)$/);
32
- if (yearTokenMatch) {
33
- const [, leading = "", yearToken, trailing = ""] = yearTokenMatch;
34
- const year = etDate.year.toString();
35
- let formattedYear;
36
- if (yearToken.length === 1) {
37
- formattedYear = year;
38
- }
39
- else if (yearToken.length === 2) {
40
- formattedYear = year.slice(-2).padStart(2, "0");
41
- }
42
- else {
43
- formattedYear = year.padStart(yearToken.length, "0");
44
- }
45
- return `${leading}${formattedYear}${trailing}`;
46
- }
47
- switch (formatStr) {
48
- case "LLLL yyyy":
49
- case "LLLL y":
50
- return `${getEtMonthName(etDate.month, useLatin)} ${etDate.year}`;
51
- case "LLLL":
52
- return getEtMonthName(etDate.month, useLatin);
53
- case "yyyy-MM-dd":
54
- return `${etDate.year}-${etDate.month
55
- .toString()
56
- .padStart(2, "0")}-${etDate.day.toString().padStart(2, "0")}`;
57
- case "yyyy-MM":
58
- return `${etDate.year}-${etDate.month.toString().padStart(2, "0")}`;
59
- case "d":
60
- return etDate.day.toString();
61
- case "PPP":
62
- return ` ${getEtMonthName(etDate.month, useLatin)} ${etDate.day}, ${etDate.year}`;
63
- case "PPPP":
64
- if (!dateObj)
65
- return "";
66
- return `${getEtDayName(dateObj, false, localeCode)}, ${getEtMonthName(etDate.month, useLatin)} ${etDate.day}, ${etDate.year}`;
67
- case "cccc":
68
- return dateObj ? getEtDayName(dateObj, false, localeCode) : "";
69
- case "cccccc":
70
- return dateObj ? getEtDayName(dateObj, true, localeCode) : "";
71
- default:
72
- return `${etDate.day}/${etDate.month}/${etDate.year}`;
73
- }
74
- }
75
- /**
76
- * Format an Ethiopic calendar date using a subset of date-fns tokens.
77
- *
78
- * Behavior specifics for Ethiopic mode:
79
- *
80
- * - Weekday names ("cccc", "cccccc") come from `Intl.DateTimeFormat` using
81
- * `options.locale?.code` (default: `am-ET`). Narrow form is a single letter.
82
- * - Month names ("LLLL") are Amharic by default and switch to Latin
83
- * transliteration when the locale code starts with `en` or when
84
- * `options.numerals === 'latn'`.
85
- * - Time parts such as `hh:mm a` are delegated to `Intl.DateTimeFormat` with the
86
- * given locale.
87
- * - Digits are converted to Ethiopic (Geez) when `options.numerals === 'geez'`.
88
- */
89
- function format(date, formatStr, options) {
90
- const extendedOptions = options;
91
- if (formatStr.includes("hh:mm") || formatStr.includes("a")) {
92
- return new Intl.DateTimeFormat(extendedOptions?.locale?.code ?? "en-US", {
93
- hour: "numeric",
94
- minute: "numeric",
95
- hour12: formatStr.includes("a"),
96
- }).format(date);
97
- }
98
- const formatted = formatEthiopianDate(date, formatStr, extendedOptions?.numerals, extendedOptions?.locale?.code ?? "am-ET");
99
- if (extendedOptions?.numerals && extendedOptions.numerals === "geez") {
100
- return formatted.replace(/\d+/g, (match) => (0, formatNumber_js_1.formatNumber)(parseInt(match, 10), "geez"));
101
- }
102
- return formatted;
103
- }
104
- exports.ethMonths = [
105
- "መስከረም",
106
- "ጥቅምት",
107
- "ህዳር",
108
- "ታህሳስ",
109
- "ጥር",
110
- "የካቲት",
111
- "መጋቢት",
112
- "ሚያዚያ",
113
- "ግንቦት",
114
- "ሰኔ",
115
- "ሐምሌ",
116
- "ነሀሴ",
117
- "ጳጉሜ",
118
- ];
119
- exports.ethMonthsLatin = [
120
- "Meskerem",
121
- "Tikimt",
122
- "Hidar",
123
- "Tahsas",
124
- "Tir",
125
- "Yekatit",
126
- "Megabit",
127
- "Miyazya",
128
- "Ginbot",
129
- "Sene",
130
- "Hamle",
131
- "Nehase",
132
- "Pagumen",
133
- ];
134
- exports.shortDays = ["እ", "ሰ", "ማ", "ረ", "ሐ", "ዓ", "ቅ"];
135
- exports.longDays = ["እሁድ", "ሰኞ", "ማክሰኞ", "ረቡዕ", "ሐሙስ", "ዓርብ", "ቅዳሜ"];
@@ -1,19 +0,0 @@
1
- /**
2
- * Formats a number using either Latin or Ethiopic (Geez) numerals
3
- *
4
- * @example
5
- * ```ts
6
- * formatNumber(123) // '123'
7
- * formatNumber(123, 'geez') // '፻፳፫'
8
- * formatNumber(2023, 'geez') // '፳፻፳፫'
9
- * ```;
10
- *
11
- * @param value - The number to format
12
- * @param numerals - The numeral system to use:
13
- *
14
- * - 'latn': Latin numerals (1, 2, 3...)
15
- * - 'geez': Ethiopic numerals (፩, ፪, ፫...)
16
- *
17
- * @returns The formatted number string
18
- */
19
- export declare function formatNumber(value: number, numerals?: string): string;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatNumber = formatNumber;
4
- const toGeezNumerals_js_1 = require("../utils/toGeezNumerals.js");
5
- /**
6
- * Formats a number using either Latin or Ethiopic (Geez) numerals
7
- *
8
- * @example
9
- * ```ts
10
- * formatNumber(123) // '123'
11
- * formatNumber(123, 'geez') // '፻፳፫'
12
- * formatNumber(2023, 'geez') // '፳፻፳፫'
13
- * ```;
14
- *
15
- * @param value - The number to format
16
- * @param numerals - The numeral system to use:
17
- *
18
- * - 'latn': Latin numerals (1, 2, 3...)
19
- * - 'geez': Ethiopic numerals (፩, ፪, ፫...)
20
- *
21
- * @returns The formatted number string
22
- */
23
- function formatNumber(value, numerals = "latn") {
24
- if (numerals === "geez") {
25
- return (0, toGeezNumerals_js_1.toGeezNumerals)(value);
26
- }
27
- // Use Intl.NumberFormat for other numeral systems
28
- const formatter = new Intl.NumberFormat("en-US", {
29
- numberingSystem: numerals,
30
- });
31
- return formatter.format(value);
32
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * Get month
3
- *
4
- * @param {Date} date - The original date
5
- * @returns {number} The zero-based month index
6
- */
7
- export declare function getMonth(date: Date): number;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMonth = getMonth;
4
- const index_js_1 = require("../utils/index.js");
5
- /**
6
- * Get month
7
- *
8
- * @param {Date} date - The original date
9
- * @returns {number} The zero-based month index
10
- */
11
- function getMonth(date) {
12
- const { month } = (0, index_js_1.toEthiopicDate)(date);
13
- return month - 1; // Return zero-based month index
14
- }
@@ -1,9 +0,0 @@
1
- import { type GetWeekOptions } from "date-fns";
2
- /**
3
- * Get week number for Ethiopian calendar
4
- *
5
- * @param {Date} date - The original date
6
- * @param {GetWeekOptions} [options] - The options object
7
- * @returns {number} The week number
8
- */
9
- export declare function getWeek(date: Date, options?: GetWeekOptions): number;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getWeek = getWeek;
4
- const date_fns_1 = require("date-fns");
5
- const index_js_1 = require("../utils/index.js");
6
- const startOfWeek_js_1 = require("./startOfWeek.js");
7
- /**
8
- * Get week number for Ethiopian calendar
9
- *
10
- * @param {Date} date - The original date
11
- * @param {GetWeekOptions} [options] - The options object
12
- * @returns {number} The week number
13
- */
14
- function getWeek(date, options) {
15
- const weekStartsOn = options?.weekStartsOn ?? 1; // Default to Monday (1)
16
- const etDate = (0, index_js_1.toEthiopicDate)(date);
17
- const currentWeekStart = (0, startOfWeek_js_1.startOfWeek)(date, { weekStartsOn });
18
- // Get the first day of the current year
19
- const firstDayOfYear = (0, index_js_1.toGregorianDate)({
20
- year: etDate.year,
21
- month: 1,
22
- day: 1,
23
- });
24
- const firstWeekStart = (0, startOfWeek_js_1.startOfWeek)(firstDayOfYear, { weekStartsOn });
25
- // If date is before the first week of its year
26
- if (date < firstWeekStart) {
27
- return (0, date_fns_1.getWeek)(date, { weekStartsOn, firstWeekContainsDate: 1 });
28
- }
29
- // If date falls into the first week of the NEXT Ethiopic year, return 1
30
- const nextYearFirstDay = (0, index_js_1.toGregorianDate)({
31
- year: etDate.year + 1,
32
- month: 1,
33
- day: 1,
34
- });
35
- const nextYearFirstWeekStart = (0, startOfWeek_js_1.startOfWeek)(nextYearFirstDay, {
36
- weekStartsOn,
37
- });
38
- if (date >= nextYearFirstWeekStart) {
39
- return 1;
40
- }
41
- // Calculate week number based on days since first week
42
- const daysSinceFirstWeek = (0, date_fns_1.differenceInDays)(currentWeekStart, firstWeekStart);
43
- return Math.floor(daysSinceFirstWeek / 7) + 1;
44
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * Get year
3
- *
4
- * @param {Date} date - The original date
5
- * @returns {number} The year
6
- */
7
- export declare function getYear(date: Date): number;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getYear = getYear;
4
- const index_js_1 = require("../utils/index.js");
5
- /**
6
- * Get year
7
- *
8
- * @param {Date} date - The original date
9
- * @returns {number} The year
10
- */
11
- function getYear(date) {
12
- const { year } = (0, index_js_1.toEthiopicDate)(date);
13
- return year;
14
- }
@@ -1,22 +0,0 @@
1
- export * from "./addMonths.js";
2
- export * from "./addYears.js";
3
- export * from "./differenceInCalendarMonths.js";
4
- export * from "./eachMonthOfInterval.js";
5
- export * from "./eachYearOfInterval.js";
6
- export * from "./endOfMonth.js";
7
- export * from "./endOfWeek.js";
8
- export * from "./endOfYear.js";
9
- export * from "./format.js";
10
- export * from "./formatNumber.js";
11
- export * from "./getMonth.js";
12
- export * from "./getWeek.js";
13
- export * from "./getYear.js";
14
- export * from "./isSameMonth.js";
15
- export * from "./isSameYear.js";
16
- export * from "./newDate.js";
17
- export * from "./setMonth.js";
18
- export * from "./setYear.js";
19
- export * from "./startOfDay.js";
20
- export * from "./startOfMonth.js";
21
- export * from "./startOfWeek.js";
22
- export * from "./startOfYear.js";
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./addMonths.js"), exports);
18
- __exportStar(require("./addYears.js"), exports);
19
- __exportStar(require("./differenceInCalendarMonths.js"), exports);
20
- __exportStar(require("./eachMonthOfInterval.js"), exports);
21
- __exportStar(require("./eachYearOfInterval.js"), exports);
22
- __exportStar(require("./endOfMonth.js"), exports);
23
- __exportStar(require("./endOfWeek.js"), exports);
24
- __exportStar(require("./endOfYear.js"), exports);
25
- __exportStar(require("./format.js"), exports);
26
- __exportStar(require("./formatNumber.js"), exports);
27
- __exportStar(require("./getMonth.js"), exports);
28
- __exportStar(require("./getWeek.js"), exports);
29
- __exportStar(require("./getYear.js"), exports);
30
- __exportStar(require("./isSameMonth.js"), exports);
31
- __exportStar(require("./isSameYear.js"), exports);
32
- __exportStar(require("./newDate.js"), exports);
33
- __exportStar(require("./setMonth.js"), exports);
34
- __exportStar(require("./setYear.js"), exports);
35
- __exportStar(require("./startOfDay.js"), exports);
36
- __exportStar(require("./startOfMonth.js"), exports);
37
- __exportStar(require("./startOfWeek.js"), exports);
38
- __exportStar(require("./startOfYear.js"), exports);
@@ -1,8 +0,0 @@
1
- /**
2
- * Is same month
3
- *
4
- * @param {Date} dateLeft - The first date
5
- * @param {Date} dateRight - The second date
6
- * @returns {boolean} True if the two dates are in the same month
7
- */
8
- export declare function isSameMonth(dateLeft: Date, dateRight: Date): boolean;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSameMonth = isSameMonth;
4
- const index_js_1 = require("../utils/index.js");
5
- /**
6
- * Is same month
7
- *
8
- * @param {Date} dateLeft - The first date
9
- * @param {Date} dateRight - The second date
10
- * @returns {boolean} True if the two dates are in the same month
11
- */
12
- function isSameMonth(dateLeft, dateRight) {
13
- const left = (0, index_js_1.toEthiopicDate)(dateLeft);
14
- const right = (0, index_js_1.toEthiopicDate)(dateRight);
15
- return left.year === right.year && left.month === right.month;
16
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Checks if two dates fall in the same Ethiopian year.
3
- *
4
- * @param dateLeft - The first gregorian date to compare
5
- * @param dateRight - The second gregorian date to compare
6
- * @returns True if the dates are in the same Ethiopian year
7
- */
8
- export declare function isSameYear(dateLeft: Date, dateRight: Date): boolean;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSameYear = isSameYear;
4
- const index_js_1 = require("../utils/index.js");
5
- /**
6
- * Checks if two dates fall in the same Ethiopian year.
7
- *
8
- * @param dateLeft - The first gregorian date to compare
9
- * @param dateRight - The second gregorian date to compare
10
- * @returns True if the dates are in the same Ethiopian year
11
- */
12
- function isSameYear(dateLeft, dateRight) {
13
- const left = (0, index_js_1.toEthiopicDate)(dateLeft);
14
- const right = (0, index_js_1.toEthiopicDate)(dateRight);
15
- return left.year === right.year;
16
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Creates a new Ethiopic date
3
- *
4
- * @param {number} year - The year of the Ethiopic date
5
- * @param {number} monthIndex - The zero-based month index of the Ethiopic date
6
- * @param {number} date - The day of the month of the Ethiopic date
7
- * @returns {Date} The corresponding Gregorian date
8
- */
9
- export declare function newDate(year: number, monthIndex: number, date: number): Date;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newDate = newDate;
4
- const index_js_1 = require("../utils/index.js");
5
- const isEthiopicDateValid_js_1 = require("../utils/isEthiopicDateValid.js");
6
- /**
7
- * Creates a new Ethiopic date
8
- *
9
- * @param {number} year - The year of the Ethiopic date
10
- * @param {number} monthIndex - The zero-based month index of the Ethiopic date
11
- * @param {number} date - The day of the month of the Ethiopic date
12
- * @returns {Date} The corresponding Gregorian date
13
- */
14
- function newDate(year, monthIndex, date) {
15
- // Convert from 0-based month index to 1-based Ethiopic month
16
- const month = monthIndex + 1;
17
- if (!(0, isEthiopicDateValid_js_1.isEthiopicDateValid)({ year, month, day: date })) {
18
- throw new Error("Invalid Ethiopic date");
19
- }
20
- return (0, index_js_1.toGregorianDate)({
21
- year: year,
22
- month: month,
23
- day: date,
24
- });
25
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Set month
3
- *
4
- * @param {Date} date - The original date
5
- * @param {number} month - The zero-based month index
6
- * @returns {Date} The new date with the month set
7
- */
8
- export declare function setMonth(date: Date, month: number): Date;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setMonth = setMonth;
4
- const index_js_1 = require("../utils/index.js");
5
- /**
6
- * Set month
7
- *
8
- * @param {Date} date - The original date
9
- * @param {number} month - The zero-based month index
10
- * @returns {Date} The new date with the month set
11
- */
12
- function setMonth(date, month) {
13
- const { year, day } = (0, index_js_1.toEthiopicDate)(date);
14
- const targetMonth = month + 1; // Convert from zero-based index
15
- const safeDay = Math.min(day, (0, index_js_1.daysInMonth)(targetMonth, year));
16
- return (0, index_js_1.toGregorianDate)({ year, month: targetMonth, day: safeDay });
17
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Set year
3
- *
4
- * @param {Date} date - The original date
5
- * @param {number} year - The year to set
6
- * @returns {Date} The new date with the year set
7
- */
8
- export declare function setYear(date: Date, year: number): Date;