esday 1.0.0 → 1.0.1

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 (190) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +16 -8
  3. package/chunks/{DuP2qVZn.d.ts → BB5OVV-y.d.ts} +1 -1
  4. package/chunks/{Dc43cziu.d.ts → CBlQG2yl.d.ts} +1 -2
  5. package/chunks/{CNIy0PdR.js → DIG_UBsE.js} +2 -1
  6. package/chunks/{D2Xh96oz.js → oiGWnahC.js} +6 -5
  7. package/index.d.ts +2 -2
  8. package/index.js +1 -1
  9. package/locales/af.d.ts +0 -1
  10. package/locales/am.d.ts +0 -1
  11. package/locales/ar-dz.d.ts +0 -1
  12. package/locales/ar-iq.d.ts +0 -1
  13. package/locales/ar-kw.d.ts +0 -1
  14. package/locales/ar-ly.d.ts +0 -1
  15. package/locales/ar-ma.d.ts +0 -1
  16. package/locales/ar-sa.d.ts +0 -1
  17. package/locales/ar-tn.d.ts +0 -1
  18. package/locales/ar.d.ts +0 -1
  19. package/locales/az.d.ts +0 -1
  20. package/locales/be.d.ts +0 -1
  21. package/locales/bg.d.ts +0 -1
  22. package/locales/bi.d.ts +0 -1
  23. package/locales/bm.d.ts +0 -1
  24. package/locales/bn-bd.d.ts +0 -1
  25. package/locales/bn.d.ts +0 -1
  26. package/locales/bo.d.ts +0 -1
  27. package/locales/br.d.ts +0 -1
  28. package/locales/bs.d.ts +0 -1
  29. package/locales/ca.d.ts +0 -1
  30. package/locales/cs.d.ts +0 -1
  31. package/locales/cv.d.ts +0 -1
  32. package/locales/cy.d.ts +0 -1
  33. package/locales/da.d.ts +0 -1
  34. package/locales/de-at.d.ts +0 -1
  35. package/locales/de-ch.d.ts +0 -1
  36. package/locales/de.d.ts +0 -1
  37. package/locales/dv.d.ts +0 -1
  38. package/locales/el.d.ts +0 -1
  39. package/locales/en-au.d.ts +0 -1
  40. package/locales/en-ca.d.ts +0 -1
  41. package/locales/en-gb.d.ts +0 -1
  42. package/locales/en-ie.d.ts +0 -1
  43. package/locales/en-il.d.ts +0 -1
  44. package/locales/en-in.d.ts +0 -1
  45. package/locales/en-nz.d.ts +0 -1
  46. package/locales/en-sg.d.ts +0 -1
  47. package/locales/en-tt.d.ts +0 -1
  48. package/locales/en-us.d.ts +0 -1
  49. package/locales/en.d.ts +0 -1
  50. package/locales/eo.d.ts +0 -1
  51. package/locales/es-do.d.ts +0 -1
  52. package/locales/es-mx.d.ts +0 -1
  53. package/locales/es-pr.d.ts +0 -1
  54. package/locales/es-us.d.ts +0 -1
  55. package/locales/es.d.ts +0 -1
  56. package/locales/et.d.ts +0 -1
  57. package/locales/eu.d.ts +0 -1
  58. package/locales/fa.d.ts +0 -1
  59. package/locales/fi.d.ts +0 -1
  60. package/locales/fil.d.ts +0 -1
  61. package/locales/fo.d.ts +0 -1
  62. package/locales/fr-ca.d.ts +0 -1
  63. package/locales/fr-ch.d.ts +0 -1
  64. package/locales/fr.d.ts +0 -1
  65. package/locales/fy.d.ts +0 -1
  66. package/locales/ga.d.ts +0 -1
  67. package/locales/gd.d.ts +0 -1
  68. package/locales/gl.d.ts +0 -1
  69. package/locales/gom-deva.d.ts +0 -1
  70. package/locales/gom-latn.d.ts +0 -1
  71. package/locales/gu.d.ts +0 -1
  72. package/locales/he.d.ts +0 -1
  73. package/locales/he.js +2 -1
  74. package/locales/hi.d.ts +0 -1
  75. package/locales/hr.d.ts +0 -1
  76. package/locales/ht.d.ts +0 -1
  77. package/locales/hu.d.ts +0 -1
  78. package/locales/hy-am.d.ts +0 -1
  79. package/locales/id.d.ts +0 -1
  80. package/locales/is.d.ts +0 -1
  81. package/locales/it-ch.d.ts +0 -1
  82. package/locales/it.d.ts +0 -1
  83. package/locales/ja.d.ts +0 -1
  84. package/locales/jv.d.ts +0 -1
  85. package/locales/ka.d.ts +0 -1
  86. package/locales/kk.d.ts +0 -1
  87. package/locales/km.d.ts +0 -1
  88. package/locales/kn.d.ts +0 -1
  89. package/locales/ko.d.ts +0 -1
  90. package/locales/ku.d.ts +0 -1
  91. package/locales/ky.d.ts +0 -1
  92. package/locales/lb.d.ts +0 -1
  93. package/locales/lo.d.ts +0 -1
  94. package/locales/lt.d.ts +0 -1
  95. package/locales/lv.d.ts +0 -1
  96. package/locales/me.d.ts +0 -1
  97. package/locales/mi.d.ts +0 -1
  98. package/locales/mk.d.ts +0 -1
  99. package/locales/ml.d.ts +0 -1
  100. package/locales/mn.d.ts +0 -1
  101. package/locales/mr.d.ts +0 -1
  102. package/locales/ms-my.d.ts +0 -1
  103. package/locales/ms.d.ts +0 -1
  104. package/locales/mt.d.ts +0 -1
  105. package/locales/my.d.ts +0 -1
  106. package/locales/nb.d.ts +0 -1
  107. package/locales/ne.d.ts +0 -1
  108. package/locales/nl-be.d.ts +0 -1
  109. package/locales/nl.d.ts +0 -1
  110. package/locales/nn.d.ts +0 -1
  111. package/locales/oc-lnc.d.ts +0 -1
  112. package/locales/pa-in.d.ts +0 -1
  113. package/locales/pl.d.ts +0 -1
  114. package/locales/pt-br.d.ts +0 -1
  115. package/locales/pt.d.ts +0 -1
  116. package/locales/rn.d.ts +0 -1
  117. package/locales/ro.d.ts +0 -1
  118. package/locales/ru.d.ts +0 -1
  119. package/locales/rw.d.ts +0 -1
  120. package/locales/sd.d.ts +0 -1
  121. package/locales/se.d.ts +0 -1
  122. package/locales/si.d.ts +0 -1
  123. package/locales/sk.d.ts +0 -1
  124. package/locales/sl.d.ts +0 -1
  125. package/locales/sq.d.ts +0 -1
  126. package/locales/sr-cyrl.d.ts +0 -1
  127. package/locales/sr.d.ts +0 -1
  128. package/locales/ss.d.ts +0 -1
  129. package/locales/sv-fi.d.ts +0 -1
  130. package/locales/sv.d.ts +0 -1
  131. package/locales/sw.d.ts +0 -1
  132. package/locales/ta.d.ts +0 -1
  133. package/locales/te.d.ts +0 -1
  134. package/locales/tet.d.ts +0 -1
  135. package/locales/tg.d.ts +0 -1
  136. package/locales/th.d.ts +0 -1
  137. package/locales/tk.d.ts +0 -1
  138. package/locales/tl-ph.d.ts +0 -1
  139. package/locales/tlh.d.ts +0 -1
  140. package/locales/tr.d.ts +0 -1
  141. package/locales/tzl.d.ts +0 -1
  142. package/locales/tzm-latn.d.ts +0 -1
  143. package/locales/tzm.d.ts +0 -1
  144. package/locales/ug-cn.d.ts +0 -1
  145. package/locales/uk.d.ts +0 -1
  146. package/locales/ur.d.ts +0 -1
  147. package/locales/uz-latn.d.ts +0 -1
  148. package/locales/uz.d.ts +0 -1
  149. package/locales/vi.d.ts +0 -1
  150. package/locales/x-pseudo.d.ts +0 -1
  151. package/locales/yo.d.ts +0 -1
  152. package/locales/zh-cn.d.ts +0 -1
  153. package/locales/zh-hk.d.ts +0 -1
  154. package/locales/zh-mo.d.ts +0 -1
  155. package/locales/zh-tw.d.ts +0 -1
  156. package/locales/zh.d.ts +0 -1
  157. package/package.json +18 -18
  158. package/plugins/advancedFormat/index.d.ts +1 -2
  159. package/plugins/advancedParse/index.d.ts +1 -2
  160. package/plugins/calendar/index.d.ts +1 -2
  161. package/plugins/dayOfYear/index.d.ts +1 -2
  162. package/plugins/duration/index.d.ts +1 -2
  163. package/plugins/duration/index.js +7 -6
  164. package/plugins/isBetween/index.d.ts +1 -2
  165. package/plugins/isLeapYear/index.d.ts +1 -2
  166. package/plugins/isSameOrAfter/index.d.ts +1 -2
  167. package/plugins/isSameOrBefore/index.d.ts +1 -2
  168. package/plugins/isToday/index.d.ts +1 -2
  169. package/plugins/isTomorrow/index.d.ts +1 -2
  170. package/plugins/isYesterday/index.d.ts +1 -2
  171. package/plugins/isoWeek/index.d.ts +1 -2
  172. package/plugins/locale/index.d.ts +1 -2
  173. package/plugins/locale/index.js +4 -2
  174. package/plugins/localeData/index.d.ts +1 -2
  175. package/plugins/localeData/index.js +5 -3
  176. package/plugins/localizedFormat/index.d.ts +1 -2
  177. package/plugins/localizedParse/index.d.ts +1 -2
  178. package/plugins/localizedParse/index.js +2 -1
  179. package/plugins/minMax/index.d.ts +1 -2
  180. package/plugins/objectSupport/index.d.ts +1 -2
  181. package/plugins/pluralGetSet/index.d.ts +1 -2
  182. package/plugins/quarterOfYear/index.d.ts +1 -2
  183. package/plugins/relativeTime/index.d.ts +1 -2
  184. package/plugins/timezone/index.d.ts +1 -2
  185. package/plugins/timezone/index.js +1 -1
  186. package/plugins/toArray/index.d.ts +1 -2
  187. package/plugins/toObject/index.d.ts +1 -2
  188. package/plugins/utc/index.d.ts +1 -2
  189. package/plugins/utc/index.js +1 -1
  190. package/plugins/week/index.d.ts +1 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [1.0.1](https://github.com/BePo65/esday/compare/v1.0.0...v1.0.1) (2026-07-30)
6
+
7
+ ### Bug Fixes
8
+
9
+ * allow other types beside EsDay as first argument to diff() ([198f9da](https://github.com/BePo65/esday/commit/198f9dab0453ce6e60ec9071629197f209f36fd9))
5
10
  ## [1.0.0](https://github.com/BePo65/esday/compare/v0.6.3...v1.0.0) (2026-06-04)
6
11
 
7
12
  ## [0.6.3](https://github.com/BePo65/esday/compare/v0.6.2...v0.6.3) (2026-03-08)
package/README.md CHANGED
@@ -1,14 +1,27 @@
1
- ## EsDay
1
+ # EsDay
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/esday)](https://www.npmjs.com/package/esday)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?cacheSeconds=2592000)](https://github.com/kessler/license-report/blob/master/LICENSE)
5
5
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/BePo65/esday?tab=readme-ov-file#contribute)
6
6
 
7
- # Repository changing ownership
7
+ ## Repository changing ownership
8
8
 
9
9
  On the 6th of January 2026 this repository changed the ownership to one of it's maintainers, [BePo65](https://github.com/BePo65) to reduce the workload on [g-mero](https://github.com/g-mero).
10
10
 
11
- > EsDay is a JavaScript library inspired by [Day.js](https://github.com/iamkun/dayjs), esday has a largely similar API to Day.js (v1.11.13), but it is written in TypeScript and fully supports es modules. Being compatible to Day.js, EsDay is also a good replacement for Moment.js.
11
+ ## Concepts
12
+
13
+ EsDay is a JavaScript library inspired by [Day.js](https://github.com/iamkun/dayjs).
14
+
15
+ Esday has an API largely similar to Day.js (v1.11.13), but it is written in TypeScript and fully supports es modules.
16
+
17
+ Being compatible to Day.js, EsDay is also a good replacement for Moment.js.
18
+
19
+ **Highlights**
20
+
21
+ - **Modern API**: Provides the same API as Day.js, with some features moved to plugins for a simpler core.
22
+ - **Immutable**: esday is immutable, which means that all operations will return a new instance of esday.
23
+
24
+ ## Basic use
12
25
 
13
26
  ```javascript
14
27
  import { esday } from 'esday'
@@ -21,11 +34,6 @@ esday('2024-12-10').set('year', 2025).add(1, 'month').isToday()
21
34
 
22
35
  For detailed information see the [full documentation](https://bepo65.github.io/esday/).
23
36
 
24
- ## Concepts
25
-
26
- - **Modern API**: Provides the same API as Day.js, with some features moved to plugins for a simpler core.
27
- - **Immutable**: esday is immutable, which means that all operations will return a new instance of esday.
28
-
29
37
  ## Differences to Day.js
30
38
 
31
39
  - **Locale is a Plugin**: no default locale!
@@ -201,7 +201,7 @@ declare class EsDay {
201
201
  add(value: UnitsObjectTypeAddSub): EsDay;
202
202
  subtract(value: number, unit: UnitTypeAddSub): EsDay;
203
203
  subtract(value: UnitsObjectTypeAddSub): EsDay;
204
- diff(date: EsDay, units?: UnitTypeAddSub, asFloat?: boolean): number;
204
+ diff(date: DateType, units?: UnitTypeAddSub, asFloat?: boolean): number;
205
205
  /**
206
206
  * Get the utcOffset of date in minutes.
207
207
  * "Proxy" implementation (getter only); the full functionality including
@@ -1,5 +1,4 @@
1
- import { a as EsDayFactory } from "./DuP2qVZn.js";
2
-
1
+ import { a as EsDayFactory } from "./BB5OVV-y.js";
3
2
  //#region src/core/factory.d.ts
4
3
  declare const esday: EsDayFactory;
5
4
  //#endregion
@@ -16,7 +16,8 @@ const UNIT_FIELD_MAP = {
16
16
  };
17
17
  const prettyUnitsDate = Object.keys(UNIT_FIELD_MAP);
18
18
  function unitToField(unit) {
19
- return UNIT_FIELD_MAP[normalizeUnitWithPlurals(unit)];
19
+ const p = normalizeUnitWithPlurals(unit);
20
+ return UNIT_FIELD_MAP[p];
20
21
  }
21
22
  function getUnitInDate(date, unit) {
22
23
  return date[`get${unitToField(unit)}`]();
@@ -1,7 +1,7 @@
1
1
  import { f as constants_default } from "./CeKusvtV.js";
2
2
  import { a as isUndefined, n as isEmptyObject, o as isValidDate, r as isObject, t as isArray } from "./DuRKUq5K.js";
3
3
  import { n as normalizeUnitWithPlurals, t as normalizeUnit } from "./DMdr1ZL1.js";
4
- import { i as setUnitInDate, r as prettyUnitsDate, t as getUnitInDate } from "./CNIy0PdR.js";
4
+ import { i as setUnitInDate, r as prettyUnitsDate, t as getUnitInDate } from "./DIG_UBsE.js";
5
5
  import { t as createInstanceFromExist } from "./i3oEJgL3.js";
6
6
  import { n as padStart, r as padZoneStr } from "./DXFoLbHM.js";
7
7
  //#region src/core/Impl/add.ts
@@ -225,17 +225,17 @@ function startOfImpl(that, unit, reverse = false) {
225
225
  return result;
226
226
  }
227
227
  //#endregion
228
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/checkPrivateRedeclaration.js
228
+ //#region \0@oxc-project+runtime@0.140.0/helpers/esm/checkPrivateRedeclaration.js
229
229
  function _checkPrivateRedeclaration(e, t) {
230
230
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
231
231
  }
232
232
  //#endregion
233
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateMethodInitSpec.js
233
+ //#region \0@oxc-project+runtime@0.140.0/helpers/esm/classPrivateMethodInitSpec.js
234
234
  function _classPrivateMethodInitSpec(e, a) {
235
235
  _checkPrivateRedeclaration(e, a), a.add(e);
236
236
  }
237
237
  //#endregion
238
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/assertClassBrand.js
238
+ //#region \0@oxc-project+runtime@0.140.0/helpers/esm/assertClassBrand.js
239
239
  function _assertClassBrand(e, t, n) {
240
240
  if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
241
241
  throw new TypeError("Private element is not present on this object");
@@ -333,7 +333,8 @@ var EsDay = class EsDay {
333
333
  return this.clone();
334
334
  }
335
335
  diff(date, units, asFloat = false) {
336
- return diffImpl(this, date, units, asFloat);
336
+ const parsedDate = esday(date);
337
+ return diffImpl(this, parsedDate, units, asFloat);
337
338
  }
338
339
  utcOffset(offset, _keepLocalTime) {
339
340
  if (offset !== void 0) return new EsDay(constants_default.INVALID_DATE);
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as UnitMs, E as UnitIsoWeek, F as UnitTypeCore, I as UnitTypeGetSet, M as UnitSecond, N as UnitType, O as UnitMin, P as UnitTypeAddSub, R as UnitWeek, S as UnitDate, T as UnitHour, _ as LongUnit, a as EsDayFactory, b as PrettyUnitFromPlurals, c as FormattingTokenDefinitions, d as ParsingObjectPlurals, f as ParsingObjectShort, g as SimpleType, h as SimpleObject, i as DateType, j as UnitQuarter, k as UnitMonth, l as ParsingObject, m as UnitsObjectTypeSet, n as ConfigurationObject, o as EsDayFactoryParserFn, p as UnitsObjectTypeAddSub, r as DateFromDateComponents, s as EsDayPlugin, t as EsDay, u as ParsingObjectLong, v as PrettyUnitAsPlural, w as UnitDay, x as ShortUnit, y as PrettyUnitAsSingular, z as UnitYear } from "./chunks/DuP2qVZn.js";
2
- import { t as esday } from "./chunks/Dc43cziu.js";
1
+ import { A as UnitMs, E as UnitIsoWeek, F as UnitTypeCore, I as UnitTypeGetSet, M as UnitSecond, N as UnitType, O as UnitMin, P as UnitTypeAddSub, R as UnitWeek, S as UnitDate, T as UnitHour, _ as LongUnit, a as EsDayFactory, b as PrettyUnitFromPlurals, c as FormattingTokenDefinitions, d as ParsingObjectPlurals, f as ParsingObjectShort, g as SimpleType, h as SimpleObject, i as DateType, j as UnitQuarter, k as UnitMonth, l as ParsingObject, m as UnitsObjectTypeSet, n as ConfigurationObject, o as EsDayFactoryParserFn, p as UnitsObjectTypeAddSub, r as DateFromDateComponents, s as EsDayPlugin, t as EsDay, u as ParsingObjectLong, v as PrettyUnitAsPlural, w as UnitDay, x as ShortUnit, y as PrettyUnitAsSingular, z as UnitYear } from "./chunks/BB5OVV-y.js";
2
+ import { t as esday } from "./chunks/CBlQG2yl.js";
3
3
  export { ConfigurationObject, DateFromDateComponents, DateType, EsDay, EsDayFactory, EsDayFactoryParserFn, EsDayPlugin, FormattingTokenDefinitions, type LongUnit, ParsingObject, ParsingObjectLong, ParsingObjectPlurals, ParsingObjectShort, type PrettyUnitAsPlural, type PrettyUnitAsSingular, type PrettyUnitFromPlurals, type ShortUnit, type SimpleObject, type SimpleType, type UnitDate, type UnitDay, type UnitHour, type UnitIsoWeek, type UnitMin, type UnitMonth, type UnitMs, type UnitQuarter, type UnitSecond, type UnitType, type UnitTypeAddSub, type UnitTypeCore, type UnitTypeGetSet, type UnitWeek, type UnitYear, UnitsObjectTypeAddSub, UnitsObjectTypeSet, esday };
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as EsDay, t as esday } from "./chunks/D2Xh96oz.js";
1
+ import { n as EsDay, t as esday } from "./chunks/oiGWnahC.js";
2
2
  export { EsDay, esday };
package/locales/af.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/af.d.ts
4
3
  declare const localeAf: Readonly<Locale>;
5
4
  //#endregion
package/locales/am.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/am.d.ts
4
3
  declare const localeAm: Readonly<Locale>;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ar-dz.d.ts
4
3
  /**
5
4
  * Arabic (Algeria) [ar-DZ]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ar-iq.d.ts
4
3
  /**
5
4
  * Arabic (Iraq) [ar-IQ]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ar-kw.d.ts
4
3
  /**
5
4
  * Arabic (Kuwait) [ar-KW]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ar-ly.d.ts
4
3
  /**
5
4
  * Arabic (Lybia) [ar-LY]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ar-ma.d.ts
4
3
  /**
5
4
  * Arabic (Morocco) [ar-MA]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ar-sa.d.ts
4
3
  /**
5
4
  * Arabic (Saudi Arabia) [ar-SA]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ar-tn.d.ts
4
3
  /**
5
4
  * Arabic (Tunisia) [ar-TN]
package/locales/ar.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ar.d.ts
4
3
  declare const locale: Readonly<Locale>;
5
4
  //#endregion
package/locales/az.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/az.d.ts
4
3
  declare const localeAz: Readonly<Locale>;
5
4
  //#endregion
package/locales/be.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/be.d.ts
4
3
  declare const localeBe: Readonly<Locale>;
5
4
  //#endregion
package/locales/bg.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/bg.d.ts
4
3
  declare const localeBg: Readonly<Locale>;
5
4
  //#endregion
package/locales/bi.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/bi.d.ts
4
3
  declare const localeBi: Readonly<Locale>;
5
4
  //#endregion
package/locales/bm.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/bm.d.ts
4
3
  declare const localeBm: Readonly<Locale>;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/bn-bd.d.ts
4
3
  /**
5
4
  * Bengali (Bangladesh) [bn-BD]
package/locales/bn.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/bn.d.ts
4
3
  declare const localeBn: Readonly<Locale>;
5
4
  //#endregion
package/locales/bo.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/bo.d.ts
4
3
  declare const localeBo: Readonly<Locale>;
5
4
  //#endregion
package/locales/br.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/br.d.ts
4
3
  declare const localeBr: Readonly<Locale>;
5
4
  //#endregion
package/locales/bs.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/bs.d.ts
4
3
  declare const localeBs: Readonly<Locale>;
5
4
  //#endregion
package/locales/ca.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ca.d.ts
4
3
  declare const localeCa: Readonly<Locale>;
5
4
  //#endregion
package/locales/cs.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/cs.d.ts
4
3
  declare const localeCs: Readonly<Locale>;
5
4
  //#endregion
package/locales/cv.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/cv.d.ts
4
3
  declare const localeCv: Readonly<Locale>;
5
4
  //#endregion
package/locales/cy.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/cy.d.ts
4
3
  declare const localeCy: Readonly<Locale>;
5
4
  //#endregion
package/locales/da.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/da.d.ts
4
3
  declare const localeDa: Readonly<Locale>;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/de-at.d.ts
4
3
  /**
5
4
  * German (Austria) [de-AT]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/de-ch.d.ts
4
3
  /**
5
4
  * German (Switzerland) [de-CH]
package/locales/de.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/de.d.ts
4
3
  declare const localeDe: Readonly<Locale>;
5
4
  //#endregion
package/locales/dv.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/dv.d.ts
4
3
  declare const localeDv: Readonly<Locale>;
5
4
  //#endregion
package/locales/el.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/el.d.ts
4
3
  declare const localeEl: Readonly<Locale>;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-au.d.ts
4
3
  /**
5
4
  * English (Australia) [en-AU]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-ca.d.ts
4
3
  /**
5
4
  * English (Canada) [en-CA]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-gb.d.ts
4
3
  /**
5
4
  * English (United Kingdom) [en-GB]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-ie.d.ts
4
3
  /**
5
4
  * English (Ireland) [en-IE]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-il.d.ts
4
3
  /**
5
4
  * English (Israel) [en-IL]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-in.d.ts
4
3
  /**
5
4
  * English (India) [en-IN]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-nz.d.ts
4
3
  /**
5
4
  * English (New Zealand) [en-NZ]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-sg.d.ts
4
3
  /**
5
4
  * English (Singapore) [en-SG]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-tt.d.ts
4
3
  /**
5
4
  * English (Trinidad & Tobago) [en-TT]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en-us.d.ts
4
3
  /**
5
4
  * English (United States) [en-US]
package/locales/en.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/en.d.ts
4
3
  declare const localeEn: Readonly<Locale>;
5
4
  //#endregion
package/locales/eo.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/eo.d.ts
4
3
  declare const localeEo: Readonly<Locale>;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/es-do.d.ts
4
3
  /**
5
4
  * Spanish (Dominican Republic) [es-DO]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/es-mx.d.ts
4
3
  /**
5
4
  * Spanish (Mexico) [es-MX]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/es-pr.d.ts
4
3
  /**
5
4
  * Spanish (Puerto Rico) [es-PR]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/es-us.d.ts
4
3
  /**
5
4
  * Spanish (United States) [es-US]
package/locales/es.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/es.d.ts
4
3
  declare const localeEs: Readonly<Locale>;
5
4
  //#endregion
package/locales/et.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/et.d.ts
4
3
  declare const localeEt: Readonly<Locale>;
5
4
  //#endregion
package/locales/eu.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/eu.d.ts
4
3
  declare const localeEu: Readonly<Locale>;
5
4
  //#endregion
package/locales/fa.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/fa.d.ts
4
3
  declare const locale: Locale;
5
4
  //#endregion
package/locales/fi.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/fi.d.ts
4
3
  declare const localeFi: Readonly<Locale>;
5
4
  //#endregion
package/locales/fil.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/fil.d.ts
4
3
  declare const localeFil: Readonly<Locale>;
5
4
  //#endregion
package/locales/fo.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/fo.d.ts
4
3
  declare const localeFo: Readonly<Locale>;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/fr-ca.d.ts
4
3
  /**
5
4
  * French (Canada) [fr-CA]
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/fr-ch.d.ts
4
3
  /**
5
4
  * French (Switzerland) [fr-CH]
package/locales/fr.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/fr.d.ts
4
3
  declare const localeFr: Readonly<Locale>;
5
4
  //#endregion
package/locales/fy.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/fy.d.ts
4
3
  declare const localeFy: Readonly<Locale>;
5
4
  //#endregion
package/locales/ga.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/ga.d.ts
4
3
  declare const localeGa: Readonly<Locale>;
5
4
  //#endregion
package/locales/gd.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/gd.d.ts
4
3
  declare const localeGd: Readonly<Locale>;
5
4
  //#endregion
package/locales/gl.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/gl.d.ts
4
3
  declare const localeGl: Readonly<Locale>;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/gom-deva.d.ts
4
3
  declare const localeGomLatn: Readonly<Locale>;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/gom-latn.d.ts
4
3
  declare const localeGomLatn: Readonly<Locale>;
5
4
  //#endregion
package/locales/gu.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/gu.d.ts
4
3
  declare const localeGu: Readonly<Locale>;
5
4
  //#endregion
package/locales/he.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/he.d.ts
4
3
  declare const localeHe: Readonly<Locale>;
5
4
  //#endregion
package/locales/he.js CHANGED
@@ -21,7 +21,8 @@ const relativeTimeFormatStrings = {
21
21
  yy2: "שנתיים"
22
22
  };
23
23
  const relativeTimeFormatter = (timeValue, _withoutSuffix, token, _isFuture) => {
24
- return (relativeTimeFormatStrings[token + (+timeValue === 2 ? "2" : "")] ?? relativeTimeFormatStrings[token]).replace("%d", timeValue.toString());
24
+ const formatStringsIndex = token + (+timeValue === 2 ? "2" : "");
25
+ return (relativeTimeFormatStrings[formatStringsIndex] ?? relativeTimeFormatStrings[token]).replace("%d", timeValue.toString());
25
26
  };
26
27
  const localeHe = {
27
28
  name: "he",
package/locales/hi.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/hi.d.ts
4
3
  declare const localeHi: Readonly<Locale>;
5
4
  //#endregion
package/locales/hr.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Locale } from "../plugins/locale/index.js";
2
-
3
2
  //#region src/locales/hr.d.ts
4
3
  declare const localeHr: Readonly<Locale>;
5
4
  //#endregion