date-and-time 3.5.0 → 4.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 (1134) hide show
  1. package/LICENSE +0 -1
  2. package/README.md +1120 -435
  3. package/dist/index.cjs +2 -0
  4. package/dist/index.d.ts +440 -0
  5. package/dist/index.js +2 -0
  6. package/dist/locales/ar.cjs +1 -0
  7. package/dist/locales/ar.js +1 -0
  8. package/dist/locales/az.cjs +1 -0
  9. package/dist/locales/az.js +1 -0
  10. package/dist/locales/bn.cjs +1 -0
  11. package/dist/locales/bn.js +1 -0
  12. package/dist/locales/cs.cjs +1 -0
  13. package/dist/locales/cs.js +1 -0
  14. package/dist/locales/da.cjs +1 -0
  15. package/dist/locales/da.js +1 -0
  16. package/dist/locales/de.cjs +1 -0
  17. package/dist/locales/de.js +1 -0
  18. package/dist/locales/el.cjs +1 -0
  19. package/dist/locales/el.js +1 -0
  20. package/dist/locales/en.cjs +1 -0
  21. package/dist/locales/en.js +1 -0
  22. package/dist/locales/es.cjs +1 -0
  23. package/dist/locales/es.js +1 -0
  24. package/dist/locales/fa.cjs +1 -0
  25. package/dist/locales/fa.js +1 -0
  26. package/dist/locales/fi.cjs +1 -0
  27. package/dist/locales/fi.js +1 -0
  28. package/dist/locales/fr.cjs +1 -0
  29. package/dist/locales/fr.js +1 -0
  30. package/dist/locales/he.cjs +1 -0
  31. package/dist/locales/he.js +1 -0
  32. package/dist/locales/hi.cjs +1 -0
  33. package/dist/locales/hi.js +1 -0
  34. package/dist/locales/hu.cjs +1 -0
  35. package/dist/locales/hu.js +1 -0
  36. package/dist/locales/id.cjs +1 -0
  37. package/dist/locales/id.js +1 -0
  38. package/dist/locales/it.cjs +1 -0
  39. package/dist/locales/it.js +1 -0
  40. package/dist/locales/ja.cjs +1 -0
  41. package/dist/locales/ja.js +1 -0
  42. package/dist/locales/ko.cjs +1 -0
  43. package/dist/locales/ko.js +1 -0
  44. package/dist/locales/ms.cjs +1 -0
  45. package/dist/locales/ms.js +1 -0
  46. package/dist/locales/my.cjs +1 -0
  47. package/dist/locales/my.js +1 -0
  48. package/dist/locales/nl.cjs +1 -0
  49. package/dist/locales/nl.js +1 -0
  50. package/dist/locales/no.cjs +1 -0
  51. package/dist/locales/no.js +1 -0
  52. package/dist/locales/pl.cjs +1 -0
  53. package/dist/locales/pl.js +1 -0
  54. package/dist/locales/pt-BR.cjs +1 -0
  55. package/dist/locales/pt-BR.js +1 -0
  56. package/dist/locales/pt-PT.cjs +1 -0
  57. package/dist/locales/pt-PT.js +1 -0
  58. package/dist/locales/ro.cjs +1 -0
  59. package/dist/locales/ro.js +1 -0
  60. package/dist/locales/ru.cjs +1 -0
  61. package/dist/locales/ru.js +1 -0
  62. package/dist/locales/rw.cjs +1 -0
  63. package/dist/locales/rw.js +1 -0
  64. package/dist/locales/sr-Cyrl.cjs +1 -0
  65. package/dist/locales/sr-Cyrl.js +1 -0
  66. package/dist/locales/sr-Latn.cjs +1 -0
  67. package/dist/locales/sr-Latn.js +1 -0
  68. package/dist/locales/sv.cjs +1 -0
  69. package/dist/locales/sv.js +1 -0
  70. package/dist/locales/ta.cjs +1 -0
  71. package/dist/locales/ta.js +1 -0
  72. package/dist/locales/th.cjs +1 -0
  73. package/dist/locales/th.js +1 -0
  74. package/dist/locales/tr.cjs +1 -0
  75. package/dist/locales/tr.js +1 -0
  76. package/dist/locales/uk.cjs +1 -0
  77. package/dist/locales/uk.js +1 -0
  78. package/dist/locales/uz-Cyrl.cjs +1 -0
  79. package/dist/locales/uz-Cyrl.js +1 -0
  80. package/dist/locales/uz-Latn.cjs +1 -0
  81. package/dist/locales/uz-Latn.js +1 -0
  82. package/dist/locales/vi.cjs +1 -0
  83. package/dist/locales/vi.js +1 -0
  84. package/dist/locales/zh-Hans.cjs +1 -0
  85. package/dist/locales/zh-Hans.js +1 -0
  86. package/dist/locales/zh-Hant.cjs +1 -0
  87. package/dist/locales/zh-Hant.js +1 -0
  88. package/dist/numerals/arab.cjs +1 -0
  89. package/dist/numerals/arab.js +1 -0
  90. package/dist/numerals/arabext.cjs +1 -0
  91. package/dist/numerals/arabext.js +1 -0
  92. package/dist/numerals/beng.cjs +1 -0
  93. package/dist/numerals/beng.js +1 -0
  94. package/dist/numerals/latn.cjs +1 -0
  95. package/dist/numerals/latn.js +1 -0
  96. package/dist/numerals/mymr.cjs +1 -0
  97. package/dist/numerals/mymr.js +1 -0
  98. package/dist/plugin.cjs +1 -0
  99. package/dist/plugin.d.ts +180 -0
  100. package/dist/plugin.js +1 -0
  101. package/dist/plugins/day-of-week.cjs +1 -0
  102. package/dist/plugins/day-of-week.d.ts +84 -0
  103. package/dist/plugins/day-of-week.js +1 -0
  104. package/dist/plugins/microsecond.cjs +1 -0
  105. package/dist/plugins/microsecond.d.ts +111 -0
  106. package/dist/plugins/microsecond.js +1 -0
  107. package/dist/plugins/nanosecond.cjs +1 -0
  108. package/dist/plugins/nanosecond.d.ts +111 -0
  109. package/dist/plugins/nanosecond.js +1 -0
  110. package/dist/plugins/ordinal.cjs +1 -0
  111. package/dist/plugins/ordinal.d.ts +172 -0
  112. package/dist/plugins/ordinal.js +1 -0
  113. package/dist/plugins/two-digit-year.cjs +1 -0
  114. package/dist/plugins/two-digit-year.d.ts +86 -0
  115. package/dist/plugins/two-digit-year.js +1 -0
  116. package/dist/plugins/zonename.cjs +1 -0
  117. package/dist/plugins/zonename.d.ts +114 -0
  118. package/dist/plugins/zonename.js +1 -0
  119. package/dist/timezones/Africa/Abidjan.cjs +1 -0
  120. package/dist/timezones/Africa/Abidjan.js +1 -0
  121. package/dist/timezones/Africa/Accra.cjs +1 -0
  122. package/dist/timezones/Africa/Accra.js +1 -0
  123. package/dist/timezones/Africa/Addis_Ababa.cjs +1 -0
  124. package/dist/timezones/Africa/Addis_Ababa.js +1 -0
  125. package/dist/timezones/Africa/Algiers.cjs +1 -0
  126. package/dist/timezones/Africa/Algiers.js +1 -0
  127. package/dist/timezones/Africa/Asmara.cjs +1 -0
  128. package/dist/timezones/Africa/Asmara.js +1 -0
  129. package/dist/timezones/Africa/Bamako.cjs +1 -0
  130. package/dist/timezones/Africa/Bamako.js +1 -0
  131. package/dist/timezones/Africa/Bangui.cjs +1 -0
  132. package/dist/timezones/Africa/Bangui.js +1 -0
  133. package/dist/timezones/Africa/Banjul.cjs +1 -0
  134. package/dist/timezones/Africa/Banjul.js +1 -0
  135. package/dist/timezones/Africa/Bissau.cjs +1 -0
  136. package/dist/timezones/Africa/Bissau.js +1 -0
  137. package/dist/timezones/Africa/Blantyre.cjs +1 -0
  138. package/dist/timezones/Africa/Blantyre.js +1 -0
  139. package/dist/timezones/Africa/Brazzaville.cjs +1 -0
  140. package/dist/timezones/Africa/Brazzaville.js +1 -0
  141. package/dist/timezones/Africa/Bujumbura.cjs +1 -0
  142. package/dist/timezones/Africa/Bujumbura.js +1 -0
  143. package/dist/timezones/Africa/Cairo.cjs +1 -0
  144. package/dist/timezones/Africa/Cairo.js +1 -0
  145. package/dist/timezones/Africa/Casablanca.cjs +1 -0
  146. package/dist/timezones/Africa/Casablanca.js +1 -0
  147. package/dist/timezones/Africa/Ceuta.cjs +1 -0
  148. package/dist/timezones/Africa/Ceuta.js +1 -0
  149. package/dist/timezones/Africa/Conakry.cjs +1 -0
  150. package/dist/timezones/Africa/Conakry.js +1 -0
  151. package/dist/timezones/Africa/Dakar.cjs +1 -0
  152. package/dist/timezones/Africa/Dakar.js +1 -0
  153. package/dist/timezones/Africa/Dar_es_Salaam.cjs +1 -0
  154. package/dist/timezones/Africa/Dar_es_Salaam.js +1 -0
  155. package/dist/timezones/Africa/Djibouti.cjs +1 -0
  156. package/dist/timezones/Africa/Djibouti.js +1 -0
  157. package/dist/timezones/Africa/Douala.cjs +1 -0
  158. package/dist/timezones/Africa/Douala.js +1 -0
  159. package/dist/timezones/Africa/El_Aaiun.cjs +1 -0
  160. package/dist/timezones/Africa/El_Aaiun.js +1 -0
  161. package/dist/timezones/Africa/Freetown.cjs +1 -0
  162. package/dist/timezones/Africa/Freetown.js +1 -0
  163. package/dist/timezones/Africa/Gaborone.cjs +1 -0
  164. package/dist/timezones/Africa/Gaborone.js +1 -0
  165. package/dist/timezones/Africa/Harare.cjs +1 -0
  166. package/dist/timezones/Africa/Harare.js +1 -0
  167. package/dist/timezones/Africa/Johannesburg.cjs +1 -0
  168. package/dist/timezones/Africa/Johannesburg.js +1 -0
  169. package/dist/timezones/Africa/Juba.cjs +1 -0
  170. package/dist/timezones/Africa/Juba.js +1 -0
  171. package/dist/timezones/Africa/Kampala.cjs +1 -0
  172. package/dist/timezones/Africa/Kampala.js +1 -0
  173. package/dist/timezones/Africa/Khartoum.cjs +1 -0
  174. package/dist/timezones/Africa/Khartoum.js +1 -0
  175. package/dist/timezones/Africa/Kigali.cjs +1 -0
  176. package/dist/timezones/Africa/Kigali.js +1 -0
  177. package/dist/timezones/Africa/Kinshasa.cjs +1 -0
  178. package/dist/timezones/Africa/Kinshasa.js +1 -0
  179. package/dist/timezones/Africa/Lagos.cjs +1 -0
  180. package/dist/timezones/Africa/Lagos.js +1 -0
  181. package/dist/timezones/Africa/Libreville.cjs +1 -0
  182. package/dist/timezones/Africa/Libreville.js +1 -0
  183. package/dist/timezones/Africa/Lome.cjs +1 -0
  184. package/dist/timezones/Africa/Lome.js +1 -0
  185. package/dist/timezones/Africa/Luanda.cjs +1 -0
  186. package/dist/timezones/Africa/Luanda.js +1 -0
  187. package/dist/timezones/Africa/Lubumbashi.cjs +1 -0
  188. package/dist/timezones/Africa/Lubumbashi.js +1 -0
  189. package/dist/timezones/Africa/Lusaka.cjs +1 -0
  190. package/dist/timezones/Africa/Lusaka.js +1 -0
  191. package/dist/timezones/Africa/Malabo.cjs +1 -0
  192. package/dist/timezones/Africa/Malabo.js +1 -0
  193. package/dist/timezones/Africa/Maputo.cjs +1 -0
  194. package/dist/timezones/Africa/Maputo.js +1 -0
  195. package/dist/timezones/Africa/Maseru.cjs +1 -0
  196. package/dist/timezones/Africa/Maseru.js +1 -0
  197. package/dist/timezones/Africa/Mbabane.cjs +1 -0
  198. package/dist/timezones/Africa/Mbabane.js +1 -0
  199. package/dist/timezones/Africa/Mogadishu.cjs +1 -0
  200. package/dist/timezones/Africa/Mogadishu.js +1 -0
  201. package/dist/timezones/Africa/Monrovia.cjs +1 -0
  202. package/dist/timezones/Africa/Monrovia.js +1 -0
  203. package/dist/timezones/Africa/Nairobi.cjs +1 -0
  204. package/dist/timezones/Africa/Nairobi.js +1 -0
  205. package/dist/timezones/Africa/Ndjamena.cjs +1 -0
  206. package/dist/timezones/Africa/Ndjamena.js +1 -0
  207. package/dist/timezones/Africa/Niamey.cjs +1 -0
  208. package/dist/timezones/Africa/Niamey.js +1 -0
  209. package/dist/timezones/Africa/Nouakchott.cjs +1 -0
  210. package/dist/timezones/Africa/Nouakchott.js +1 -0
  211. package/dist/timezones/Africa/Ouagadougou.cjs +1 -0
  212. package/dist/timezones/Africa/Ouagadougou.js +1 -0
  213. package/dist/timezones/Africa/Porto-Novo.cjs +1 -0
  214. package/dist/timezones/Africa/Porto-Novo.js +1 -0
  215. package/dist/timezones/Africa/Sao_Tome.cjs +1 -0
  216. package/dist/timezones/Africa/Sao_Tome.js +1 -0
  217. package/dist/timezones/Africa/Tripoli.cjs +1 -0
  218. package/dist/timezones/Africa/Tripoli.js +1 -0
  219. package/dist/timezones/Africa/Tunis.cjs +1 -0
  220. package/dist/timezones/Africa/Tunis.js +1 -0
  221. package/dist/timezones/Africa/Windhoek.cjs +1 -0
  222. package/dist/timezones/Africa/Windhoek.js +1 -0
  223. package/dist/timezones/America/Adak.cjs +1 -0
  224. package/dist/timezones/America/Adak.js +1 -0
  225. package/dist/timezones/America/Anchorage.cjs +1 -0
  226. package/dist/timezones/America/Anchorage.js +1 -0
  227. package/dist/timezones/America/Anguilla.cjs +1 -0
  228. package/dist/timezones/America/Anguilla.js +1 -0
  229. package/dist/timezones/America/Antigua.cjs +1 -0
  230. package/dist/timezones/America/Antigua.js +1 -0
  231. package/dist/timezones/America/Araguaina.cjs +1 -0
  232. package/dist/timezones/America/Araguaina.js +1 -0
  233. package/dist/timezones/America/Argentina/Buenos_Aires.cjs +1 -0
  234. package/dist/timezones/America/Argentina/Buenos_Aires.js +1 -0
  235. package/dist/timezones/America/Argentina/Catamarca.cjs +1 -0
  236. package/dist/timezones/America/Argentina/Catamarca.js +1 -0
  237. package/dist/timezones/America/Argentina/Cordoba.cjs +1 -0
  238. package/dist/timezones/America/Argentina/Cordoba.js +1 -0
  239. package/dist/timezones/America/Argentina/Jujuy.cjs +1 -0
  240. package/dist/timezones/America/Argentina/Jujuy.js +1 -0
  241. package/dist/timezones/America/Argentina/La_Rioja.cjs +1 -0
  242. package/dist/timezones/America/Argentina/La_Rioja.js +1 -0
  243. package/dist/timezones/America/Argentina/Mendoza.cjs +1 -0
  244. package/dist/timezones/America/Argentina/Mendoza.js +1 -0
  245. package/dist/timezones/America/Argentina/Rio_Gallegos.cjs +1 -0
  246. package/dist/timezones/America/Argentina/Rio_Gallegos.js +1 -0
  247. package/dist/timezones/America/Argentina/Salta.cjs +1 -0
  248. package/dist/timezones/America/Argentina/Salta.js +1 -0
  249. package/dist/timezones/America/Argentina/San_Juan.cjs +1 -0
  250. package/dist/timezones/America/Argentina/San_Juan.js +1 -0
  251. package/dist/timezones/America/Argentina/San_Luis.cjs +1 -0
  252. package/dist/timezones/America/Argentina/San_Luis.js +1 -0
  253. package/dist/timezones/America/Argentina/Tucuman.cjs +1 -0
  254. package/dist/timezones/America/Argentina/Tucuman.js +1 -0
  255. package/dist/timezones/America/Argentina/Ushuaia.cjs +1 -0
  256. package/dist/timezones/America/Argentina/Ushuaia.js +1 -0
  257. package/dist/timezones/America/Aruba.cjs +1 -0
  258. package/dist/timezones/America/Aruba.js +1 -0
  259. package/dist/timezones/America/Asuncion.cjs +1 -0
  260. package/dist/timezones/America/Asuncion.js +1 -0
  261. package/dist/timezones/America/Atikokan.cjs +1 -0
  262. package/dist/timezones/America/Atikokan.js +1 -0
  263. package/dist/timezones/America/Bahia.cjs +1 -0
  264. package/dist/timezones/America/Bahia.js +1 -0
  265. package/dist/timezones/America/Bahia_Banderas.cjs +1 -0
  266. package/dist/timezones/America/Bahia_Banderas.js +1 -0
  267. package/dist/timezones/America/Barbados.cjs +1 -0
  268. package/dist/timezones/America/Barbados.js +1 -0
  269. package/dist/timezones/America/Belem.cjs +1 -0
  270. package/dist/timezones/America/Belem.js +1 -0
  271. package/dist/timezones/America/Belize.cjs +1 -0
  272. package/dist/timezones/America/Belize.js +1 -0
  273. package/dist/timezones/America/Blanc-Sablon.cjs +1 -0
  274. package/dist/timezones/America/Blanc-Sablon.js +1 -0
  275. package/dist/timezones/America/Boa_Vista.cjs +1 -0
  276. package/dist/timezones/America/Boa_Vista.js +1 -0
  277. package/dist/timezones/America/Bogota.cjs +1 -0
  278. package/dist/timezones/America/Bogota.js +1 -0
  279. package/dist/timezones/America/Boise.cjs +1 -0
  280. package/dist/timezones/America/Boise.js +1 -0
  281. package/dist/timezones/America/Cambridge_Bay.cjs +1 -0
  282. package/dist/timezones/America/Cambridge_Bay.js +1 -0
  283. package/dist/timezones/America/Campo_Grande.cjs +1 -0
  284. package/dist/timezones/America/Campo_Grande.js +1 -0
  285. package/dist/timezones/America/Cancun.cjs +1 -0
  286. package/dist/timezones/America/Cancun.js +1 -0
  287. package/dist/timezones/America/Caracas.cjs +1 -0
  288. package/dist/timezones/America/Caracas.js +1 -0
  289. package/dist/timezones/America/Cayenne.cjs +1 -0
  290. package/dist/timezones/America/Cayenne.js +1 -0
  291. package/dist/timezones/America/Cayman.cjs +1 -0
  292. package/dist/timezones/America/Cayman.js +1 -0
  293. package/dist/timezones/America/Chicago.cjs +1 -0
  294. package/dist/timezones/America/Chicago.js +1 -0
  295. package/dist/timezones/America/Chihuahua.cjs +1 -0
  296. package/dist/timezones/America/Chihuahua.js +1 -0
  297. package/dist/timezones/America/Ciudad_Juarez.cjs +1 -0
  298. package/dist/timezones/America/Ciudad_Juarez.js +1 -0
  299. package/dist/timezones/America/Costa_Rica.cjs +1 -0
  300. package/dist/timezones/America/Costa_Rica.js +1 -0
  301. package/dist/timezones/America/Coyhaique.cjs +1 -0
  302. package/dist/timezones/America/Coyhaique.js +1 -0
  303. package/dist/timezones/America/Creston.cjs +1 -0
  304. package/dist/timezones/America/Creston.js +1 -0
  305. package/dist/timezones/America/Cuiaba.cjs +1 -0
  306. package/dist/timezones/America/Cuiaba.js +1 -0
  307. package/dist/timezones/America/Curacao.cjs +1 -0
  308. package/dist/timezones/America/Curacao.js +1 -0
  309. package/dist/timezones/America/Danmarkshavn.cjs +1 -0
  310. package/dist/timezones/America/Danmarkshavn.js +1 -0
  311. package/dist/timezones/America/Dawson.cjs +1 -0
  312. package/dist/timezones/America/Dawson.js +1 -0
  313. package/dist/timezones/America/Dawson_Creek.cjs +1 -0
  314. package/dist/timezones/America/Dawson_Creek.js +1 -0
  315. package/dist/timezones/America/Denver.cjs +1 -0
  316. package/dist/timezones/America/Denver.js +1 -0
  317. package/dist/timezones/America/Detroit.cjs +1 -0
  318. package/dist/timezones/America/Detroit.js +1 -0
  319. package/dist/timezones/America/Dominica.cjs +1 -0
  320. package/dist/timezones/America/Dominica.js +1 -0
  321. package/dist/timezones/America/Edmonton.cjs +1 -0
  322. package/dist/timezones/America/Edmonton.js +1 -0
  323. package/dist/timezones/America/Eirunepe.cjs +1 -0
  324. package/dist/timezones/America/Eirunepe.js +1 -0
  325. package/dist/timezones/America/El_Salvador.cjs +1 -0
  326. package/dist/timezones/America/El_Salvador.js +1 -0
  327. package/dist/timezones/America/Fort_Nelson.cjs +1 -0
  328. package/dist/timezones/America/Fort_Nelson.js +1 -0
  329. package/dist/timezones/America/Fortaleza.cjs +1 -0
  330. package/dist/timezones/America/Fortaleza.js +1 -0
  331. package/dist/timezones/America/Glace_Bay.cjs +1 -0
  332. package/dist/timezones/America/Glace_Bay.js +1 -0
  333. package/dist/timezones/America/Goose_Bay.cjs +1 -0
  334. package/dist/timezones/America/Goose_Bay.js +1 -0
  335. package/dist/timezones/America/Grand_Turk.cjs +1 -0
  336. package/dist/timezones/America/Grand_Turk.js +1 -0
  337. package/dist/timezones/America/Grenada.cjs +1 -0
  338. package/dist/timezones/America/Grenada.js +1 -0
  339. package/dist/timezones/America/Guadeloupe.cjs +1 -0
  340. package/dist/timezones/America/Guadeloupe.js +1 -0
  341. package/dist/timezones/America/Guatemala.cjs +1 -0
  342. package/dist/timezones/America/Guatemala.js +1 -0
  343. package/dist/timezones/America/Guayaquil.cjs +1 -0
  344. package/dist/timezones/America/Guayaquil.js +1 -0
  345. package/dist/timezones/America/Guyana.cjs +1 -0
  346. package/dist/timezones/America/Guyana.js +1 -0
  347. package/dist/timezones/America/Halifax.cjs +1 -0
  348. package/dist/timezones/America/Halifax.js +1 -0
  349. package/dist/timezones/America/Havana.cjs +1 -0
  350. package/dist/timezones/America/Havana.js +1 -0
  351. package/dist/timezones/America/Hermosillo.cjs +1 -0
  352. package/dist/timezones/America/Hermosillo.js +1 -0
  353. package/dist/timezones/America/Indiana/Indianapolis.cjs +1 -0
  354. package/dist/timezones/America/Indiana/Indianapolis.js +1 -0
  355. package/dist/timezones/America/Indiana/Knox.cjs +1 -0
  356. package/dist/timezones/America/Indiana/Knox.js +1 -0
  357. package/dist/timezones/America/Indiana/Marengo.cjs +1 -0
  358. package/dist/timezones/America/Indiana/Marengo.js +1 -0
  359. package/dist/timezones/America/Indiana/Petersburg.cjs +1 -0
  360. package/dist/timezones/America/Indiana/Petersburg.js +1 -0
  361. package/dist/timezones/America/Indiana/Tell_City.cjs +1 -0
  362. package/dist/timezones/America/Indiana/Tell_City.js +1 -0
  363. package/dist/timezones/America/Indiana/Vevay.cjs +1 -0
  364. package/dist/timezones/America/Indiana/Vevay.js +1 -0
  365. package/dist/timezones/America/Indiana/Vincennes.cjs +1 -0
  366. package/dist/timezones/America/Indiana/Vincennes.js +1 -0
  367. package/dist/timezones/America/Indiana/Winamac.cjs +1 -0
  368. package/dist/timezones/America/Indiana/Winamac.js +1 -0
  369. package/dist/timezones/America/Inuvik.cjs +1 -0
  370. package/dist/timezones/America/Inuvik.js +1 -0
  371. package/dist/timezones/America/Iqaluit.cjs +1 -0
  372. package/dist/timezones/America/Iqaluit.js +1 -0
  373. package/dist/timezones/America/Jamaica.cjs +1 -0
  374. package/dist/timezones/America/Jamaica.js +1 -0
  375. package/dist/timezones/America/Juneau.cjs +1 -0
  376. package/dist/timezones/America/Juneau.js +1 -0
  377. package/dist/timezones/America/Kentucky/Louisville.cjs +1 -0
  378. package/dist/timezones/America/Kentucky/Louisville.js +1 -0
  379. package/dist/timezones/America/Kentucky/Monticello.cjs +1 -0
  380. package/dist/timezones/America/Kentucky/Monticello.js +1 -0
  381. package/dist/timezones/America/Kralendijk.cjs +1 -0
  382. package/dist/timezones/America/Kralendijk.js +1 -0
  383. package/dist/timezones/America/La_Paz.cjs +1 -0
  384. package/dist/timezones/America/La_Paz.js +1 -0
  385. package/dist/timezones/America/Lima.cjs +1 -0
  386. package/dist/timezones/America/Lima.js +1 -0
  387. package/dist/timezones/America/Los_Angeles.cjs +1 -0
  388. package/dist/timezones/America/Los_Angeles.js +1 -0
  389. package/dist/timezones/America/Lower_Princes.cjs +1 -0
  390. package/dist/timezones/America/Lower_Princes.js +1 -0
  391. package/dist/timezones/America/Maceio.cjs +1 -0
  392. package/dist/timezones/America/Maceio.js +1 -0
  393. package/dist/timezones/America/Managua.cjs +1 -0
  394. package/dist/timezones/America/Managua.js +1 -0
  395. package/dist/timezones/America/Manaus.cjs +1 -0
  396. package/dist/timezones/America/Manaus.js +1 -0
  397. package/dist/timezones/America/Marigot.cjs +1 -0
  398. package/dist/timezones/America/Marigot.js +1 -0
  399. package/dist/timezones/America/Martinique.cjs +1 -0
  400. package/dist/timezones/America/Martinique.js +1 -0
  401. package/dist/timezones/America/Matamoros.cjs +1 -0
  402. package/dist/timezones/America/Matamoros.js +1 -0
  403. package/dist/timezones/America/Mazatlan.cjs +1 -0
  404. package/dist/timezones/America/Mazatlan.js +1 -0
  405. package/dist/timezones/America/Menominee.cjs +1 -0
  406. package/dist/timezones/America/Menominee.js +1 -0
  407. package/dist/timezones/America/Merida.cjs +1 -0
  408. package/dist/timezones/America/Merida.js +1 -0
  409. package/dist/timezones/America/Metlakatla.cjs +1 -0
  410. package/dist/timezones/America/Metlakatla.js +1 -0
  411. package/dist/timezones/America/Mexico_City.cjs +1 -0
  412. package/dist/timezones/America/Mexico_City.js +1 -0
  413. package/dist/timezones/America/Miquelon.cjs +1 -0
  414. package/dist/timezones/America/Miquelon.js +1 -0
  415. package/dist/timezones/America/Moncton.cjs +1 -0
  416. package/dist/timezones/America/Moncton.js +1 -0
  417. package/dist/timezones/America/Monterrey.cjs +1 -0
  418. package/dist/timezones/America/Monterrey.js +1 -0
  419. package/dist/timezones/America/Montevideo.cjs +1 -0
  420. package/dist/timezones/America/Montevideo.js +1 -0
  421. package/dist/timezones/America/Montserrat.cjs +1 -0
  422. package/dist/timezones/America/Montserrat.js +1 -0
  423. package/dist/timezones/America/Nassau.cjs +1 -0
  424. package/dist/timezones/America/Nassau.js +1 -0
  425. package/dist/timezones/America/New_York.cjs +1 -0
  426. package/dist/timezones/America/New_York.js +1 -0
  427. package/dist/timezones/America/Nome.cjs +1 -0
  428. package/dist/timezones/America/Nome.js +1 -0
  429. package/dist/timezones/America/Noronha.cjs +1 -0
  430. package/dist/timezones/America/Noronha.js +1 -0
  431. package/dist/timezones/America/North_Dakota/Beulah.cjs +1 -0
  432. package/dist/timezones/America/North_Dakota/Beulah.js +1 -0
  433. package/dist/timezones/America/North_Dakota/Center.cjs +1 -0
  434. package/dist/timezones/America/North_Dakota/Center.js +1 -0
  435. package/dist/timezones/America/North_Dakota/New_Salem.cjs +1 -0
  436. package/dist/timezones/America/North_Dakota/New_Salem.js +1 -0
  437. package/dist/timezones/America/Nuuk.cjs +1 -0
  438. package/dist/timezones/America/Nuuk.js +1 -0
  439. package/dist/timezones/America/Ojinaga.cjs +1 -0
  440. package/dist/timezones/America/Ojinaga.js +1 -0
  441. package/dist/timezones/America/Panama.cjs +1 -0
  442. package/dist/timezones/America/Panama.js +1 -0
  443. package/dist/timezones/America/Paramaribo.cjs +1 -0
  444. package/dist/timezones/America/Paramaribo.js +1 -0
  445. package/dist/timezones/America/Phoenix.cjs +1 -0
  446. package/dist/timezones/America/Phoenix.js +1 -0
  447. package/dist/timezones/America/Port-au-Prince.cjs +1 -0
  448. package/dist/timezones/America/Port-au-Prince.js +1 -0
  449. package/dist/timezones/America/Port_of_Spain.cjs +1 -0
  450. package/dist/timezones/America/Port_of_Spain.js +1 -0
  451. package/dist/timezones/America/Porto_Velho.cjs +1 -0
  452. package/dist/timezones/America/Porto_Velho.js +1 -0
  453. package/dist/timezones/America/Puerto_Rico.cjs +1 -0
  454. package/dist/timezones/America/Puerto_Rico.js +1 -0
  455. package/dist/timezones/America/Punta_Arenas.cjs +1 -0
  456. package/dist/timezones/America/Punta_Arenas.js +1 -0
  457. package/dist/timezones/America/Rankin_Inlet.cjs +1 -0
  458. package/dist/timezones/America/Rankin_Inlet.js +1 -0
  459. package/dist/timezones/America/Recife.cjs +1 -0
  460. package/dist/timezones/America/Recife.js +1 -0
  461. package/dist/timezones/America/Regina.cjs +1 -0
  462. package/dist/timezones/America/Regina.js +1 -0
  463. package/dist/timezones/America/Resolute.cjs +1 -0
  464. package/dist/timezones/America/Resolute.js +1 -0
  465. package/dist/timezones/America/Rio_Branco.cjs +1 -0
  466. package/dist/timezones/America/Rio_Branco.js +1 -0
  467. package/dist/timezones/America/Santarem.cjs +1 -0
  468. package/dist/timezones/America/Santarem.js +1 -0
  469. package/dist/timezones/America/Santiago.cjs +1 -0
  470. package/dist/timezones/America/Santiago.js +1 -0
  471. package/dist/timezones/America/Santo_Domingo.cjs +1 -0
  472. package/dist/timezones/America/Santo_Domingo.js +1 -0
  473. package/dist/timezones/America/Sao_Paulo.cjs +1 -0
  474. package/dist/timezones/America/Sao_Paulo.js +1 -0
  475. package/dist/timezones/America/Scoresbysund.cjs +1 -0
  476. package/dist/timezones/America/Scoresbysund.js +1 -0
  477. package/dist/timezones/America/Sitka.cjs +1 -0
  478. package/dist/timezones/America/Sitka.js +1 -0
  479. package/dist/timezones/America/St_Barthelemy.cjs +1 -0
  480. package/dist/timezones/America/St_Barthelemy.js +1 -0
  481. package/dist/timezones/America/St_Johns.cjs +1 -0
  482. package/dist/timezones/America/St_Johns.js +1 -0
  483. package/dist/timezones/America/St_Kitts.cjs +1 -0
  484. package/dist/timezones/America/St_Kitts.js +1 -0
  485. package/dist/timezones/America/St_Lucia.cjs +1 -0
  486. package/dist/timezones/America/St_Lucia.js +1 -0
  487. package/dist/timezones/America/St_Thomas.cjs +1 -0
  488. package/dist/timezones/America/St_Thomas.js +1 -0
  489. package/dist/timezones/America/St_Vincent.cjs +1 -0
  490. package/dist/timezones/America/St_Vincent.js +1 -0
  491. package/dist/timezones/America/Swift_Current.cjs +1 -0
  492. package/dist/timezones/America/Swift_Current.js +1 -0
  493. package/dist/timezones/America/Tegucigalpa.cjs +1 -0
  494. package/dist/timezones/America/Tegucigalpa.js +1 -0
  495. package/dist/timezones/America/Thule.cjs +1 -0
  496. package/dist/timezones/America/Thule.js +1 -0
  497. package/dist/timezones/America/Tijuana.cjs +1 -0
  498. package/dist/timezones/America/Tijuana.js +1 -0
  499. package/dist/timezones/America/Toronto.cjs +1 -0
  500. package/dist/timezones/America/Toronto.js +1 -0
  501. package/dist/timezones/America/Tortola.cjs +1 -0
  502. package/dist/timezones/America/Tortola.js +1 -0
  503. package/dist/timezones/America/Vancouver.cjs +1 -0
  504. package/dist/timezones/America/Vancouver.js +1 -0
  505. package/dist/timezones/America/Whitehorse.cjs +1 -0
  506. package/dist/timezones/America/Whitehorse.js +1 -0
  507. package/dist/timezones/America/Winnipeg.cjs +1 -0
  508. package/dist/timezones/America/Winnipeg.js +1 -0
  509. package/dist/timezones/America/Yakutat.cjs +1 -0
  510. package/dist/timezones/America/Yakutat.js +1 -0
  511. package/dist/timezones/Antarctica/Casey.cjs +1 -0
  512. package/dist/timezones/Antarctica/Casey.js +1 -0
  513. package/dist/timezones/Antarctica/Davis.cjs +1 -0
  514. package/dist/timezones/Antarctica/Davis.js +1 -0
  515. package/dist/timezones/Antarctica/DumontDUrville.cjs +1 -0
  516. package/dist/timezones/Antarctica/DumontDUrville.js +1 -0
  517. package/dist/timezones/Antarctica/Macquarie.cjs +1 -0
  518. package/dist/timezones/Antarctica/Macquarie.js +1 -0
  519. package/dist/timezones/Antarctica/Mawson.cjs +1 -0
  520. package/dist/timezones/Antarctica/Mawson.js +1 -0
  521. package/dist/timezones/Antarctica/McMurdo.cjs +1 -0
  522. package/dist/timezones/Antarctica/McMurdo.js +1 -0
  523. package/dist/timezones/Antarctica/Palmer.cjs +1 -0
  524. package/dist/timezones/Antarctica/Palmer.js +1 -0
  525. package/dist/timezones/Antarctica/Rothera.cjs +1 -0
  526. package/dist/timezones/Antarctica/Rothera.js +1 -0
  527. package/dist/timezones/Antarctica/Syowa.cjs +1 -0
  528. package/dist/timezones/Antarctica/Syowa.js +1 -0
  529. package/dist/timezones/Antarctica/Troll.cjs +1 -0
  530. package/dist/timezones/Antarctica/Troll.js +1 -0
  531. package/dist/timezones/Antarctica/Vostok.cjs +1 -0
  532. package/dist/timezones/Antarctica/Vostok.js +1 -0
  533. package/dist/timezones/Arctic/Longyearbyen.cjs +1 -0
  534. package/dist/timezones/Arctic/Longyearbyen.js +1 -0
  535. package/dist/timezones/Asia/Aden.cjs +1 -0
  536. package/dist/timezones/Asia/Aden.js +1 -0
  537. package/dist/timezones/Asia/Almaty.cjs +1 -0
  538. package/dist/timezones/Asia/Almaty.js +1 -0
  539. package/dist/timezones/Asia/Amman.cjs +1 -0
  540. package/dist/timezones/Asia/Amman.js +1 -0
  541. package/dist/timezones/Asia/Anadyr.cjs +1 -0
  542. package/dist/timezones/Asia/Anadyr.js +1 -0
  543. package/dist/timezones/Asia/Aqtau.cjs +1 -0
  544. package/dist/timezones/Asia/Aqtau.js +1 -0
  545. package/dist/timezones/Asia/Aqtobe.cjs +1 -0
  546. package/dist/timezones/Asia/Aqtobe.js +1 -0
  547. package/dist/timezones/Asia/Ashgabat.cjs +1 -0
  548. package/dist/timezones/Asia/Ashgabat.js +1 -0
  549. package/dist/timezones/Asia/Atyrau.cjs +1 -0
  550. package/dist/timezones/Asia/Atyrau.js +1 -0
  551. package/dist/timezones/Asia/Baghdad.cjs +1 -0
  552. package/dist/timezones/Asia/Baghdad.js +1 -0
  553. package/dist/timezones/Asia/Bahrain.cjs +1 -0
  554. package/dist/timezones/Asia/Bahrain.js +1 -0
  555. package/dist/timezones/Asia/Baku.cjs +1 -0
  556. package/dist/timezones/Asia/Baku.js +1 -0
  557. package/dist/timezones/Asia/Bangkok.cjs +1 -0
  558. package/dist/timezones/Asia/Bangkok.js +1 -0
  559. package/dist/timezones/Asia/Barnaul.cjs +1 -0
  560. package/dist/timezones/Asia/Barnaul.js +1 -0
  561. package/dist/timezones/Asia/Beirut.cjs +1 -0
  562. package/dist/timezones/Asia/Beirut.js +1 -0
  563. package/dist/timezones/Asia/Bishkek.cjs +1 -0
  564. package/dist/timezones/Asia/Bishkek.js +1 -0
  565. package/dist/timezones/Asia/Brunei.cjs +1 -0
  566. package/dist/timezones/Asia/Brunei.js +1 -0
  567. package/dist/timezones/Asia/Chita.cjs +1 -0
  568. package/dist/timezones/Asia/Chita.js +1 -0
  569. package/dist/timezones/Asia/Colombo.cjs +1 -0
  570. package/dist/timezones/Asia/Colombo.js +1 -0
  571. package/dist/timezones/Asia/Damascus.cjs +1 -0
  572. package/dist/timezones/Asia/Damascus.js +1 -0
  573. package/dist/timezones/Asia/Dhaka.cjs +1 -0
  574. package/dist/timezones/Asia/Dhaka.js +1 -0
  575. package/dist/timezones/Asia/Dili.cjs +1 -0
  576. package/dist/timezones/Asia/Dili.js +1 -0
  577. package/dist/timezones/Asia/Dubai.cjs +1 -0
  578. package/dist/timezones/Asia/Dubai.js +1 -0
  579. package/dist/timezones/Asia/Dushanbe.cjs +1 -0
  580. package/dist/timezones/Asia/Dushanbe.js +1 -0
  581. package/dist/timezones/Asia/Famagusta.cjs +1 -0
  582. package/dist/timezones/Asia/Famagusta.js +1 -0
  583. package/dist/timezones/Asia/Gaza.cjs +1 -0
  584. package/dist/timezones/Asia/Gaza.js +1 -0
  585. package/dist/timezones/Asia/Hebron.cjs +1 -0
  586. package/dist/timezones/Asia/Hebron.js +1 -0
  587. package/dist/timezones/Asia/Ho_Chi_Minh.cjs +1 -0
  588. package/dist/timezones/Asia/Ho_Chi_Minh.js +1 -0
  589. package/dist/timezones/Asia/Hong_Kong.cjs +1 -0
  590. package/dist/timezones/Asia/Hong_Kong.js +1 -0
  591. package/dist/timezones/Asia/Hovd.cjs +1 -0
  592. package/dist/timezones/Asia/Hovd.js +1 -0
  593. package/dist/timezones/Asia/Irkutsk.cjs +1 -0
  594. package/dist/timezones/Asia/Irkutsk.js +1 -0
  595. package/dist/timezones/Asia/Jakarta.cjs +1 -0
  596. package/dist/timezones/Asia/Jakarta.js +1 -0
  597. package/dist/timezones/Asia/Jayapura.cjs +1 -0
  598. package/dist/timezones/Asia/Jayapura.js +1 -0
  599. package/dist/timezones/Asia/Jerusalem.cjs +1 -0
  600. package/dist/timezones/Asia/Jerusalem.js +1 -0
  601. package/dist/timezones/Asia/Kabul.cjs +1 -0
  602. package/dist/timezones/Asia/Kabul.js +1 -0
  603. package/dist/timezones/Asia/Kamchatka.cjs +1 -0
  604. package/dist/timezones/Asia/Kamchatka.js +1 -0
  605. package/dist/timezones/Asia/Karachi.cjs +1 -0
  606. package/dist/timezones/Asia/Karachi.js +1 -0
  607. package/dist/timezones/Asia/Kathmandu.cjs +1 -0
  608. package/dist/timezones/Asia/Kathmandu.js +1 -0
  609. package/dist/timezones/Asia/Khandyga.cjs +1 -0
  610. package/dist/timezones/Asia/Khandyga.js +1 -0
  611. package/dist/timezones/Asia/Kolkata.cjs +1 -0
  612. package/dist/timezones/Asia/Kolkata.js +1 -0
  613. package/dist/timezones/Asia/Krasnoyarsk.cjs +1 -0
  614. package/dist/timezones/Asia/Krasnoyarsk.js +1 -0
  615. package/dist/timezones/Asia/Kuala_Lumpur.cjs +1 -0
  616. package/dist/timezones/Asia/Kuala_Lumpur.js +1 -0
  617. package/dist/timezones/Asia/Kuching.cjs +1 -0
  618. package/dist/timezones/Asia/Kuching.js +1 -0
  619. package/dist/timezones/Asia/Kuwait.cjs +1 -0
  620. package/dist/timezones/Asia/Kuwait.js +1 -0
  621. package/dist/timezones/Asia/Macau.cjs +1 -0
  622. package/dist/timezones/Asia/Macau.js +1 -0
  623. package/dist/timezones/Asia/Magadan.cjs +1 -0
  624. package/dist/timezones/Asia/Magadan.js +1 -0
  625. package/dist/timezones/Asia/Makassar.cjs +1 -0
  626. package/dist/timezones/Asia/Makassar.js +1 -0
  627. package/dist/timezones/Asia/Manila.cjs +1 -0
  628. package/dist/timezones/Asia/Manila.js +1 -0
  629. package/dist/timezones/Asia/Muscat.cjs +1 -0
  630. package/dist/timezones/Asia/Muscat.js +1 -0
  631. package/dist/timezones/Asia/Nicosia.cjs +1 -0
  632. package/dist/timezones/Asia/Nicosia.js +1 -0
  633. package/dist/timezones/Asia/Novokuznetsk.cjs +1 -0
  634. package/dist/timezones/Asia/Novokuznetsk.js +1 -0
  635. package/dist/timezones/Asia/Novosibirsk.cjs +1 -0
  636. package/dist/timezones/Asia/Novosibirsk.js +1 -0
  637. package/dist/timezones/Asia/Omsk.cjs +1 -0
  638. package/dist/timezones/Asia/Omsk.js +1 -0
  639. package/dist/timezones/Asia/Oral.cjs +1 -0
  640. package/dist/timezones/Asia/Oral.js +1 -0
  641. package/dist/timezones/Asia/Phnom_Penh.cjs +1 -0
  642. package/dist/timezones/Asia/Phnom_Penh.js +1 -0
  643. package/dist/timezones/Asia/Pontianak.cjs +1 -0
  644. package/dist/timezones/Asia/Pontianak.js +1 -0
  645. package/dist/timezones/Asia/Pyongyang.cjs +1 -0
  646. package/dist/timezones/Asia/Pyongyang.js +1 -0
  647. package/dist/timezones/Asia/Qatar.cjs +1 -0
  648. package/dist/timezones/Asia/Qatar.js +1 -0
  649. package/dist/timezones/Asia/Qostanay.cjs +1 -0
  650. package/dist/timezones/Asia/Qostanay.js +1 -0
  651. package/dist/timezones/Asia/Qyzylorda.cjs +1 -0
  652. package/dist/timezones/Asia/Qyzylorda.js +1 -0
  653. package/dist/timezones/Asia/Riyadh.cjs +1 -0
  654. package/dist/timezones/Asia/Riyadh.js +1 -0
  655. package/dist/timezones/Asia/Sakhalin.cjs +1 -0
  656. package/dist/timezones/Asia/Sakhalin.js +1 -0
  657. package/dist/timezones/Asia/Samarkand.cjs +1 -0
  658. package/dist/timezones/Asia/Samarkand.js +1 -0
  659. package/dist/timezones/Asia/Seoul.cjs +1 -0
  660. package/dist/timezones/Asia/Seoul.js +1 -0
  661. package/dist/timezones/Asia/Shanghai.cjs +1 -0
  662. package/dist/timezones/Asia/Shanghai.js +1 -0
  663. package/dist/timezones/Asia/Singapore.cjs +1 -0
  664. package/dist/timezones/Asia/Singapore.js +1 -0
  665. package/dist/timezones/Asia/Srednekolymsk.cjs +1 -0
  666. package/dist/timezones/Asia/Srednekolymsk.js +1 -0
  667. package/dist/timezones/Asia/Taipei.cjs +1 -0
  668. package/dist/timezones/Asia/Taipei.js +1 -0
  669. package/dist/timezones/Asia/Tashkent.cjs +1 -0
  670. package/dist/timezones/Asia/Tashkent.js +1 -0
  671. package/dist/timezones/Asia/Tbilisi.cjs +1 -0
  672. package/dist/timezones/Asia/Tbilisi.js +1 -0
  673. package/dist/timezones/Asia/Tehran.cjs +1 -0
  674. package/dist/timezones/Asia/Tehran.js +1 -0
  675. package/dist/timezones/Asia/Thimphu.cjs +1 -0
  676. package/dist/timezones/Asia/Thimphu.js +1 -0
  677. package/dist/timezones/Asia/Tokyo.cjs +1 -0
  678. package/dist/timezones/Asia/Tokyo.js +1 -0
  679. package/dist/timezones/Asia/Tomsk.cjs +1 -0
  680. package/dist/timezones/Asia/Tomsk.js +1 -0
  681. package/dist/timezones/Asia/Ulaanbaatar.cjs +1 -0
  682. package/dist/timezones/Asia/Ulaanbaatar.js +1 -0
  683. package/dist/timezones/Asia/Urumqi.cjs +1 -0
  684. package/dist/timezones/Asia/Urumqi.js +1 -0
  685. package/dist/timezones/Asia/Ust-Nera.cjs +1 -0
  686. package/dist/timezones/Asia/Ust-Nera.js +1 -0
  687. package/dist/timezones/Asia/Vientiane.cjs +1 -0
  688. package/dist/timezones/Asia/Vientiane.js +1 -0
  689. package/dist/timezones/Asia/Vladivostok.cjs +1 -0
  690. package/dist/timezones/Asia/Vladivostok.js +1 -0
  691. package/dist/timezones/Asia/Yakutsk.cjs +1 -0
  692. package/dist/timezones/Asia/Yakutsk.js +1 -0
  693. package/dist/timezones/Asia/Yangon.cjs +1 -0
  694. package/dist/timezones/Asia/Yangon.js +1 -0
  695. package/dist/timezones/Asia/Yekaterinburg.cjs +1 -0
  696. package/dist/timezones/Asia/Yekaterinburg.js +1 -0
  697. package/dist/timezones/Asia/Yerevan.cjs +1 -0
  698. package/dist/timezones/Asia/Yerevan.js +1 -0
  699. package/dist/timezones/Atlantic/Azores.cjs +1 -0
  700. package/dist/timezones/Atlantic/Azores.js +1 -0
  701. package/dist/timezones/Atlantic/Bermuda.cjs +1 -0
  702. package/dist/timezones/Atlantic/Bermuda.js +1 -0
  703. package/dist/timezones/Atlantic/Canary.cjs +1 -0
  704. package/dist/timezones/Atlantic/Canary.js +1 -0
  705. package/dist/timezones/Atlantic/Cape_Verde.cjs +1 -0
  706. package/dist/timezones/Atlantic/Cape_Verde.js +1 -0
  707. package/dist/timezones/Atlantic/Faroe.cjs +1 -0
  708. package/dist/timezones/Atlantic/Faroe.js +1 -0
  709. package/dist/timezones/Atlantic/Madeira.cjs +1 -0
  710. package/dist/timezones/Atlantic/Madeira.js +1 -0
  711. package/dist/timezones/Atlantic/Reykjavik.cjs +1 -0
  712. package/dist/timezones/Atlantic/Reykjavik.js +1 -0
  713. package/dist/timezones/Atlantic/South_Georgia.cjs +1 -0
  714. package/dist/timezones/Atlantic/South_Georgia.js +1 -0
  715. package/dist/timezones/Atlantic/St_Helena.cjs +1 -0
  716. package/dist/timezones/Atlantic/St_Helena.js +1 -0
  717. package/dist/timezones/Atlantic/Stanley.cjs +1 -0
  718. package/dist/timezones/Atlantic/Stanley.js +1 -0
  719. package/dist/timezones/Australia/Adelaide.cjs +1 -0
  720. package/dist/timezones/Australia/Adelaide.js +1 -0
  721. package/dist/timezones/Australia/Brisbane.cjs +1 -0
  722. package/dist/timezones/Australia/Brisbane.js +1 -0
  723. package/dist/timezones/Australia/Broken_Hill.cjs +1 -0
  724. package/dist/timezones/Australia/Broken_Hill.js +1 -0
  725. package/dist/timezones/Australia/Darwin.cjs +1 -0
  726. package/dist/timezones/Australia/Darwin.js +1 -0
  727. package/dist/timezones/Australia/Eucla.cjs +1 -0
  728. package/dist/timezones/Australia/Eucla.js +1 -0
  729. package/dist/timezones/Australia/Hobart.cjs +1 -0
  730. package/dist/timezones/Australia/Hobart.js +1 -0
  731. package/dist/timezones/Australia/Lindeman.cjs +1 -0
  732. package/dist/timezones/Australia/Lindeman.js +1 -0
  733. package/dist/timezones/Australia/Lord_Howe.cjs +1 -0
  734. package/dist/timezones/Australia/Lord_Howe.js +1 -0
  735. package/dist/timezones/Australia/Melbourne.cjs +1 -0
  736. package/dist/timezones/Australia/Melbourne.js +1 -0
  737. package/dist/timezones/Australia/Perth.cjs +1 -0
  738. package/dist/timezones/Australia/Perth.js +1 -0
  739. package/dist/timezones/Australia/Sydney.cjs +1 -0
  740. package/dist/timezones/Australia/Sydney.js +1 -0
  741. package/dist/timezones/Europe/Amsterdam.cjs +1 -0
  742. package/dist/timezones/Europe/Amsterdam.js +1 -0
  743. package/dist/timezones/Europe/Andorra.cjs +1 -0
  744. package/dist/timezones/Europe/Andorra.js +1 -0
  745. package/dist/timezones/Europe/Astrakhan.cjs +1 -0
  746. package/dist/timezones/Europe/Astrakhan.js +1 -0
  747. package/dist/timezones/Europe/Athens.cjs +1 -0
  748. package/dist/timezones/Europe/Athens.js +1 -0
  749. package/dist/timezones/Europe/Belgrade.cjs +1 -0
  750. package/dist/timezones/Europe/Belgrade.js +1 -0
  751. package/dist/timezones/Europe/Berlin.cjs +1 -0
  752. package/dist/timezones/Europe/Berlin.js +1 -0
  753. package/dist/timezones/Europe/Bratislava.cjs +1 -0
  754. package/dist/timezones/Europe/Bratislava.js +1 -0
  755. package/dist/timezones/Europe/Brussels.cjs +1 -0
  756. package/dist/timezones/Europe/Brussels.js +1 -0
  757. package/dist/timezones/Europe/Bucharest.cjs +1 -0
  758. package/dist/timezones/Europe/Bucharest.js +1 -0
  759. package/dist/timezones/Europe/Budapest.cjs +1 -0
  760. package/dist/timezones/Europe/Budapest.js +1 -0
  761. package/dist/timezones/Europe/Busingen.cjs +1 -0
  762. package/dist/timezones/Europe/Busingen.js +1 -0
  763. package/dist/timezones/Europe/Chisinau.cjs +1 -0
  764. package/dist/timezones/Europe/Chisinau.js +1 -0
  765. package/dist/timezones/Europe/Copenhagen.cjs +1 -0
  766. package/dist/timezones/Europe/Copenhagen.js +1 -0
  767. package/dist/timezones/Europe/Dublin.cjs +1 -0
  768. package/dist/timezones/Europe/Dublin.js +1 -0
  769. package/dist/timezones/Europe/Gibraltar.cjs +1 -0
  770. package/dist/timezones/Europe/Gibraltar.js +1 -0
  771. package/dist/timezones/Europe/Guernsey.cjs +1 -0
  772. package/dist/timezones/Europe/Guernsey.js +1 -0
  773. package/dist/timezones/Europe/Helsinki.cjs +1 -0
  774. package/dist/timezones/Europe/Helsinki.js +1 -0
  775. package/dist/timezones/Europe/Isle_of_Man.cjs +1 -0
  776. package/dist/timezones/Europe/Isle_of_Man.js +1 -0
  777. package/dist/timezones/Europe/Istanbul.cjs +1 -0
  778. package/dist/timezones/Europe/Istanbul.js +1 -0
  779. package/dist/timezones/Europe/Jersey.cjs +1 -0
  780. package/dist/timezones/Europe/Jersey.js +1 -0
  781. package/dist/timezones/Europe/Kaliningrad.cjs +1 -0
  782. package/dist/timezones/Europe/Kaliningrad.js +1 -0
  783. package/dist/timezones/Europe/Kirov.cjs +1 -0
  784. package/dist/timezones/Europe/Kirov.js +1 -0
  785. package/dist/timezones/Europe/Kyiv.cjs +1 -0
  786. package/dist/timezones/Europe/Kyiv.js +1 -0
  787. package/dist/timezones/Europe/Lisbon.cjs +1 -0
  788. package/dist/timezones/Europe/Lisbon.js +1 -0
  789. package/dist/timezones/Europe/Ljubljana.cjs +1 -0
  790. package/dist/timezones/Europe/Ljubljana.js +1 -0
  791. package/dist/timezones/Europe/London.cjs +1 -0
  792. package/dist/timezones/Europe/London.js +1 -0
  793. package/dist/timezones/Europe/Luxembourg.cjs +1 -0
  794. package/dist/timezones/Europe/Luxembourg.js +1 -0
  795. package/dist/timezones/Europe/Madrid.cjs +1 -0
  796. package/dist/timezones/Europe/Madrid.js +1 -0
  797. package/dist/timezones/Europe/Malta.cjs +1 -0
  798. package/dist/timezones/Europe/Malta.js +1 -0
  799. package/dist/timezones/Europe/Mariehamn.cjs +1 -0
  800. package/dist/timezones/Europe/Mariehamn.js +1 -0
  801. package/dist/timezones/Europe/Minsk.cjs +1 -0
  802. package/dist/timezones/Europe/Minsk.js +1 -0
  803. package/dist/timezones/Europe/Monaco.cjs +1 -0
  804. package/dist/timezones/Europe/Monaco.js +1 -0
  805. package/dist/timezones/Europe/Moscow.cjs +1 -0
  806. package/dist/timezones/Europe/Moscow.js +1 -0
  807. package/dist/timezones/Europe/Oslo.cjs +1 -0
  808. package/dist/timezones/Europe/Oslo.js +1 -0
  809. package/dist/timezones/Europe/Paris.cjs +1 -0
  810. package/dist/timezones/Europe/Paris.js +1 -0
  811. package/dist/timezones/Europe/Podgorica.cjs +1 -0
  812. package/dist/timezones/Europe/Podgorica.js +1 -0
  813. package/dist/timezones/Europe/Prague.cjs +1 -0
  814. package/dist/timezones/Europe/Prague.js +1 -0
  815. package/dist/timezones/Europe/Riga.cjs +1 -0
  816. package/dist/timezones/Europe/Riga.js +1 -0
  817. package/dist/timezones/Europe/Rome.cjs +1 -0
  818. package/dist/timezones/Europe/Rome.js +1 -0
  819. package/dist/timezones/Europe/Samara.cjs +1 -0
  820. package/dist/timezones/Europe/Samara.js +1 -0
  821. package/dist/timezones/Europe/San_Marino.cjs +1 -0
  822. package/dist/timezones/Europe/San_Marino.js +1 -0
  823. package/dist/timezones/Europe/Sarajevo.cjs +1 -0
  824. package/dist/timezones/Europe/Sarajevo.js +1 -0
  825. package/dist/timezones/Europe/Saratov.cjs +1 -0
  826. package/dist/timezones/Europe/Saratov.js +1 -0
  827. package/dist/timezones/Europe/Simferopol.cjs +1 -0
  828. package/dist/timezones/Europe/Simferopol.js +1 -0
  829. package/dist/timezones/Europe/Skopje.cjs +1 -0
  830. package/dist/timezones/Europe/Skopje.js +1 -0
  831. package/dist/timezones/Europe/Sofia.cjs +1 -0
  832. package/dist/timezones/Europe/Sofia.js +1 -0
  833. package/dist/timezones/Europe/Stockholm.cjs +1 -0
  834. package/dist/timezones/Europe/Stockholm.js +1 -0
  835. package/dist/timezones/Europe/Tallinn.cjs +1 -0
  836. package/dist/timezones/Europe/Tallinn.js +1 -0
  837. package/dist/timezones/Europe/Tirane.cjs +1 -0
  838. package/dist/timezones/Europe/Tirane.js +1 -0
  839. package/dist/timezones/Europe/Ulyanovsk.cjs +1 -0
  840. package/dist/timezones/Europe/Ulyanovsk.js +1 -0
  841. package/dist/timezones/Europe/Vaduz.cjs +1 -0
  842. package/dist/timezones/Europe/Vaduz.js +1 -0
  843. package/dist/timezones/Europe/Vatican.cjs +1 -0
  844. package/dist/timezones/Europe/Vatican.js +1 -0
  845. package/dist/timezones/Europe/Vienna.cjs +1 -0
  846. package/dist/timezones/Europe/Vienna.js +1 -0
  847. package/dist/timezones/Europe/Vilnius.cjs +1 -0
  848. package/dist/timezones/Europe/Vilnius.js +1 -0
  849. package/dist/timezones/Europe/Volgograd.cjs +1 -0
  850. package/dist/timezones/Europe/Volgograd.js +1 -0
  851. package/dist/timezones/Europe/Warsaw.cjs +1 -0
  852. package/dist/timezones/Europe/Warsaw.js +1 -0
  853. package/dist/timezones/Europe/Zagreb.cjs +1 -0
  854. package/dist/timezones/Europe/Zagreb.js +1 -0
  855. package/dist/timezones/Europe/Zurich.cjs +1 -0
  856. package/dist/timezones/Europe/Zurich.js +1 -0
  857. package/dist/timezones/Indian/Antananarivo.cjs +1 -0
  858. package/dist/timezones/Indian/Antananarivo.js +1 -0
  859. package/dist/timezones/Indian/Chagos.cjs +1 -0
  860. package/dist/timezones/Indian/Chagos.js +1 -0
  861. package/dist/timezones/Indian/Christmas.cjs +1 -0
  862. package/dist/timezones/Indian/Christmas.js +1 -0
  863. package/dist/timezones/Indian/Cocos.cjs +1 -0
  864. package/dist/timezones/Indian/Cocos.js +1 -0
  865. package/dist/timezones/Indian/Comoro.cjs +1 -0
  866. package/dist/timezones/Indian/Comoro.js +1 -0
  867. package/dist/timezones/Indian/Kerguelen.cjs +1 -0
  868. package/dist/timezones/Indian/Kerguelen.js +1 -0
  869. package/dist/timezones/Indian/Mahe.cjs +1 -0
  870. package/dist/timezones/Indian/Mahe.js +1 -0
  871. package/dist/timezones/Indian/Maldives.cjs +1 -0
  872. package/dist/timezones/Indian/Maldives.js +1 -0
  873. package/dist/timezones/Indian/Mauritius.cjs +1 -0
  874. package/dist/timezones/Indian/Mauritius.js +1 -0
  875. package/dist/timezones/Indian/Mayotte.cjs +1 -0
  876. package/dist/timezones/Indian/Mayotte.js +1 -0
  877. package/dist/timezones/Indian/Reunion.cjs +1 -0
  878. package/dist/timezones/Indian/Reunion.js +1 -0
  879. package/dist/timezones/Pacific/Apia.cjs +1 -0
  880. package/dist/timezones/Pacific/Apia.js +1 -0
  881. package/dist/timezones/Pacific/Auckland.cjs +1 -0
  882. package/dist/timezones/Pacific/Auckland.js +1 -0
  883. package/dist/timezones/Pacific/Bougainville.cjs +1 -0
  884. package/dist/timezones/Pacific/Bougainville.js +1 -0
  885. package/dist/timezones/Pacific/Chatham.cjs +1 -0
  886. package/dist/timezones/Pacific/Chatham.js +1 -0
  887. package/dist/timezones/Pacific/Chuuk.cjs +1 -0
  888. package/dist/timezones/Pacific/Chuuk.js +1 -0
  889. package/dist/timezones/Pacific/Easter.cjs +1 -0
  890. package/dist/timezones/Pacific/Easter.js +1 -0
  891. package/dist/timezones/Pacific/Efate.cjs +1 -0
  892. package/dist/timezones/Pacific/Efate.js +1 -0
  893. package/dist/timezones/Pacific/Fakaofo.cjs +1 -0
  894. package/dist/timezones/Pacific/Fakaofo.js +1 -0
  895. package/dist/timezones/Pacific/Fiji.cjs +1 -0
  896. package/dist/timezones/Pacific/Fiji.js +1 -0
  897. package/dist/timezones/Pacific/Funafuti.cjs +1 -0
  898. package/dist/timezones/Pacific/Funafuti.js +1 -0
  899. package/dist/timezones/Pacific/Galapagos.cjs +1 -0
  900. package/dist/timezones/Pacific/Galapagos.js +1 -0
  901. package/dist/timezones/Pacific/Gambier.cjs +1 -0
  902. package/dist/timezones/Pacific/Gambier.js +1 -0
  903. package/dist/timezones/Pacific/Guadalcanal.cjs +1 -0
  904. package/dist/timezones/Pacific/Guadalcanal.js +1 -0
  905. package/dist/timezones/Pacific/Guam.cjs +1 -0
  906. package/dist/timezones/Pacific/Guam.js +1 -0
  907. package/dist/timezones/Pacific/Honolulu.cjs +1 -0
  908. package/dist/timezones/Pacific/Honolulu.js +1 -0
  909. package/dist/timezones/Pacific/Kanton.cjs +1 -0
  910. package/dist/timezones/Pacific/Kanton.js +1 -0
  911. package/dist/timezones/Pacific/Kiritimati.cjs +1 -0
  912. package/dist/timezones/Pacific/Kiritimati.js +1 -0
  913. package/dist/timezones/Pacific/Kosrae.cjs +1 -0
  914. package/dist/timezones/Pacific/Kosrae.js +1 -0
  915. package/dist/timezones/Pacific/Kwajalein.cjs +1 -0
  916. package/dist/timezones/Pacific/Kwajalein.js +1 -0
  917. package/dist/timezones/Pacific/Majuro.cjs +1 -0
  918. package/dist/timezones/Pacific/Majuro.js +1 -0
  919. package/dist/timezones/Pacific/Marquesas.cjs +1 -0
  920. package/dist/timezones/Pacific/Marquesas.js +1 -0
  921. package/dist/timezones/Pacific/Midway.cjs +1 -0
  922. package/dist/timezones/Pacific/Midway.js +1 -0
  923. package/dist/timezones/Pacific/Nauru.cjs +1 -0
  924. package/dist/timezones/Pacific/Nauru.js +1 -0
  925. package/dist/timezones/Pacific/Niue.cjs +1 -0
  926. package/dist/timezones/Pacific/Niue.js +1 -0
  927. package/dist/timezones/Pacific/Norfolk.cjs +1 -0
  928. package/dist/timezones/Pacific/Norfolk.js +1 -0
  929. package/dist/timezones/Pacific/Noumea.cjs +1 -0
  930. package/dist/timezones/Pacific/Noumea.js +1 -0
  931. package/dist/timezones/Pacific/Pago_Pago.cjs +1 -0
  932. package/dist/timezones/Pacific/Pago_Pago.js +1 -0
  933. package/dist/timezones/Pacific/Palau.cjs +1 -0
  934. package/dist/timezones/Pacific/Palau.js +1 -0
  935. package/dist/timezones/Pacific/Pitcairn.cjs +1 -0
  936. package/dist/timezones/Pacific/Pitcairn.js +1 -0
  937. package/dist/timezones/Pacific/Pohnpei.cjs +1 -0
  938. package/dist/timezones/Pacific/Pohnpei.js +1 -0
  939. package/dist/timezones/Pacific/Port_Moresby.cjs +1 -0
  940. package/dist/timezones/Pacific/Port_Moresby.js +1 -0
  941. package/dist/timezones/Pacific/Rarotonga.cjs +1 -0
  942. package/dist/timezones/Pacific/Rarotonga.js +1 -0
  943. package/dist/timezones/Pacific/Saipan.cjs +1 -0
  944. package/dist/timezones/Pacific/Saipan.js +1 -0
  945. package/dist/timezones/Pacific/Tahiti.cjs +1 -0
  946. package/dist/timezones/Pacific/Tahiti.js +1 -0
  947. package/dist/timezones/Pacific/Tarawa.cjs +1 -0
  948. package/dist/timezones/Pacific/Tarawa.js +1 -0
  949. package/dist/timezones/Pacific/Tongatapu.cjs +1 -0
  950. package/dist/timezones/Pacific/Tongatapu.js +1 -0
  951. package/dist/timezones/Pacific/Wake.cjs +1 -0
  952. package/dist/timezones/Pacific/Wake.js +1 -0
  953. package/dist/timezones/Pacific/Wallis.cjs +1 -0
  954. package/dist/timezones/Pacific/Wallis.js +1 -0
  955. package/docs/MIGRATION.md +226 -0
  956. package/docs/PLUGINS.md +206 -0
  957. package/package.json +57 -41
  958. package/EXTEND.md +0 -107
  959. package/LOCALE.md +0 -103
  960. package/PLUGINS.md +0 -486
  961. package/date-and-time.d.ts +0 -343
  962. package/date-and-time.js +0 -520
  963. package/date-and-time.min.js +0 -4
  964. package/esm/date-and-time.es.js +0 -512
  965. package/esm/date-and-time.es.min.js +0 -4
  966. package/esm/date-and-time.mjs +0 -512
  967. package/esm/locale/ar.es.js +0 -39
  968. package/esm/locale/ar.mjs +0 -39
  969. package/esm/locale/az.es.js +0 -44
  970. package/esm/locale/az.mjs +0 -44
  971. package/esm/locale/bn.es.js +0 -50
  972. package/esm/locale/bn.mjs +0 -50
  973. package/esm/locale/cs.es.js +0 -22
  974. package/esm/locale/cs.mjs +0 -22
  975. package/esm/locale/de.es.js +0 -23
  976. package/esm/locale/de.mjs +0 -23
  977. package/esm/locale/dk.es.js +0 -22
  978. package/esm/locale/dk.mjs +0 -22
  979. package/esm/locale/el.es.js +0 -44
  980. package/esm/locale/el.mjs +0 -44
  981. package/esm/locale/en.es.js +0 -13
  982. package/esm/locale/en.mjs +0 -13
  983. package/esm/locale/es.es.js +0 -42
  984. package/esm/locale/es.mjs +0 -42
  985. package/esm/locale/fa.es.js +0 -39
  986. package/esm/locale/fa.mjs +0 -39
  987. package/esm/locale/fr.es.js +0 -23
  988. package/esm/locale/fr.mjs +0 -23
  989. package/esm/locale/hi.es.js +0 -50
  990. package/esm/locale/hi.mjs +0 -50
  991. package/esm/locale/hu.es.js +0 -23
  992. package/esm/locale/hu.mjs +0 -23
  993. package/esm/locale/id.es.js +0 -46
  994. package/esm/locale/id.mjs +0 -46
  995. package/esm/locale/it.es.js +0 -23
  996. package/esm/locale/it.mjs +0 -23
  997. package/esm/locale/ja.es.js +0 -31
  998. package/esm/locale/ja.mjs +0 -31
  999. package/esm/locale/jv.es.js +0 -46
  1000. package/esm/locale/jv.mjs +0 -46
  1001. package/esm/locale/ko.es.js +0 -23
  1002. package/esm/locale/ko.mjs +0 -23
  1003. package/esm/locale/my.es.js +0 -38
  1004. package/esm/locale/my.mjs +0 -38
  1005. package/esm/locale/nl.es.js +0 -37
  1006. package/esm/locale/nl.mjs +0 -37
  1007. package/esm/locale/pa-in.es.js +0 -62
  1008. package/esm/locale/pa-in.mjs +0 -62
  1009. package/esm/locale/pl.es.js +0 -37
  1010. package/esm/locale/pl.mjs +0 -37
  1011. package/esm/locale/pt.es.js +0 -44
  1012. package/esm/locale/pt.mjs +0 -44
  1013. package/esm/locale/ro.es.js +0 -22
  1014. package/esm/locale/ro.mjs +0 -22
  1015. package/esm/locale/ru.es.js +0 -44
  1016. package/esm/locale/ru.mjs +0 -44
  1017. package/esm/locale/rw.es.js +0 -22
  1018. package/esm/locale/rw.mjs +0 -22
  1019. package/esm/locale/sr.es.js +0 -22
  1020. package/esm/locale/sr.mjs +0 -22
  1021. package/esm/locale/sv.es.js +0 -22
  1022. package/esm/locale/sv.mjs +0 -22
  1023. package/esm/locale/th.es.js +0 -23
  1024. package/esm/locale/th.mjs +0 -23
  1025. package/esm/locale/tr.es.js +0 -22
  1026. package/esm/locale/tr.mjs +0 -22
  1027. package/esm/locale/uk.es.js +0 -57
  1028. package/esm/locale/uk.mjs +0 -57
  1029. package/esm/locale/uz.es.js +0 -22
  1030. package/esm/locale/uz.mjs +0 -22
  1031. package/esm/locale/vi.es.js +0 -23
  1032. package/esm/locale/vi.mjs +0 -23
  1033. package/esm/locale/zh-cn.es.js +0 -48
  1034. package/esm/locale/zh-cn.mjs +0 -48
  1035. package/esm/locale/zh-tw.es.js +0 -46
  1036. package/esm/locale/zh-tw.mjs +0 -46
  1037. package/esm/plugin/day-of-week.es.js +0 -19
  1038. package/esm/plugin/day-of-week.mjs +0 -19
  1039. package/esm/plugin/meridiem.es.js +0 -47
  1040. package/esm/plugin/meridiem.mjs +0 -47
  1041. package/esm/plugin/microsecond.es.js +0 -31
  1042. package/esm/plugin/microsecond.mjs +0 -31
  1043. package/esm/plugin/ordinal.es.js +0 -34
  1044. package/esm/plugin/ordinal.mjs +0 -34
  1045. package/esm/plugin/timespan.es.js +0 -75
  1046. package/esm/plugin/timespan.mjs +0 -75
  1047. package/esm/plugin/timezone.es.js +0 -725
  1048. package/esm/plugin/timezone.mjs +0 -725
  1049. package/esm/plugin/two-digit-year.es.js +0 -21
  1050. package/esm/plugin/two-digit-year.mjs +0 -21
  1051. package/locale/ar.d.ts +0 -1
  1052. package/locale/ar.js +0 -47
  1053. package/locale/az.d.ts +0 -1
  1054. package/locale/az.js +0 -52
  1055. package/locale/bn.d.ts +0 -1
  1056. package/locale/bn.js +0 -58
  1057. package/locale/cs.d.ts +0 -1
  1058. package/locale/cs.js +0 -30
  1059. package/locale/de.d.ts +0 -1
  1060. package/locale/de.js +0 -31
  1061. package/locale/dk.d.ts +0 -1
  1062. package/locale/dk.js +0 -30
  1063. package/locale/el.d.ts +0 -1
  1064. package/locale/el.js +0 -52
  1065. package/locale/en.d.ts +0 -1
  1066. package/locale/en.js +0 -21
  1067. package/locale/es.d.ts +0 -1
  1068. package/locale/es.js +0 -50
  1069. package/locale/fa.d.ts +0 -1
  1070. package/locale/fa.js +0 -47
  1071. package/locale/fr.d.ts +0 -1
  1072. package/locale/fr.js +0 -31
  1073. package/locale/hi.d.ts +0 -1
  1074. package/locale/hi.js +0 -58
  1075. package/locale/hu.d.ts +0 -1
  1076. package/locale/hu.js +0 -31
  1077. package/locale/id.d.ts +0 -1
  1078. package/locale/id.js +0 -54
  1079. package/locale/it.d.ts +0 -1
  1080. package/locale/it.js +0 -31
  1081. package/locale/ja.d.ts +0 -1
  1082. package/locale/ja.js +0 -39
  1083. package/locale/jv.d.ts +0 -1
  1084. package/locale/jv.js +0 -54
  1085. package/locale/ko.d.ts +0 -1
  1086. package/locale/ko.js +0 -31
  1087. package/locale/my.d.ts +0 -1
  1088. package/locale/my.js +0 -46
  1089. package/locale/nl.d.ts +0 -1
  1090. package/locale/nl.js +0 -45
  1091. package/locale/pa-in.d.ts +0 -1
  1092. package/locale/pa-in.js +0 -70
  1093. package/locale/pl.d.ts +0 -1
  1094. package/locale/pl.js +0 -45
  1095. package/locale/pt.d.ts +0 -1
  1096. package/locale/pt.js +0 -52
  1097. package/locale/ro.d.ts +0 -1
  1098. package/locale/ro.js +0 -30
  1099. package/locale/ru.d.ts +0 -1
  1100. package/locale/ru.js +0 -52
  1101. package/locale/rw.d.ts +0 -1
  1102. package/locale/rw.js +0 -30
  1103. package/locale/sr.d.ts +0 -1
  1104. package/locale/sr.js +0 -30
  1105. package/locale/sv.d.ts +0 -1
  1106. package/locale/sv.js +0 -30
  1107. package/locale/th.d.ts +0 -1
  1108. package/locale/th.js +0 -31
  1109. package/locale/tr.d.ts +0 -1
  1110. package/locale/tr.js +0 -30
  1111. package/locale/uk.d.ts +0 -1
  1112. package/locale/uk.js +0 -65
  1113. package/locale/uz.d.ts +0 -1
  1114. package/locale/uz.js +0 -30
  1115. package/locale/vi.d.ts +0 -1
  1116. package/locale/vi.js +0 -31
  1117. package/locale/zh-cn.d.ts +0 -1
  1118. package/locale/zh-cn.js +0 -56
  1119. package/locale/zh-tw.d.ts +0 -1
  1120. package/locale/zh-tw.js +0 -54
  1121. package/plugin/day-of-week.d.ts +0 -1
  1122. package/plugin/day-of-week.js +0 -27
  1123. package/plugin/meridiem.d.ts +0 -1
  1124. package/plugin/meridiem.js +0 -55
  1125. package/plugin/microsecond.d.ts +0 -1
  1126. package/plugin/microsecond.js +0 -39
  1127. package/plugin/ordinal.d.ts +0 -1
  1128. package/plugin/ordinal.js +0 -42
  1129. package/plugin/timespan.d.ts +0 -24
  1130. package/plugin/timespan.js +0 -83
  1131. package/plugin/timezone.d.ts +0 -106
  1132. package/plugin/timezone.js +0 -733
  1133. package/plugin/two-digit-year.d.ts +0 -1
  1134. package/plugin/two-digit-year.js +0 -29
package/README.md CHANGED
@@ -1,630 +1,1315 @@
1
1
  # date-and-time
2
2
 
3
- [![Circle CI](https://circleci.com/gh/knowledgecode/date-and-time.svg?style=shield)](https://circleci.com/gh/knowledgecode/date-and-time)
3
+ [![CI](https://github.com/knowledgecode/date-and-time/actions/workflows/test.yml/badge.svg)](https://github.com/knowledgecode/date-and-time/actions/workflows/test.yml)
4
+ [![Coverage](./.github/badges/coverage.svg)](https://github.com/knowledgecode/date-and-time/actions/workflows/test.yml)
5
+ [![npm](https://img.shields.io/npm/v/date-and-time)](https://www.npmjs.com/package/date-and-time)
4
6
 
5
- This JS library is just a collection of functions for manipulating date and time. It's small, simple, and easy to learn.
7
+ The simplest and most user-friendly date and time manipulation library
6
8
 
7
- ## Why
9
+ ## Install
8
10
 
9
- Nowadays, JS modules have become larger, more complex, and dependent on many other modules. It is important to strive for simplicity and smallness, especially for modules that are at the bottom of the dependency chain, such as those that handle date and time.
11
+ ```shell
12
+ npm i date-and-time
13
+ ```
10
14
 
11
- ## Features
15
+ - ESModules:
12
16
 
13
- - Minimalist. Approximately 2k. (minified and gzipped)
14
- - Extensible. Plugin system support.
15
- - Multi language support.
16
- - Universal / Isomorphic. Works anywhere.
17
- - TypeScript support.
18
- - Older browser support. Even works on IE6. :)
17
+ ```typescript
18
+ import { format } from 'date-and-time';
19
19
 
20
- ## Install
20
+ format(new Date(), 'ddd, MMM DD YYYY');
21
+ // => Wed, Jul 09 2025
22
+ ```
21
23
 
22
- ```shell
23
- npm i date-and-time
24
+ - CommonJS:
25
+
26
+ ```typescript
27
+ const { format } = require('date-and-time');
28
+
29
+ format(new Date(), 'ddd, MMM DD YYYY');
30
+ // => Wed, Jul 09 2025
24
31
  ```
25
32
 
26
- ## Recent Changes
33
+ ## Migration
27
34
 
28
- - 3.5.0
29
- - Added `addYearsTZ()`, `addMonthsTZ()`, and `addDaysTZ()` to the `timezone` plugin.
30
- - Revised the approach to adding time and removed the third parameter from `addHours()`, `addMinutes()`, `addSeconds()`, and `addMilliseconds()`.
35
+ Version `4.x` has been completely rewritten in TypeScript and some features from `3.x` are no longer compatible. The main changes are as follows:
31
36
 
32
- - 3.4.1
33
- - Fixed an issue where `formatTZ()` would output 0:00 as 24:00 in 24-hour format in Node.js.
37
+ - The `timezone` and `timespan` plugins have been integrated into the main library
38
+ - Tree shaking is now supported
39
+ - Supports `ES2021` and no longer supports older browsers
40
+
41
+ For details, please refer to [MIGRATION.md](docs/MIGRATION.md).
42
+
43
+ ## API
34
44
 
35
- - 3.4.0
36
- - Added `zz` (time zone name) and `z` (time zone name abbreviation) tokens to the `timezone` plugin.
37
- - Fixed an issue where token extensions by other plugins were not reflected in functions provided by the `timezone` plugin.
45
+ ## format(dateObj, arg[, options])
38
46
 
39
- ## Usage
47
+ <details>
48
+ <summary>Formats a Date object according to the specified format string.</summary>
40
49
 
41
- - ES Modules:
50
+ - dateObj
51
+ - type: `Date`
52
+ - The Date object to format
53
+ - arg
54
+ - type: `string | CompiledObject`
55
+ - The format string or compiled object to match against the Date object
56
+ - [options]
57
+ - type: `FormatterOptions`
58
+ - Optional formatter options for customization
42
59
 
43
- ```javascript
44
- import date from 'date-and-time';
60
+ ```typescript
61
+ import { format } from 'date-and-time';
62
+ import Tokyo from 'date-and-time/timezones/Asia/Tokyo';
63
+ import ja from 'date-and-time/locales/ja';
64
+
65
+ const now = new Date();
66
+
67
+ format(now, 'YYYY/MM/DD HH:mm:ss');
68
+ // => 2015/01/01 23:14:05
69
+
70
+ format(now, 'ddd, MMM DD YYYY');
71
+ // => Thu, Jan 01 2015
72
+
73
+ format(now, 'ddd, MMM DD YYYY hh:mm A [GMT]Z', { timeZone: 'UTC' });
74
+ // => Fri, Jan 02 2015 07:14 AM GMT+0000
75
+
76
+ format(now, 'YYYY年MMMM月D日dddd Ah:mm:ss [GMT]Z', { timeZone: Tokyo, locale: ja });
77
+ // => 2015年1月2日金曜日 午後4:14:05 GMT+0900
45
78
  ```
46
79
 
47
- - CommonJS:
80
+ The tokens available for use in the format string specified as the second argument and their meanings are as follows:
81
+
82
+ | Token | Meaning | Output Examples |
83
+ |:---------|:--------------------------------------------|:----------------------|
84
+ | YYYY | 4-digit year | 0999, 2015 |
85
+ | YY | 2-digit year | 99, 01, 15 |
86
+ | Y | Year without zero padding | 2, 44, 888, 2015 |
87
+ | MMMM | Full month name | January, December |
88
+ | MMM | Short month name | Jan, Dec |
89
+ | MM | Month | 01, 12 |
90
+ | M | Month without zero padding | 1, 12 |
91
+ | DD | Day | 02, 31 |
92
+ | D | Day without zero padding | 2, 31 |
93
+ | dddd | Full day name | Friday, Sunday |
94
+ | ddd | Short day name | Fri, Sun |
95
+ | dd | Very short day name | Fr, Su |
96
+ | HH | Hour in 24-hour format | 23, 08 |
97
+ | H | Hour in 24-hour format without zero padding | 23, 8 |
98
+ | hh | Hour in 12-hour format | 11, 08 |
99
+ | h | Hour in 12-hour format without zero padding | 11, 8 |
100
+ | A | Uppercase AM/PM | AM, PM |
101
+ | AA | Uppercase AM/PM (with periods) | A.M., P.M. |
102
+ | a | Lowercase AM/PM | am, pm |
103
+ | aa | Lowercase AM/PM (with periods) | a.m., p.m. |
104
+ | mm | Minutes | 14, 07 |
105
+ | m | Minutes without zero padding | 14, 7 |
106
+ | ss | Seconds | 05, 10 |
107
+ | s | Seconds without zero padding | 5, 10 |
108
+ | SSS | 3-digit milliseconds | 753, 022 |
109
+ | SS | 2-digit milliseconds | 75, 02 |
110
+ | S | 1-digit milliseconds | 7, 0 |
111
+ | Z | Timezone offset | +0100, -0800 |
112
+ | ZZ | Timezone offset with colon | +01:00, -08:00 |
113
+
114
+ Additionally, by importing plugins, you can use the following tokens. For details, please refer to [PLUGINS.md](docs/PLUGINS.md).
115
+
116
+ | Token | Meaning | Output Examples |
117
+ |:---------|:--------------------------------------------|:----------------------|
118
+ | DDD | Ordinal representation of day | 1st, 2nd, 3rd |
119
+ | z | Short timezone name | PST, EST |
120
+ | zz | Long timezone name | Pacific Standard Time |
121
+
122
+ The breakdown of `FormatterOptions` that can be specified as the third argument is as follows:
123
+
124
+ <details>
125
+ <summary><strong>hour12</strong></summary>
126
+
127
+ - type: `h11 | h12`
128
+ - default: `h12`
129
+ - The hour format to use for formatting. This is used when the hour is in 12-hour format. It can be `h11` for 11-hour format or `h12` for 12-hour format.
130
+
131
+ ```typescript
132
+ format(now, 'dddd, MMMM D, YYYY [at] h:mm:ss.SSS A [GMT]ZZ', { hour12: 'h11' });
133
+ // Wednesday, July 23, 2025 at 0:12:54.814 AM GMT-07:00
134
+ ```
135
+
136
+ </details>
137
+
138
+ <details>
139
+ <summary><strong>hour24</strong></summary>
140
+
141
+ - type: `h23 | h24`
142
+ - default: `h23`
143
+ - The hour format to use for formatting. This is used when the hour is in 24-hour format. It can be `h23` for 23-hour format or `h24` for 24-hour format.
144
+
145
+ ```typescript
146
+ format(now, 'dddd, MMMM D, YYYY [at] H:mm:ss.SSS [GMT]ZZ', { hour24: 'h24' });
147
+ // => Wednesday, July 23, 2025 at 24:12:54.814 GMT-07:00
148
+ ```
48
149
 
49
- ```javascript
50
- const date = require('date-and-time');
150
+ </details>
151
+
152
+ <details>
153
+ <summary><strong>numeral</strong></summary>
154
+
155
+ - type: `Numeral`
156
+ - default: `latn`
157
+ - The numeral system to use for formatting numbers. This is an object that provides methods to encode and decode numbers in the specified numeral system.
158
+
159
+ ```typescript
160
+ import arab from 'date-and-time/numerals/arab';
161
+
162
+ format(now, 'DD/MM/YYYY', { numeral: arab });
163
+ // => ٠٨/٠٧/٢٠٢٥
51
164
  ```
52
165
 
53
- - ES Modules for the browser:
166
+ Currently, the following numeral systems are supported:
167
+
168
+ - `arab`
169
+ - `arabext`
170
+ - `beng`
171
+ - `latn`
172
+ - `mymr`
173
+
174
+ </details>
175
+
176
+ <details>
177
+ <summary><strong>calendar</strong></summary>
54
178
 
55
- ```html
56
- <script type="module">
57
- import date from '/path/to/date-and-time.es.min.js';
58
- </script>
179
+ - type: `buddhist | gregory`
180
+ - default: `gregory`
181
+ - The calendar system to use for formatting dates. This can be `buddhist` for Buddhist calendar or `gregory` for Gregorian calendar.
182
+
183
+ ```typescript
184
+ format(now, 'dddd, MMMM D, YYYY', { calendar: 'buddhist' });
185
+ // => Wednesday, July 23, 2568
59
186
  ```
60
187
 
61
- - Older browser:
188
+ </details>
189
+
190
+ <details>
191
+ <summary><strong>timeZone</strong></summary>
192
+
193
+ - type: `TimeZone | UTC`
194
+ - default: `undefined`
195
+ - The time zone to use for formatting dates and times. This can be a specific time zone object or `UTC` to use Coordinated Universal Time. If not specified, it defaults to undefined, which means the local time zone will be used.
196
+
197
+ ```typescript
198
+ import New_York from 'date-and-time/timezones/America/New_York';
62
199
 
63
- ```html
64
- <script src="/path/to/date-and-time.min.js">
65
- // You will be able to access the global variable `date`.
66
- </script>
200
+ format(now, 'dddd, MMMM D, YYYY [at] H:mm:ss.SSS [GMT]ZZ', { timeZone: New_York });
201
+ // => Wednesday, July 23, 2025 at 3:28:27.443 GMT-04:00
67
202
  ```
68
203
 
69
- ### Note
204
+ </details>
70
205
 
71
- - If you want to use ES Modules in Node.js without the transpiler, you need to add `"type": "module"` in your `package.json` or change your file extension from `.js` to `.mjs`.
206
+ <details>
207
+ <summary><strong>locale</strong></summary>
72
208
 
73
- ## API
209
+ - type: `Locale`
210
+ - default: `en`
211
+ - The locale to use for formatting dates and times. This is an object that provides methods to get localized month names, day names, and meridiems.
74
212
 
75
- - [format](#formatdateobj-arg-utc)
76
- - Formatting date and time objects (Date -> String)
213
+ ```typescript
214
+ import es from 'date-and-time/locales/es';
77
215
 
78
- - [parse](#parsedatestring-arg-utc)
79
- - Parsing date and time strings (String -> Date)
216
+ format(now, 'dddd, D [de] MMMM [de] YYYY, h:mm:ss.SSS aa [GMT]ZZ', { locale: es });
217
+ // => miércoles, 23 de julio de 2025, 12:38:08,533 a.m. GMT-07:00
218
+ ```
80
219
 
81
- - [compile](#compileformatstring)
82
- - Compiling format strings
220
+ <details>
221
+ <summary>Currently, the following locales are supported:</summary>
222
+
223
+ - `ar` (Arabic)
224
+ - `az` (Azerbaijani)
225
+ - `bn` (Bengali)
226
+ - `cs` (Czech)
227
+ - `da` (Danish)
228
+ - `de` (German)
229
+ - `el` (Greek)
230
+ - `en` (English)
231
+ - `es` (Spanish)
232
+ - `fa` (Persian)
233
+ - `fi` (Finnish)
234
+ - `fr` (French)
235
+ - `he` (Hebrew)
236
+ - `hi` (Hindi)
237
+ - `hu` (Hungarian)
238
+ - `id` (Indonesian)
239
+ - `it` (Italian)
240
+ - `ja` (Japanese)
241
+ - `ko` (Korean)
242
+ - `ms` (Malay)
243
+ - `my` (Burmese)
244
+ - `nl` (Dutch)
245
+ - `no` (Norwegian)
246
+ - `pl` (Polish)
247
+ - `pt-BR` (Brazilian Portuguese)
248
+ - `pt-PT` (European Portuguese)
249
+ - `ro` (Romanian)
250
+ - `ru` (Russian)
251
+ - `rw` (Kinyarwanda)
252
+ - `sr-Cyrl` (Serbian Cyrillic)
253
+ - `sr-Latn` (Serbian Latin)
254
+ - `sv` (Swedish)
255
+ - `ta` (Tamil)
256
+ - `th` (Thai)
257
+ - `tr` (Turkish)
258
+ - `uk` (Ukrainian)
259
+ - `uz-Cyrl` (Uzbek Cyrillic)
260
+ - `uz-Latn` (Uzbek Latin)
261
+ - `vi` (Vietnamese)
262
+ - `zh-Hans` (Simplified Chinese)
263
+ - `zh-Hant` (Traditional Chinese)
264
+
265
+ </details>
266
+ </details>
267
+
268
+ ### Notes
269
+
270
+ <details>
271
+ <summary><strong>Comments</strong></summary>
272
+
273
+ Parts of the format string enclosed in brackets are output as-is, regardless of whether they are valid tokens.
274
+
275
+ ```typescript
276
+ format(new Date(), 'DD-[MM]-YYYY'); // => '02-MM-2015'
277
+ format(new Date(), '[DD-[MM]-YYYY]'); // => 'DD-[MM]-YYYY'
278
+ ```
83
279
 
84
- - [preparse](#preparsedatestring-arg)
85
- - Pre-parsing date and time strings
280
+ </details>
86
281
 
87
- - [isValid](#isvalidarg1-arg2)
88
- - Date and time string validation
282
+ <details>
283
+ <summary><strong>Output as UTC timezone</strong></summary>
89
284
 
90
- - [transform](#transformdatestring-arg1-arg2-utc)
91
- - Format transformation of date and time strings (String -> String)
285
+ To output date and time as UTC timezone, specify the string `UTC` in the `timeZone` property of `FormatterOptions`.
92
286
 
93
- - [addYears](#addyearsdateobj-years-utc)
94
- - Adding years
287
+ ```typescript
288
+ format(new Date(), 'hh:mm A [GMT]Z');
289
+ // => '12:14 PM GMT-0700'
95
290
 
96
- - [addMonths](#addmonthsdateobj-months-utc)
97
- - Adding months
291
+ format(new Date(), 'hh:mm A [GMT]Z', { timeZone: 'UTC' });
292
+ // => '07:14 AM GMT+0000'
293
+ ```
98
294
 
99
- - [addDays](#adddaysdateobj-days-utc)
100
- - Adding days
295
+ </details>
296
+ </details>
101
297
 
102
- - [addHours](#addhoursdateobj-hours)
103
- - Adding hours
298
+ ## parse(dateString, arg[, options])
104
299
 
105
- - [addMinutes](#addminutesdateobj-minutes)
106
- - Adding minutes
300
+ <details>
301
+ <summary>Parses a date string according to the specified format.</summary>
107
302
 
108
- - [addSeconds](#addsecondsdateobj-seconds)
109
- - Adding seconds
303
+ - dateString
304
+ - type: `string`
305
+ - The date string to parse
306
+ - arg
307
+ - type: `string | CompiledObject`
308
+ - The format string or compiled object to match against the date string
309
+ - [options]
310
+ - type: `ParserOptions`
311
+ - Optional parser options for customization
110
312
 
111
- - [addMilliseconds](#addmillisecondsdateobj-milliseconds)
112
- - Adding milliseconds
313
+ ```typescript
314
+ import { parse } from 'date-and-time';
315
+ import Paris from 'date-and-time/timezones/Europe/Paris';
316
+ import fr from 'date-and-time/locales/fr';
113
317
 
114
- - [subtract](#subtractdate1-date2)
115
- - Subtracting two dates (date1 - date2)
318
+ parse('2015/01/02 23:14:05', 'YYYY/MM/DD HH:mm:ss');
319
+ // => Jan 02 2015 23:14:05 GMT-0800
116
320
 
117
- - [isLeapYear](#isleapyeary)
118
- - Whether a year is a leap year
321
+ parse('02-01-2015', 'DD-MM-YYYY');
322
+ // => Jan 02 2015 00:00:00 GMT-0800
119
323
 
120
- - [isSameDay](#issamedaydate1-date2)
121
- - Comparison of two dates
324
+ parse('11:14:05 PM', 'h:mm:ss A', { timeZone: 'UTC' });
325
+ // => Jan 02 1970 23:14:05 GMT+0000
122
326
 
123
- - [locale](#localelocale)
124
- - Changing locales
327
+ parse(
328
+ '02 janv. 2015, 11:14:05 PM', 'DD MMM YYYY, h:mm:ss A',
329
+ { timeZone: Paris, locale: fr }
330
+ );
331
+ // => Jan 02 2015 23:14:05 GMT+0100
125
332
 
126
- - [extend](#extendextension)
127
- - Functional extension
333
+ parse('Jam 1 2017', 'MMM D YYYY');
334
+ // => Invalid Date
335
+ ```
128
336
 
129
- - [plugin](#pluginplugin)
130
- - Importing plugins
337
+ The tokens available for use in the format string specified as the second argument and their meanings are as follows:
338
+
339
+ | Token | Meaning | Input Examples |
340
+ |:----------|:--------------------------------------------|:--------------------|
341
+ | YYYY | 4-digit year | 0999, 2015 |
342
+ | Y | Year without zero padding | 2, 44, 88, 2015 |
343
+ | MMMM | Full month name | January, December |
344
+ | MMM | Short month name | Jan, Dec |
345
+ | MM | Month | 01, 12 |
346
+ | M | Month without zero padding | 1, 12 |
347
+ | DD | Day | 02, 31 |
348
+ | D | Day without zero padding | 2, 31 |
349
+ | HH | Hour in 24-hour format | 23, 08 |
350
+ | H | Hour in 24-hour format without zero padding | 23, 8 |
351
+ | hh | Hour in 12-hour format | 11, 08 |
352
+ | h | Hour in 12-hour format without zero padding | 11, 8 |
353
+ | A | Uppercase AM/PM | AM, PM |
354
+ | AA | Uppercase AM/PM (with periods) | A.M., P.M. |
355
+ | a | Lowercase AM/PM | am, pm |
356
+ | aa | Lowercase AM/PM (with periods) | a.m., p.m. |
357
+ | mm | Minutes | 14, 07 |
358
+ | m | Minutes without zero padding | 14, 7 |
359
+ | ss | Seconds | 05, 10 |
360
+ | s | Seconds without zero padding | 5, 10 |
361
+ | SSS | 3-digit milliseconds | 753, 022 |
362
+ | SS | 2-digit milliseconds | 75, 02 |
363
+ | S | 1-digit milliseconds | 7, 0 |
364
+ | Z | Timezone offset | +0100, -0800 |
365
+ | ZZ | Timezone offset with colon | +01:00, -08:00 |
366
+
367
+ Additionally, by importing plugins, you can use the following tokens. For details, please refer to [PLUGINS.md](docs/PLUGINS.md).
368
+
369
+ | Token | Meaning | Input Examples |
370
+ |:----------|:-------------------------------------------|:---------------------|
371
+ | YY | 2-digit year | 90, 00, 08, 19 |
372
+ | DDD | Ordinal representation of day | 1st, 2nd, 3rd |
373
+ | dddd | Full day name | Friday, Sunday |
374
+ | ddd | Short day name | Fri, Sun |
375
+ | dd | Very short day name | Fr, Su |
376
+ | SSSSSS | 6-digit milliseconds | 123456, 000001 |
377
+ | SSSSS | 5-digit milliseconds | 12345, 00001 |
378
+ | SSSS | 4-digit milliseconds | 1234, 0001 |
379
+ | fff | 3-digit microseconds | 753, 022 |
380
+ | ff | 2-digit microseconds | 75, 02 |
381
+ | f | 1-digit microseconds | 7, 0 |
382
+ | SSSSSSSSS | 9-digit milliseconds | 123456789, 000000001 |
383
+ | SSSSSSSS | 8-digit milliseconds | 12345678, 00000001 |
384
+ | SSSSSSS | 7-digit milliseconds | 1234567, 0000001 |
385
+ | FFF | 3-digit nanoseconds | 753, 022 |
386
+ | FF | 2-digit nanoseconds | 75, 02 |
387
+ | F | 1-digit nanoseconds | 7, 0 |
388
+
389
+ The breakdown of `ParserOptions` that can be specified as the third argument is as follows:
390
+
391
+ <details>
392
+ <summary><strong>hour12</strong></summary>
393
+
394
+ - type: `h11 | h12`
395
+ - default: `h12`
396
+ - The hour format to use for parsing. This is used when the hour is in 12-hour format. It can be `h11` for 11-hour format (0 - 11) or `h12` for 12-hour format (1 - 12).
397
+
398
+ ```typescript
399
+ parse('0:12:54 PM', 'h:mm:ss A', { hour12: 'h11' });
400
+ // => Jan 01 1970 12:12:54 GMT-0800
401
+ ```
131
402
 
132
- ### format(dateObj, arg[, utc])
403
+ </details>
133
404
 
134
- - @param {**Date**} dateObj - A Date object
135
- - @param {**string|Array.\<string\>**} arg - A format string or its compiled object
136
- - @param {**boolean**} [utc] - Output as UTC
137
- - @returns {**string**} A formatted string
405
+ <details>
406
+ <summary><strong>hour24</strong></summary>
138
407
 
139
- ```javascript
140
- const now = new Date();
141
- date.format(now, 'YYYY/MM/DD HH:mm:ss'); // => '2015/01/02 23:14:05'
142
- date.format(now, 'ddd, MMM DD YYYY'); // => 'Fri, Jan 02 2015'
143
- date.format(now, 'hh:mm A [GMT]Z'); // => '11:14 PM GMT-0800'
144
- date.format(now, 'hh:mm A [GMT]Z', true); // => '07:14 AM GMT+0000'
145
-
146
- const pattern = date.compile('ddd, MMM DD YYYY');
147
- date.format(now, pattern); // => 'Fri, Jan 02 2015'
148
- ```
149
-
150
- Available tokens and their meanings are as follows:
151
-
152
- | token | meaning | examples of output |
153
- |:------|:-------------------------------------|:-------------------|
154
- | YYYY | four-digit year | 0999, 2015 |
155
- | YY | two-digit year | 99, 01, 15 |
156
- | Y | four-digit year without zero-padding | 2, 44, 888, 2015 |
157
- | MMMM | month name (long) | January, December |
158
- | MMM | month name (short) | Jan, Dec |
159
- | MM | month with zero-padding | 01, 12 |
160
- | M | month | 1, 12 |
161
- | DD | date with zero-padding | 02, 31 |
162
- | D | date | 2, 31 |
163
- | dddd | day of week (long) | Friday, Sunday |
164
- | ddd | day of week (short) | Fri, Sun |
165
- | dd | day of week (very short) | Fr, Su |
166
- | HH | 24-hour with zero-padding | 23, 08 |
167
- | H | 24-hour | 23, 8 |
168
- | hh | 12-hour with zero-padding | 11, 08 |
169
- | h | 12-hour | 11, 8 |
170
- | A | meridiem (uppercase) | AM, PM |
171
- | mm | minute with zero-padding | 14, 07 |
172
- | m | minute | 14, 7 |
173
- | ss | second with zero-padding | 05, 10 |
174
- | s | second | 5, 10 |
175
- | SSS | millisecond (high accuracy) | 753, 022 |
176
- | SS | millisecond (middle accuracy) | 75, 02 |
177
- | S | millisecond (low accuracy) | 7, 0 |
178
- | Z | time zone offset value | +0100, -0800 |
179
- | ZZ | time zone offset value with colon | +01:00, -08:00 |
180
-
181
- You can also use the following tokens by importing plugins. See [PLUGINS.md](./PLUGINS.md) for details.
182
-
183
- | token | meaning | examples of output |
184
- |:------|:-------------------------------------|:----------------------|
185
- | DDD | ordinal notation of date | 1st, 2nd, 3rd |
186
- | AA | meridiem (uppercase with ellipsis) | A.M., P.M. |
187
- | a | meridiem (lowercase) | am, pm |
188
- | aa | meridiem (lowercase with ellipsis) | a.m., p.m. |
189
- | z | time zone name abbreviation | PST, EST |
190
- | zz | time zone name | Pacific Standard Time |
191
-
192
- #### Note 1. Comments
193
-
194
- Parts of the given format string enclosed in square brackets are considered comments and are output as is, regardless of whether they are tokens or not.
195
-
196
- ```javascript
197
- date.format(new Date(), 'DD-[MM]-YYYY'); // => '02-MM-2015'
198
- date.format(new Date(), '[DD-[MM]-YYYY]'); // => 'DD-[MM]-YYYY'
199
- ```
200
-
201
- #### Note 2. Output as UTC
202
-
203
- This function outputs the date and time in the local time zone of the execution environment by default. If you want to output in UTC, set the UTC option (the third argument) to true. To output in any other time zone, you will need [a plugin](./PLUGINS.md).
204
-
205
- ```javascript
206
- date.format(new Date(), 'hh:mm A [GMT]Z'); // => '11:14 PM GMT-0800'
207
- date.format(new Date(), 'hh:mm A [GMT]Z', true); // => '07:14 AM GMT+0000'
208
- ```
209
-
210
- #### Note 3. More Tokens
211
-
212
- You can also define your own tokens. See [EXTEND.md](./EXTEND.md) for details.
213
-
214
- ### parse(dateString, arg[, utc])
215
-
216
- - @param {**string**} dateString - A date and time string
217
- - @param {**string|Array.\<string\>**} arg - A format string or its compiled object
218
- - @param {**boolean**} [utc] - Input as UTC
219
- - @returns {**Date**} A Date object
220
-
221
- ```javascript
222
- date.parse('2015/01/02 23:14:05', 'YYYY/MM/DD HH:mm:ss'); // => Jan 2 2015 23:14:05 GMT-0800
223
- date.parse('02-01-2015', 'DD-MM-YYYY'); // => Jan 2 2015 00:00:00 GMT-0800
224
- date.parse('11:14:05 PM', 'hh:mm:ss A'); // => Jan 1 1970 23:14:05 GMT-0800
225
- date.parse('11:14:05 PM', 'hh:mm:ss A', true); // => Jan 1 1970 23:14:05 GMT+0000 (Jan 1 1970 15:14:05 GMT-0800)
226
- date.parse('23:14:05 GMT+0900', 'HH:mm:ss [GMT]Z'); // => Jan 1 1970 23:14:05 GMT+0900 (Jan 1 1970 06:14:05 GMT-0800)
227
- date.parse('Jam 1 2017', 'MMM D YYYY'); // => Invalid Date
228
- date.parse('Feb 29 2017', 'MMM D YYYY'); // => Invalid Date
229
- ```
230
-
231
- Available tokens and their meanings are as follows:
232
-
233
- | token | meaning | examples of acceptable form |
234
- |:-------|:-------------------------------------|:----------------------------|
235
- | YYYY | four-digit year | 0999, 2015 |
236
- | Y | four-digit year without zero-padding | 2, 44, 88, 2015 |
237
- | MMMM | month name (long) | January, December |
238
- | MMM | month name (short) | Jan, Dec |
239
- | MM | month with zero-padding | 01, 12 |
240
- | M | month | 1, 12 |
241
- | DD | date with zero-padding | 02, 31 |
242
- | D | date | 2, 31 |
243
- | HH | 24-hour with zero-padding | 23, 08 |
244
- | H | 24-hour | 23, 8 |
245
- | hh | 12-hour with zero-padding | 11, 08 |
246
- | h | 12-hour | 11, 8 |
247
- | A | meridiem (uppercase) | AM, PM |
248
- | mm | minute with zero-padding | 14, 07 |
249
- | m | minute | 14, 7 |
250
- | ss | second with zero-padding | 05, 10 |
251
- | s | second | 5, 10 |
252
- | SSS | millisecond (high accuracy) | 753, 022 |
253
- | SS | millisecond (middle accuracy) | 75, 02 |
254
- | S | millisecond (low accuracy) | 7, 0 |
255
- | Z | time zone offset value | +0100, -0800 |
256
- | ZZ | time zone offset value with colon | +01:00, -08:00 |
257
-
258
- You can also use the following tokens by importing plugins. See [PLUGINS.md](./PLUGINS.md) for details.
259
-
260
- | token | meaning | examples of acceptable form |
261
- |:-------|:-------------------------------------|:----------------------------|
262
- | YY | two-digit year | 90, 00, 08, 19 |
263
- | AA | meridiem (uppercase with ellipsis) | A.M., P.M. |
264
- | a | meridiem (lowercase) | am, pm |
265
- | aa | meridiem (lowercase with ellipsis) | a.m., p.m. |
266
- | dddd | day of week (long) | Friday, Sunday |
267
- | ddd | day of week (short) | Fri, Sun |
268
- | dd | day of week (very short) | Fr, Su |
269
- | SSSSSS | microsecond (high accuracy) | 123456, 000001 |
270
- | SSSSS | microsecond (middle accuracy) | 12345, 00001 |
271
- | SSSS | microsecond (low accuracy) | 1234, 0001 |
272
-
273
- #### Note 1. Invalid Date
408
+ - type: `h23 | h24`
409
+ - default: `h23`
410
+ - The hour format to use for parsing. This is used when the hour is in 24-hour format. It can be `h23` for 23-hour format (0 - 23) or `h24` for 24-hour format (1 - 24).
411
+
412
+ ```typescript
413
+ parse('24:12:54', 'h:mm:ss', { hour24: 'h24' });
414
+ // => Jan 01 1970 00:12:54 GMT-0800
415
+ ```
416
+
417
+ </details>
418
+
419
+ <details>
420
+ <summary><strong>numeral</strong></summary>
421
+
422
+ - type: `Numeral`
423
+ - default: `latn`
424
+ - The numeral system to use for parsing numbers. This is an object that provides methods to encode and decode numbers in the specified numeral system.
425
+
426
+ ```typescript
427
+ import arab from 'date-and-time/numerals/arab';
428
+
429
+ parse('٠٨/٠٧/٢٠٢٥', 'DD/MM/YYYY', { numeral: arab });
430
+ // => July 09 2025 00:00:00 GMT-0700
431
+ ```
432
+
433
+ Currently, the following numeral systems are supported:
434
+
435
+ - `arab`
436
+ - `arabext`
437
+ - `beng`
438
+ - `latn`
439
+ - `mymr`
440
+
441
+ </details>
442
+
443
+ <details>
444
+ <summary><strong>calendar</strong></summary>
445
+
446
+ - type: `buddhist | gregory`
447
+ - default: `gregory`
448
+ - The calendar system to use for parsing dates. This can be `buddhist` for Buddhist calendar or `gregory` for Gregorian calendar.
449
+
450
+ ```typescript
451
+ parse('July 09 2025', 'MMMM DD YYYY', { calendar: 'buddhist' });
452
+ // => July 09 1482 00:00:00 GMT-0752
453
+ // Note: Buddhist calendar is 543 years ahead of Gregorian calendar,
454
+ // so 2025 BE (Buddhist Era) equals 1482 CE (Common Era)
455
+ ```
456
+
457
+ </details>
458
+
459
+ <details>
460
+ <summary><strong>ignoreCase</strong></summary>
461
+
462
+ - type: `boolean`
463
+ - default: `false`
464
+ - Whether to ignore case when matching strings. This is useful for matching month names, day names, and meridiems in a case-insensitive manner. If true, the parser will convert both the input string and the strings in the locale to lowercase before matching.
465
+
466
+ ```typescript
467
+ parse('july 09 2025', 'MMMM DD YYYY', { ignoreCase: true });
468
+ // => July 09 2025 00:00:00 GMT-0700
469
+ ```
470
+
471
+ </details>
472
+
473
+ <details>
474
+ <summary><strong>timeZone</strong></summary>
475
+
476
+ - type: `TimeZone | UTC`
477
+ - default: `undefined`
478
+ - The time zone to use for parsing dates and times. This can be a specific time zone object or `UTC` to use Coordinated Universal Time. If not specified, it defaults to undefined, which means the local time zone will be used.
479
+
480
+ ```typescript
481
+ import New_York from 'date-and-time/timezones/America/New_York';
482
+
483
+ parse('July 09 2025, 12:34:56', 'MMMM D YYYY, H:mm:ss', { timeZone: New_York });
484
+ // => July 09 2025 09:34:56 GMT-0700 (July 09 2025 12:34:56 GMT-0400)
485
+
486
+ parse('July 09 2025, 12:34:56', 'MMMM D YYYY, H:mm:ss', { timeZone: 'UTC' });
487
+ // => July 09 2025 05:34:56 GMT-0700 (July 09 2025 12:34:56 GMT+0000)
488
+ ```
489
+
490
+ </details>
491
+
492
+ <details>
493
+ <summary><strong>locale</strong></summary>
494
+
495
+ - type: `Locale`
496
+ - default: `en`
497
+ - The locale to use for parsing dates and times. This is an object that provides methods to get localized month names, day names, and meridiems.
498
+
499
+ ```typescript
500
+ import es from 'date-and-time/locales/es';
501
+
502
+ parse(
503
+ '23 de julio de 2025, 12:38:08,533 a.m. GMT-07:00',
504
+ 'D [de] MMMM [de] YYYY, h:mm:ss,SSS aa [GMT]ZZ',
505
+ { locale: es }
506
+ );
507
+ // => July 23 2025 12:38:08.533 GMT-0700
508
+ ```
509
+
510
+ <details>
511
+ <summary>Currently, the following locales are supported:</summary>
512
+
513
+ - `ar` (Arabic)
514
+ - `az` (Azerbaijani)
515
+ - `bn` (Bengali)
516
+ - `cs` (Czech)
517
+ - `da` (Danish)
518
+ - `de` (German)
519
+ - `el` (Greek)
520
+ - `en` (English)
521
+ - `es` (Spanish)
522
+ - `fa` (Persian)
523
+ - `fi` (Finnish)
524
+ - `fr` (French)
525
+ - `he` (Hebrew)
526
+ - `hi` (Hindi)
527
+ - `hu` (Hungarian)
528
+ - `id` (Indonesian)
529
+ - `it` (Italian)
530
+ - `ja` (Japanese)
531
+ - `ko` (Korean)
532
+ - `ms` (Malay)
533
+ - `my` (Burmese)
534
+ - `nl` (Dutch)
535
+ - `no` (Norwegian)
536
+ - `pl` (Polish)
537
+ - `pt-BR` (Brazilian Portuguese)
538
+ - `pt-PT` (European Portuguese)
539
+ - `ro` (Romanian)
540
+ - `ru` (Russian)
541
+ - `rw` (Kinyarwanda)
542
+ - `sr-Cyrl` (Serbian Cyrillic)
543
+ - `sr-Latn` (Serbian Latin)
544
+ - `sv` (Swedish)
545
+ - `ta` (Tamil)
546
+ - `th` (Thai)
547
+ - `tr` (Turkish)
548
+ - `uk` (Ukrainian)
549
+ - `uz-Cyrl` (Uzbek Cyrillic)
550
+ - `uz-Latn` (Uzbek Latin)
551
+ - `vi` (Vietnamese)
552
+ - `zh-Hans` (Simplified Chinese)
553
+ - `zh-Hant` (Traditional Chinese)
554
+
555
+ </details>
556
+ </details>
557
+
558
+ ### Notes
559
+
560
+ <details>
561
+ <summary><strong>When parsing fails</strong></summary>
274
562
 
275
563
  If this function fails to parse, it will return `Invalid Date`. Notice that the `Invalid Date` is a Date object, not `NaN` or `null`. You can tell whether the Date object is invalid as follows:
276
564
 
277
- ```javascript
278
- const today = date.parse('Jam 1 2017', 'MMM D YYYY');
565
+ ```typescript
566
+ const today = parse('Jam 1 2017', 'MMM D YYYY');
279
567
 
280
568
  if (isNaN(today.getTime())) {
281
- // Failure
569
+ console.error('Parsing failed');
282
570
  }
283
571
  ```
284
572
 
285
- #### Note 2. Input as UTC
573
+ </details>
574
+
575
+ <details>
576
+ <summary><strong>Input as UTC timezone</strong></summary>
577
+
578
+ If the `dateString` does not contain a timezone offset and the `timeZone` property of the third argument is not specified, this function considers the `dateString` to be in the local timezone. If you want to process a `dateString` without a timezone offset as UTC timezone, set the string `UTC` to the `timeZone` property in the third argument. Note that the timezone offset contained in the `dateString` takes precedence over the `timeZone` property of the third argument.
286
579
 
287
- This function uses the local time zone offset value of the execution environment by default if the given string does not contain a time zone offset value. To make it use UTC instead, set the UTC option (the third argument) to true. If you want it to use any other time zone, you will need [a plugin](./PLUGINS.md).
580
+ ```typescript
581
+ parse('11:14:05 PM', 'hh:mm:ss A');
582
+ // => Jan 1 1970 23:14:05 GMT-0800
288
583
 
289
- ```javascript
290
- date.parse('11:14:05 PM', 'hh:mm:ss A'); // => Jan 1 1970 23:14:05 GMT-0800
291
- date.parse('11:14:05 PM', 'hh:mm:ss A', true); // => Jan 1 1970 23:14:05 GMT+0000 (Jan 1 1970 15:14:05 GMT-0800)
584
+ parse('11:14:05 PM GMT+0000', 'hh:mm:ss A [GMT]Z');
585
+ // => Jan 1 1970 23:14:05 GMT+0000
586
+
587
+ parse('11:14:05 PM', 'hh:mm:ss A', { timeZone: 'UTC' });
588
+ // => Jan 1 1970 23:14:05 GMT+0000
292
589
  ```
293
590
 
294
- #### Note 3. Default Date Time
591
+ </details>
592
+
593
+ <details>
594
+ <summary><strong>Default Date Time</strong></summary>
295
595
 
296
- Default date is `January 1, 1970`, time is `00:00:00.000`. Values not passed will be complemented with them:
596
+ Default date is `January 1, 1970`, time is `00:00:00.000`. Any date/time components not specified in the input string will be filled with these default values.
297
597
 
298
- ```javascript
299
- date.parse('11:14:05 PM', 'hh:mm:ss A'); // => Jan 1 1970 23:14:05 GMT-0800
300
- date.parse('Feb 2000', 'MMM YYYY'); // => Feb 1 2000 00:00:00 GMT-0800
598
+ ```typescript
599
+ parse('11:14:05 PM', 'hh:mm:ss A');
600
+ // => Jan 1 1970 23:14:05 GMT-0800
601
+
602
+ parse('Feb 2000', 'MMM YYYY');
603
+ // => Feb 1 2000 00:00:00 GMT-0800
301
604
  ```
302
605
 
303
- #### Note 4. Max Date / Min Date
606
+ </details>
607
+
608
+ <details>
609
+ <summary><strong>Max Date / Min Date</strong></summary>
304
610
 
305
- Parsable maximum date is `December 31, 9999`, minimum date is `January 1, 0001`.
611
+ The parsable maximum date is `December 31, 9999`, and the minimum date is `January 1, 0001`.
306
612
 
307
- ```javascript
308
- date.parse('Dec 31 9999', 'MMM D YYYY'); // => Dec 31 9999 00:00:00 GMT-0800
309
- date.parse('Dec 31 10000', 'MMM D YYYY'); // => Invalid Date
613
+ ```typescript
614
+ parse('Dec 31 9999', 'MMM D YYYY');
615
+ // => Dec 31 9999 00:00:00 GMT-0800
310
616
 
311
- date.parse('Jan 1 0001', 'MMM D YYYY'); // => Jan 1 0001 00:00:00 GMT-0800
312
- date.parse('Jan 1 0000', 'MMM D YYYY'); // => Invalid Date
617
+ parse('Dec 31 10000', 'MMM D YYYY');
618
+ // => Invalid Date
619
+
620
+ parse('Jan 1 0001', 'MMM D YYYY');
621
+ // => Jan 1 0001 00:00:00 GMT-0800
622
+
623
+ parse('Jan 1 0000', 'MMM D YYYY');
624
+ // => Invalid Date
313
625
  ```
314
626
 
315
- #### Note 5. 12-hour notation and Meridiem
627
+ </details>
628
+
629
+ <details>
630
+ <summary><strong>12-hour notation and Meridiem</strong></summary>
316
631
 
317
- If use `hh` or `h` (12-hour) token, use together `A` (meridiem) token to get the right value.
632
+ If you use the `hh` or `h` (12-hour) token, use it together with the `A` (meridiem) token to get the correct value.
318
633
 
319
- ```javascript
320
- date.parse('11:14:05', 'hh:mm:ss'); // => Jan 1 1970 11:14:05 GMT-0800
321
- date.parse('11:14:05 PM', 'hh:mm:ss A'); // => Jan 1 1970 23:14:05 GMT-0800
634
+ ```typescript
635
+ parse('11:14:05', 'hh:mm:ss');
636
+ // => Jan 1 1970 11:14:05 GMT-0800
637
+
638
+ parse('11:14:05 PM', 'hh:mm:ss A');
639
+ // => Jan 1 1970 23:14:05 GMT-0800
322
640
  ```
323
641
 
324
- #### Note 6. Token invalidation
642
+ </details>
643
+
644
+ <details>
645
+ <summary><strong>Token invalidation</strong></summary>
325
646
 
326
647
  Any part of the given format string that you do not want to be recognized as a token should be enclosed in square brackets. They are considered comments and will not be parsed.
327
648
 
328
- ```javascript
329
- date.parse('12 hours 34 minutes', 'HH hours mm minutes'); // => Invalid Date
330
- date.parse('12 hours 34 minutes', 'HH [hours] mm [minutes]'); // => Jan 1 1970 12:34:00 GMT-0800
649
+ ```typescript
650
+ parse('12 hours 34 minutes', 'HH hours mm minutes');
651
+ // => Invalid Date
652
+
653
+ parse('12 hours 34 minutes', 'HH [hours] mm [minutes]');
654
+ // => Jan 1 1970 12:34:00 GMT-0800
331
655
  ```
332
656
 
333
- #### Note 7. Wildcard
657
+ </details>
334
658
 
335
- Whitespace acts as a wildcard token. This token will not parse the corresponding parts of the date and time strings. This behavior is similar to enclosing part of a format string in square brackets (Token invalidation), but with the flexibility that the contents do not have to match, as long as the number of characters in the corresponding parts match.
659
+ <details>
660
+ <summary><strong>Wildcard</strong></summary>
336
661
 
337
- ```javascript
662
+ Whitespace acts as a wildcard token. This token will skip parsing the corresponding parts of the date and time strings. This behavior is similar to enclosing part of a format string in square brackets (Token invalidation), but with the flexibility that the contents do not have to match exactly - only the character count needs to match between the format string and input string.
663
+
664
+ ```typescript
338
665
  // This will be an error.
339
- date.parse('2015/01/02 11:14:05', 'YYYY/MM/DD'); // => Invalid Date
340
- // Adjust the length of the format string by appending white spaces of the same length as a part to ignore to the end of it.
341
- date.parse('2015/01/02 11:14:05', 'YYYY/MM/DD '); // => Jan 2 2015 00:00:00 GMT-0800
666
+ parse('2015/01/02 11:14:05', 'YYYY/MM/DD');
667
+ // => Invalid Date
668
+
669
+ parse('2015/01/02 11:14:05', 'YYYY/MM/DD ');
670
+ // => Jan 2 2015 00:00:00 GMT-0800
342
671
  ```
343
672
 
344
- #### Note 8. Ellipsis
673
+ </details>
674
+
675
+ <details>
676
+ <summary><strong>Ellipsis</strong></summary>
345
677
 
346
- `...` token ignores subsequent corresponding date and time strings. Use this token only at the end of a format string. The above example can be also written like this:
678
+ `...` token ignores subsequent corresponding date and time strings. Use this token only at the end of a format string. The above example can also be written like this:
347
679
 
348
- ```javascript
349
- date.parse('2015/01/02 11:14:05', 'YYYY/MM/DD...'); // => Jan 2 2015 00:00:00 GMT-0800
680
+ ```typescript
681
+ parse('2015/01/02 11:14:05', 'YYYY/MM/DD...');
682
+ // => Jan 2 2015 00:00:00 GMT-0800
350
683
  ```
351
684
 
352
- ### compile(formatString)
685
+ </details>
686
+ </details>
353
687
 
354
- - @param {**string**} formatString - A format string
355
- - @returns {**Array.\<string\>**} A compiled object
688
+ ## compile(formatString)
356
689
 
357
- If you are going to execute the `format()`, the `parse()` or the `isValid()` so many times with one string format, recommended to precompile and reuse it for performance.
690
+ <details>
691
+ <summary>Compiles a format string into a tokenized array for efficient parsing and formatting.</summary>
358
692
 
359
- ```javascript
360
- const pattern = date.compile('MMM D YYYY h:m:s A');
693
+ - formatString
694
+ - type: `string`
695
+ - The format string to compile
361
696
 
362
- date.parse('Mar 22 2019 2:54:21 PM', pattern);
363
- date.parse('Jul 27 2019 4:15:24 AM', pattern);
364
- date.parse('Dec 25 2019 3:51:11 AM', pattern);
697
+ If you are going to execute the `format`, `parse`, or `isValid` functions many times with one string format, it is recommended to precompile and reuse it for performance.
365
698
 
366
- date.format(new Date(), pattern); // => Mar 16 2020 6:24:56 PM
699
+ ```typescript
700
+ import { compile, parse, format } from 'date-and-time';
701
+
702
+ const pattern = compile('MMM D YYYY h:m:s A');
703
+
704
+ parse('Mar 22 2019 2:54:21 PM', pattern);
705
+ parse('Jul 27 2019 4:15:24 AM', pattern);
706
+ parse('Dec 25 2019 3:51:11 AM', pattern);
707
+
708
+ format(new Date(), pattern);
709
+ // => Mar 16 2020 6:24:56 PM
367
710
  ```
368
711
 
369
- ### preparse(dateString, arg)
712
+ </details>
713
+
714
+ ## preparse(dateString, arg[, options])
370
715
 
371
- - @param {**string**} dateString - A date and time string
372
- - @param {**string|Array.\<string\>**} arg - A format string or its compiled object
373
- - @returns {**Object**} A pre-parsed result object
716
+ <details>
717
+ <summary>Preparses a date string according to the specified pattern.</summary>
374
718
 
375
- This function takes exactly the same parameters with the `parse()`, but returns a date structure as follows unlike that:
719
+ - dateString
720
+ - type: `string`
721
+ - The date string to preparse
722
+ - arg
723
+ - type: `string | CompiledObject`
724
+ - The pattern string or compiled object to match against the date string
725
+ - [options]
726
+ - type: `ParserOptions`
727
+ - Optional parser options
376
728
 
377
- ```javascript
378
- date.preparse('Fri Jan 2015 02 23:14:05 GMT-0800', ' MMM YYYY DD HH:mm:ss [GMT]Z');
729
+ ```typescript
730
+ import { preparse } from 'date-and-time';
731
+
732
+ preparse('Jan 2015 02 23:14:05 GMT-0800', 'MMM YYYY DD HH:mm:ss [GMT]Z');
379
733
 
380
734
  {
381
- Y: 2015, // Year
382
- M: 1, // Month
383
- D: 2, // Day
384
- H: 23, // 24-hour
385
- A: 0, // Meridiem
386
- h: 0, // 12-hour
387
- m: 14, // Minute
388
- s: 5, // Second
389
- S: 0, // Millisecond
390
- Z: 480, // Timsezone offset
391
- _index: 33, // Pointer offset
392
- _length: 33, // Length of the date string
393
- _match: 7 // Token matching count
735
+ Y: 2015, // Year
736
+ M: 1, // Month
737
+ D: 2, // Day
738
+ H: 23, // Hour (24-hour)
739
+ m: 14, // Minute
740
+ s: 5, // Second
741
+ Z: 480, // Timezone offset in minutes
742
+ _index: 29, // Current parsing position
743
+ _length: 29, // Total length of date string
744
+ _match: 7 // Number of matched tokens
394
745
  }
395
746
  ```
396
747
 
397
- This date structure provides a parsing result. You will be able to tell from it how the date string was parsed(, or why the parsing was failed).
748
+ This date structure provides a parsing result. You will be able to tell from it how the date string was parsed (or why the parsing failed).
749
+
750
+ </details>
398
751
 
399
- ### isValid(arg1[, arg2])
752
+ ## isValid(dateString, arg[, options])
400
753
 
401
- - @param {**Object|string**} arg1 - A pre-parsed result object or a date and time string
402
- - @param {**string|Array.\<string\>**} [arg2] - A format string or its compiled object
403
- - @returns {**boolean**} Whether the date and time string is a valid date and time
754
+ <details>
755
+ <summary>Validates whether a date string is valid according to the specified format.</summary>
404
756
 
405
- This function takes either exactly the same parameters with the `parse()` or a date structure which the `preparse()` returns, evaluates the validity of them.
757
+ - dateString
758
+ - type: `string`
759
+ - The date string to validate
760
+ - arg
761
+ - type: `string | CompiledObject`
762
+ - The format string or compiled object
763
+ - [options]
764
+ - type: `ParserOptions`
765
+ - Optional parser options
406
766
 
407
- ```javascript
408
- date.isValid('2015/01/02 23:14:05', 'YYYY/MM/DD HH:mm:ss'); // => true
409
- date.isValid('29-02-2015', 'DD-MM-YYYY'); // => false
767
+ ```typescript
768
+ isValid('2015/01/02 23:14:05', 'YYYY/MM/DD HH:mm:ss'); // => true
769
+ isValid('29-02-2015', 'DD-MM-YYYY'); // => false
410
770
  ```
411
771
 
412
- ```javascript
413
- const result = date.preparse('2015/01/02 23:14:05', 'YYYY/MM/DD HH:mm:ss');
414
- date.isValid(result); // => true
772
+ For details about `ParserOptions`, refer to the `parse` function section.
773
+
774
+ </details>
775
+
776
+ ## transform(dateString, arg1, arg2[, options1[, options2]])
777
+
778
+ <details>
779
+ <summary>Transforms a date string from one format to another.</summary>
780
+
781
+ - dateString
782
+ - type: `string`
783
+ - The date string to transform
784
+ - arg1
785
+ - type: `string | CompiledObject`
786
+ - The format string or compiled object for parsing
787
+ - arg2
788
+ - type: `string | CompiledObject`
789
+ - The format string or compiled object for formatting
790
+ - [options1]
791
+ - type: `ParserOptions`
792
+ - Optional parser options
793
+ - [options2]
794
+ - type: `FormatterOptions`
795
+ - Optional formatter options
796
+
797
+ This is a syntactic sugar for combining `parse` and `format` processing to convert date formats in a single function. It converts `dateString` to `arg2` format. Actually, it parses the `dateString` in `arg1` format and then formats it in `arg2` format.
798
+
799
+ ```typescript
800
+ import { transform } from 'date-and-time';
801
+ import New_York from 'date-and-time/timezones/America/New_York';
802
+ import Los_Angeles from 'date-and-time/timezones/America/Los_Angeles';
803
+
804
+ // Swap the order of month and day
805
+ transform('3/8/2020', 'D/M/YYYY', 'M/D/YYYY');
806
+ // => 8/3/2020
807
+
808
+ // Convert 24-hour format to 12-hour format
809
+ transform('13:05', 'HH:mm', 'hh:mm A');
810
+ // => 01:05 PM
811
+
812
+ // Convert EST to PST
813
+ transform(
814
+ '3/8/2020 1:05 PM', 'D/M/YYYY h:mm A', 'D/M/YYYY h:mm A',
815
+ { timeZone: New_York }, { timeZone: Los_Angeles }
816
+ );
817
+ // => 3/8/2020 10:05 AM
415
818
  ```
416
819
 
417
- ### transform(dateString, arg1, arg2[, utc])
820
+ For details about `ParserOptions`, refer to the `parse` function section. For details about `FormatterOptions`, refer to the `format` function section.
418
821
 
419
- - @param {**string**} dateString - A date and time string
420
- - @param {**string|Array.\<string\>**} arg1 - A format string or its compiled object before transformation
421
- - @param {**string|Array.\<string\>**} arg2 - A format string or its compiled object after transformation
422
- - @param {**boolean**} [utc] - Output as UTC
423
- - @returns {**string**} A formatted string
822
+ </details>
424
823
 
425
- This function transforms the format of a date string. The 2nd parameter, `arg1`, is the format string of it. Available token list is equal to the `parse()`'s. The 3rd parameter, `arg2`, is the transformed format string. Available token list is equal to the `format()`'s.
824
+ ## addYears(dateObj, years[, timeZone])
426
825
 
427
- ```javascript
428
- // 3/8/2020 => 8/3/2020
429
- date.transform('3/8/2020', 'D/M/YYYY', 'M/D/YYYY');
826
+ <details>
827
+ <summary>Adds the specified number of years to a Date object.</summary>
430
828
 
431
- // 13:05 => 01:05 PM
432
- date.transform('13:05', 'HH:mm', 'hh:mm A');
433
- ```
829
+ - dateObj
830
+ - type: `Date`
831
+ - The Date object to modify
832
+ - years
833
+ - type: `number`
834
+ - The number of years to add
835
+ - [timeZone]
836
+ - type: `TimeZone | UTC`
837
+ - Optional time zone object or `UTC`
434
838
 
435
- ### addYears(dateObj, years[, utc])
839
+ ```typescript
840
+ import { addYears } from 'date-and-time';
841
+ import Los_Angeles from 'date-and-time/timezones/America/Los_Angeles';
436
842
 
437
- - @param {**Date**} dateObj - A Date object
438
- - @param {**number**} years - The number of years to add
439
- - @param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`
440
- - @returns {**Date**} The Date object after adding the specified number of years
843
+ const now = new Date(2024, 2, 11, 1); // => Mar 11 2024 01:00:00 GMT-07:00
441
844
 
442
- Adds years to a date object. Subtraction is also possible by specifying a negative value. If the third parameter is false or omitted, this function calculates based on the system's default time zone. If you need to obtain calculation results based on a specific time zone regardless of the execution system, consider using the `addYearsTZ()`, which allows you to specify a time zone name as the third parameter. See [PLUGINS.md](./PLUGINS.md) for details.
443
-
444
- ```javascript
445
- const now = new Date();
446
- const next_year = date.addYears(now, 1);
845
+ addYears(now, 1, Los_Angeles); // => Mar 11 2025 01:00:00 GMT-07:00
846
+ addYears(now, -1, Los_Angeles); // => Mar 11 2023 01:00:00 GMT-08:00
447
847
  ```
448
848
 
449
849
  Exceptional behavior of the calculation for the last day of the month:
450
850
 
451
- ```javascript
452
- const now = new Date(Date.UTC(2020, 1, 29)); // => Feb 29 2020
453
- const next_year = date.addYears(now, 1, true); // => Feb 28 2021
454
- const next_next_year = date.addYears(next_year, 1, true); // => Feb 28 2022
851
+ ```typescript
852
+ const now = new Date(Date.UTC(2020, 1, 29)); // => Feb 29 2020
853
+ const next = addYears(now, 1, 'UTC'); // => Feb 28 2021
854
+ const back = addYears(next, -1, 'UTC'); // => Feb 28 2020 (not the original date)
455
855
  ```
456
856
 
457
- ### addMonths(dateObj, months[, utc])
857
+ </details>
458
858
 
459
- - @param {**Date**} dateObj - A Date object
460
- - @param {**number**} months - The number of months to add
461
- - @param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`
462
- - @returns {**Date**} The Date object after adding the specified number of months
859
+ ## addMonths(dateObj, months[, timeZone])
463
860
 
464
- Adds months to a date object. Subtraction is also possible by specifying a negative value. If the third parameter is false or omitted, this function calculates based on the system's default time zone. If you need to obtain calculation results based on a specific time zone regardless of the execution system, consider using the `addMonthsTZ()`, which allows you to specify a time zone name as the third parameter. See [PLUGINS.md](./PLUGINS.md) for details.
861
+ <details>
862
+ <summary>Adds the specified number of months to a Date object.</summary>
465
863
 
466
- ```javascript
467
- const now = new Date();
468
- const next_month = date.addMonths(now, 1);
864
+ - dateObj
865
+ - type: `Date`
866
+ - The Date object to modify
867
+ - months
868
+ - type: `number`
869
+ - The number of months to add
870
+ - [timeZone]
871
+ - type: `TimeZone | UTC`
872
+ - Optional time zone object or `UTC`
873
+
874
+ ```typescript
875
+ import { addMonths } from 'date-and-time';
876
+ import Los_Angeles from 'date-and-time/timezones/America/Los_Angeles';
877
+
878
+ const now = new Date(2024, 2, 11, 1); // => Mar 11 2024 01:00:00 GMT-07:00
879
+
880
+ addMonths(now, 1, Los_Angeles); // => Apr 11 2024 01:00:00 GMT-07:00
881
+ addMonths(now, -1, Los_Angeles); // => Feb 11 2024 01:00:00 GMT-08:00
469
882
  ```
470
883
 
471
884
  Exceptional behavior of the calculation for the last day of the month:
472
885
 
473
- ```javascript
474
- const now = new Date(Date.UTC(2023, 0, 31)); // => Jan 31 2023
475
- const next_month = date.addMonths(now, 1, true); // => Feb 28 2023
476
- const next_next_month = date.addMonths(next_month, 1, true); // => Mar 28 2023
886
+ ```typescript
887
+ const now = new Date(Date.UTC(2023, 0, 31)); // => Jan 31 2023
888
+ const apr = addMonths(now, 3, 'UTC'); // => Apr 30 2023
889
+ const feb = addMonths(apr, -2, 'UTC'); // => Feb 28 2023
477
890
  ```
478
891
 
479
- ### addDays(dateObj, days[, utc])
892
+ </details>
480
893
 
481
- - @param {**Date**} dateObj - A Date object
482
- - @param {**number**} days - The number of days to add
483
- - @param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`
484
- - @returns {**Date**} The Date object after adding the specified number of days
894
+ ## addDays(dateObj, days[, timeZone])
485
895
 
486
- Adds days to a date object. Subtraction is also possible by specifying a negative value. If the third parameter is false or omitted, this function calculates based on the system's default time zone. If you need to obtain calculation results based on a specific time zone regardless of the execution system, consider using the `addDaysTZ()`, which allows you to specify a time zone name as the third parameter. See [PLUGINS.md](./PLUGINS.md) for details.
896
+ <details>
897
+ <summary>Adds the specified number of days to a Date object.</summary>
487
898
 
488
- ```javascript
489
- const now = new Date();
490
- const yesterday = date.addDays(now, -1);
899
+ - dateObj
900
+ - type: `Date`
901
+ - The Date object to modify
902
+ - days
903
+ - type: `number`
904
+ - The number of days to add
905
+ - [timeZone]
906
+ - type: `TimeZone | UTC`
907
+ - Optional time zone object or `UTC`
908
+
909
+ ```typescript
910
+ import { addDays } from 'date-and-time';
911
+ import Los_Angeles from 'date-and-time/timezones/America/Los_Angeles';
912
+
913
+ const now = new Date(2024, 2, 11, 1); // => Mar 11 2024 01:00:00 GMT-07:00
914
+
915
+ addDays(now, 1, Los_Angeles); // => Mar 12 2024 01:00:00 GMT-07:00
916
+ addDays(now, -1, Los_Angeles); // => Mar 10 2024 01:00:00 GMT-08:00
491
917
  ```
492
918
 
493
- ### addHours(dateObj, hours)
919
+ </details>
494
920
 
495
- - @param {**Date**} dateObj - A Date object
496
- - @param {**number**} hours - The number of hours to add
497
- - ~~@param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`~~ `Removed in: v3.5.0`
498
- - @returns {**Date**} The Date object after adding the specified number of hours
921
+ ## addHours(dateObj, hours)
499
922
 
500
- Adds hours to a date object. Subtraction is also possible by specifying a negative value. The third parameter was deprecated in version 3.5.0. Regardless of what is specified for this parameter, the calculation results will not change.
923
+ <details>
924
+ <summary>Adds the specified number of hours to a Date object.</summary>
501
925
 
502
- ```javascript
503
- const now = new Date();
504
- const an_hour_ago = date.addHours(now, -1);
926
+ - dateObj
927
+ - type: `Date`
928
+ - The Date object to modify
929
+ - hours
930
+ - type: `number`
931
+ - The number of hours to add
932
+
933
+ ```typescript
934
+ import { addHours } from 'date-and-time';
935
+
936
+ const now = new Date(2025, 6, 24); // => Jul 24 2025 00:00:00
937
+
938
+ addHours(now, -1); // => Jul 23 2025 23:00:00
505
939
  ```
506
940
 
507
- ### addMinutes(dateObj, minutes)
941
+ </details>
508
942
 
509
- - @param {**Date**} dateObj - A Date object
510
- - @param {**number**} minutes - The number of minutes to add
511
- - ~~@param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`~~ `Removed in: v3.5.0`
512
- - @returns {**Date**} The Date object after adding the specified number of minutes
943
+ ## addMinutes(dateObj, minutes)
513
944
 
514
- Adds minutes to a date object. Subtraction is also possible by specifying a negative value. The third parameter was deprecated in version 3.5.0. Regardless of what is specified for this parameter, the calculation results will not change.
945
+ <details>
946
+ <summary>Adds the specified number of minutes to a Date object.</summary>
515
947
 
516
- ```javascript
517
- const now = new Date();
518
- const two_minutes_later = date.addMinutes(now, 2);
948
+ - dateObj
949
+ - type: `Date`
950
+ - The Date object to modify
951
+ - minutes
952
+ - type: `number`
953
+ - The number of minutes to add
954
+
955
+ ```typescript
956
+ import { addMinutes } from 'date-and-time';
957
+
958
+ const now = new Date(2025, 6, 24); // => Jul 24 2025 00:00:00
959
+
960
+ addMinutes(now, 2); // => Jul 24 2025 00:02:00
519
961
  ```
520
962
 
521
- ### addSeconds(dateObj, seconds)
963
+ </details>
522
964
 
523
- - @param {**Date**} dateObj - A Date object
524
- - @param {**number**} seconds - The number of seconds to add
525
- - ~~@param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`~~ `Removed in: v3.5.0`
526
- - @returns {**Date**} The Date object after adding the specified number of seconds
965
+ ## addSeconds(dateObj, seconds)
527
966
 
528
- Adds seconds to a date object. Subtraction is also possible by specifying a negative value. The third parameter was deprecated in version 3.5.0. Regardless of what is specified for this parameter, the calculation results will not change.
967
+ <details>
968
+ <summary>Adds the specified number of seconds to a Date object.</summary>
529
969
 
530
- ```javascript
531
- const now = new Date();
532
- const three_seconds_ago = date.addSeconds(now, -3);
970
+ - dateObj
971
+ - type: `Date`
972
+ - The Date object to modify
973
+ - seconds
974
+ - type: `number`
975
+ - The number of seconds to add
976
+
977
+ ```typescript
978
+ import { addSeconds } from 'date-and-time';
979
+
980
+ const now = new Date(2025, 6, 24); // => Jul 24 2025 00:00:00
981
+
982
+ addSeconds(now, -3); // => Jul 23 2025 23:59:57
533
983
  ```
534
984
 
535
- ### addMilliseconds(dateObj, milliseconds)
985
+ </details>
536
986
 
537
- - @param {**Date**} dateObj - A Date object
538
- - @param {**number**} milliseconds - The number of milliseconds to add
539
- - ~~@param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`~~ `Removed in: v3.5.0`
540
- - @returns {**Date**} The Date object after adding the specified number of milliseconds
987
+ ## addMilliseconds(dateObj, milliseconds)
541
988
 
542
- Adds milliseconds to a date object. Subtraction is also possible by specifying a negative value. The third parameter was deprecated in version 3.5.0. Regardless of what is specified for this parameter, the calculation results will not change.
989
+ <details>
990
+ <summary>Adds the specified number of milliseconds to a Date object.</summary>
543
991
 
544
- ```javascript
545
- const now = new Date();
546
- const a_millisecond_later = date.addMilliseconds(now, 1);
992
+ - dateObj
993
+ - type: `Date`
994
+ - The Date object to modify
995
+ - milliseconds
996
+ - type: `number`
997
+ - The number of milliseconds to add
998
+
999
+ ```typescript
1000
+ import { addMilliseconds } from 'date-and-time';
1001
+
1002
+ const now = new Date(2025, 6, 24); // => Jul 24 2025 00:00:00.000
1003
+
1004
+ addMilliseconds(now, 123); // => Jul 24 2025 00:00:00.123
547
1005
  ```
548
1006
 
549
- ### subtract(date1, date2)
1007
+ </details>
1008
+
1009
+ ## subtract(from, to)
550
1010
 
551
- - @param {**Date**} date1 - A Date object
552
- - @param {**Date**} date2 - A Date object
553
- - @returns {**Object**} The result object of subtracting date2 from date1
1011
+ <details>
1012
+ <summary>Calculates the difference between two dates.</summary>
1013
+
1014
+ - from
1015
+ - type: `Date`
1016
+ - The first Date object
1017
+ - to
1018
+ - type: `Date`
1019
+ - The second Date object
1020
+
1021
+ Returns a `Duration` instance with methods to get the difference in various units.
1022
+
1023
+ ```typescript
1024
+ import { subtract } from 'date-and-time';
554
1025
 
555
- ```javascript
556
- const today = new Date(2015, 0, 2);
557
1026
  const yesterday = new Date(2015, 0, 1);
1027
+ const today = new Date(2015, 0, 2, 3, 4, 5, 6);
1028
+
1029
+ const duration = subtract(yesterday, today);
1030
+
1031
+ duration.toDays().value; // => 1.127835...
1032
+ duration.toHours().value; // => 27.068057...
1033
+ duration.toMinutes().value; // => 1624.083433...
1034
+ duration.toSeconds().value; // => 97445.006
1035
+ duration.toMilliseconds().value; // => 97445006
1036
+ duration.toMicroseconds().value; // => 97445006000
1037
+ duration.toNanoseconds().value; // => 97445006000000
1038
+ ```
558
1039
 
559
- date.subtract(today, yesterday).toDays(); // => 1 = today - yesterday
560
- date.subtract(today, yesterday).toHours(); // => 24
561
- date.subtract(today, yesterday).toMinutes(); // => 1440
562
- date.subtract(today, yesterday).toSeconds(); // => 86400
563
- date.subtract(today, yesterday).toMilliseconds(); // => 86400000
1040
+ ### Duration
1041
+
1042
+ The `Duration` object can be directly created not only as a return value of the `subtract` function, but also by passing any numeric value (milliseconds) as a constructor argument.
1043
+
1044
+ ```typescript
1045
+ import { Duration } from 'date-and-time';
1046
+
1047
+ const duration = new Duration(123);
1048
+
1049
+ duration.toSeconds().value; // => 0.123
564
1050
  ```
565
1051
 
566
- ### isLeapYear(y)
1052
+ <details>
1053
+ <summary><strong>toDays()</strong></summary>
567
1054
 
568
- - @param {**number**} y - A year to check
569
- - @returns {**boolean**} Whether the year is a leap year
1055
+ This method calculates the number of days in the duration and returns a descriptor that includes the value in days, a format method for custom formatting, and a toParts method that returns an object with the parts of the duration.
570
1056
 
571
- ```javascript
572
- date.isLeapYear(2015); // => false
573
- date.isLeapYear(2012); // => true
1057
+ ```typescript
1058
+ duration.toDays().value;
1059
+ // => 1.127835...
1060
+
1061
+ duration.toDays().format('D[day], H:mm:ss.SSSfffFFF');
1062
+ // => 1day, 3:04:05.006000000
1063
+
1064
+ duration.toDays().toParts();
1065
+ // => { days: 1, hours: 3, minutes: 4, seconds: 5, ... }
574
1066
  ```
575
1067
 
576
- ### isSameDay(date1, date2)
1068
+ </details>
577
1069
 
578
- - @param {**Date**} date1 - A Date object
579
- - @param {**Date**} date2 - A Date object
580
- - @returns {**boolean**} Whether the two dates are the same day (time is ignored)
1070
+ <details>
1071
+ <summary><strong>toHours()</strong></summary>
581
1072
 
582
- ```javascript
583
- const date1 = new Date(2017, 0, 2, 0); // Jan 2 2017 00:00:00
584
- const date2 = new Date(2017, 0, 2, 23, 59); // Jan 2 2017 23:59:00
585
- const date3 = new Date(2017, 0, 1, 23, 59); // Jan 1 2017 23:59:00
586
- date.isSameDay(date1, date2); // => true
587
- date.isSameDay(date1, date3); // => false
1073
+ This method calculates the number of hours in the duration and returns a descriptor that includes the value in hours, a format method for custom formatting, and a toParts method that returns an object with the parts of the duration.
1074
+
1075
+ ```typescript
1076
+ duration.toHours().value;
1077
+ // => 27.068057...
1078
+
1079
+ duration.toHours().format('H:mm:ss.SSSfffFFF');
1080
+ // => 27:04:05.006000000
1081
+
1082
+ duration.toHours().toParts();
1083
+ // => { hours: 27, minutes: 4, seconds: 5, ... }
588
1084
  ```
589
1085
 
590
- ### locale([locale])
1086
+ </details>
1087
+
1088
+ <details>
1089
+ <summary><strong>toMinutes()</strong></summary>
1090
+
1091
+ This method calculates the number of minutes in the duration and returns a descriptor that includes the value in minutes, a format method for custom formatting, and a toParts method that returns an object with the parts of the duration.
591
1092
 
592
- - @param {**Function|string**} [locale] - A locale installer or language code
593
- - @returns {**string**} The current language code
1093
+ ```typescript
1094
+ duration.toMinutes().value;
1095
+ // => 1624.083433...
594
1096
 
595
- It returns the current language code if called without any parameters.
1097
+ duration.toMinutes().format('m[min] ss.SSSfffFFF');
1098
+ // => 1624min 05.006000000
596
1099
 
597
- ```javascript
598
- date.locale(); // => "en"
1100
+ duration.toMinutes().toParts();
1101
+ // => { minutes: 1624, seconds: 5, milliseconds: 6, ... }
599
1102
  ```
600
1103
 
601
- To switch to any other language, call it with a locale installer or a language code.
1104
+ </details>
602
1105
 
603
- ```javascript
604
- import es from 'date-and-time/locale/es';
1106
+ <details>
1107
+ <summary><strong>toSeconds()</strong></summary>
605
1108
 
606
- date.locale(es); // Switch to Spanish
1109
+ This method calculates the number of seconds in the duration and returns a descriptor that includes the value in seconds, a format method for custom formatting, and a toParts method that returns an object with the parts of the duration.
1110
+
1111
+ ```typescript
1112
+ duration.toSeconds().value;
1113
+ // => 97445.006
1114
+
1115
+ duration.toSeconds().format('s[sec] SSSfffFFF');
1116
+ // => 97445sec 006000000
1117
+
1118
+ duration.toSeconds().toParts();
1119
+ // => { seconds: 97445, milliseconds: 6, microseconds: 0, ... }
607
1120
  ```
608
1121
 
609
- See [LOCALE.md](./LOCALE.md) for details.
1122
+ </details>
1123
+
1124
+ <details>
1125
+ <summary><strong>toMilliseconds()</strong></summary>
610
1126
 
611
- ### extend(extension)
1127
+ This method calculates the number of milliseconds in the duration and returns a descriptor that includes the value in milliseconds, a format method for custom formatting, and a toParts method that returns an object with the parts of the duration.
612
1128
 
613
- - @param {**Object**} extension - An extension object
614
- - @returns {**void**}
1129
+ ```typescript
1130
+ duration.toMilliseconds().value;
1131
+ // => 97445006
1132
+
1133
+ duration.toMilliseconds().format('S.fffFFF');
1134
+ // => 97445006.000000
1135
+
1136
+ duration.toMilliseconds().toParts();
1137
+ // => { milliseconds: 97445006, microseconds: 0, nanoseconds: 0 }
1138
+ ```
615
1139
 
616
- It extends this library. See [EXTEND.md](./EXTEND.md) for details.
1140
+ </details>
1141
+
1142
+ <details>
1143
+ <summary><strong>toMicroseconds()</strong></summary>
1144
+
1145
+ This method calculates the number of microseconds in the duration and returns a descriptor that includes the value in microseconds, a format method for custom formatting, and a toParts method that returns an object with the microseconds and nanoseconds parts.
1146
+
1147
+ ```typescript
1148
+ duration.toMicroseconds().value;
1149
+ // => 97445006000
1150
+
1151
+ duration.toMicroseconds().format('f.FFF');
1152
+ // => 97445006000.000
1153
+
1154
+ duration.toMicroseconds().toParts();
1155
+ // => { microseconds: 97445006000, nanoseconds: 0 }
1156
+ ```
617
1157
 
618
- ### plugin(plugin)
1158
+ </details>
619
1159
 
620
- - @param {**Function|string**} plugin - A plugin installer or plugin name
621
- - @returns {**void**}
1160
+ <details>
1161
+ <summary><strong>toNanoseconds()</strong></summary>
622
1162
 
623
- Plugin is a named extension object. By installing predefined plugins, you can easily extend this library. See [PLUGINS.md](./PLUGINS.md) for details.
1163
+ This method calculates the number of nanoseconds in the duration and returns a descriptor that includes the value in nanoseconds, a format method for custom formatting, and a toParts method that returns an object with the nanoseconds part.
624
1164
 
625
- ## Browser Support
1165
+ ```typescript
1166
+ duration.toNanoseconds().value;
1167
+ // => 97445006000000
1168
+
1169
+ duration.toNanoseconds().format('F[ns]');
1170
+ // => 97445006000000ns
1171
+
1172
+ duration.toNanoseconds().toParts();
1173
+ // => { nanoseconds: 97445006000000 }
1174
+ ```
1175
+
1176
+ </details>
1177
+
1178
+ ### DurationDescriptor
1179
+
1180
+ #### value
1181
+
1182
+ The value of the duration in the respective unit.
1183
+
1184
+ #### format(formatString[, numeral])
1185
+
1186
+ <details>
1187
+ <summary>Formats the duration according to the provided format string.</summary>
1188
+
1189
+ - formatString
1190
+ - type: `string`
1191
+ - The format string to use for formatting
1192
+ - [numeral]
1193
+ - type: `Numeral`
1194
+ - default: `latn`
1195
+ - Optional numeral object for number formatting
1196
+
1197
+ The tokens available for use in the format string specified as the first argument and their meanings are as follows. However, tokens for units larger than the `DurationDescriptor` cannot be used. For example, in the case of a `DurationDescriptor` obtained by the `toHours` method, the `D` token representing days cannot be used. For a `DurationDescriptor` obtained by the `toNanoseconds` method, only the `F` token representing nanoseconds can be used.
1198
+
1199
+ | Token | Meaning |
1200
+ |:---------|:-----------------------------------|
1201
+ | D | Days |
1202
+ | H | Hours |
1203
+ | m | Minutes |
1204
+ | s | Seconds |
1205
+ | S | Milliseconds |
1206
+ | f | Microseconds |
1207
+ | F | Nanoseconds |
1208
+
1209
+ What makes the format string in `DurationDescriptor` different from others is that repeating the same token produces a zero-padding effect. For example, formatting `1 day` with `DDDD` results in an output of `0001`.
1210
+
1211
+ </details>
1212
+
1213
+ #### toParts()
1214
+
1215
+ <details>
1216
+ <summary>Converts the duration to an object containing the parts of the duration in the respective unit.</summary>
1217
+
1218
+ ```typescript
1219
+ {
1220
+ days: 1,
1221
+ hours: 3,
1222
+ minutes: 4,
1223
+ seconds: 5,
1224
+ milliseconds: 6,
1225
+ microseconds: 0,
1226
+ nanoseconds: 0
1227
+ }
1228
+ ```
1229
+
1230
+ </details>
1231
+
1232
+ ### Notes
1233
+
1234
+ <details>
1235
+ <summary><strong>Negative Duration</strong></summary>
1236
+
1237
+ When the `value` becomes negative, there are slight differences in the output results of the `format` method and the `toParts` method. In the `format` method, only the largest unit in the `DurationDescriptor`, for example, only the `D` token in the case of a `DurationDescriptor` obtained by the `toDays` method, gets a minus sign, while in the `toParts` method, all units get a minus sign.
1238
+
1239
+ ```typescript
1240
+ duration.toDays().value;
1241
+ // => -1.127835...
1242
+
1243
+ duration.toDays().format('D[day], H:mm:ss.SSSfffFFF');
1244
+ // => -1day, 3:04:05.006000000
1245
+
1246
+ duration.toDays().toParts();
1247
+ // => { days: -1, hours: -3, minutes: -4, seconds: -5, ... }
1248
+ ```
1249
+
1250
+ </details>
1251
+
1252
+ <details>
1253
+ <summary><strong>Negative Zero</strong></summary>
1254
+
1255
+ The `format` method may output `-0`. For example, when the value of a `DurationDescriptor` obtained by the `toDays` method is a negative decimal less than 1, using the `D` token in the `format` method outputs `-0`.
1256
+
1257
+ ```typescript
1258
+ duration.toDays().value;
1259
+ // => -0.127835...
1260
+
1261
+ duration.toDays().format('D[day], H:mm:ss.SSSfffFFF');
1262
+ // => -0day, 3:04:05.006000000
1263
+
1264
+ duration.toDays().toParts();
1265
+ // => { days: 0, hours: -3, minutes: -4, seconds: -5, ... }
1266
+ ```
1267
+
1268
+ </details>
1269
+ </details>
1270
+
1271
+ ## isLeapYear(year)
1272
+
1273
+ <details>
1274
+ <summary>Determines if the specified year is a leap year.</summary>
1275
+
1276
+ - year
1277
+ - type: `number`
1278
+ - The year to check
1279
+
1280
+ ```typescript
1281
+ import { isLeapYear } from 'date-and-time';
1282
+
1283
+ isLeapYear(2015); // => false
1284
+ isLeapYear(2012); // => true
1285
+ ```
1286
+
1287
+ </details>
1288
+
1289
+ ## isSameDay(date1, date2)
1290
+
1291
+ <details>
1292
+ <summary>Determines if two dates represent the same calendar day.</summary>
1293
+
1294
+ - date1
1295
+ - type: `Date`
1296
+ - The first date to compare
1297
+ - date2
1298
+ - type: `Date`
1299
+ - The second date to compare
1300
+
1301
+ ```typescript
1302
+ import { isSameDay } from 'date-and-time';
1303
+
1304
+ const date1 = new Date(2017, 0, 2, 0); // Jan 2 2017 00:00:00
1305
+ const date2 = new Date(2017, 0, 2, 23, 59); // Jan 2 2017 23:59:00
1306
+ const date3 = new Date(2017, 0, 1, 23, 59); // Jan 1 2017 23:59:00
1307
+
1308
+ isSameDay(date1, date2); // => true
1309
+ isSameDay(date1, date3); // => false
1310
+ ```
626
1311
 
627
- Chrome, Firefox, Safari, Edge, and Internet Explorer 6+.
1312
+ </details>
628
1313
 
629
1314
  ## License
630
1315