chronos-date 1.2.1 → 1.3.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 (77) hide show
  1. package/dist/{convert-mMaI4YP0.mjs → convert-BY-uEIvg.mjs} +3 -3
  2. package/dist/{convert-DbgntRVW.cjs → convert-z8FAUOuh.cjs} +3 -3
  3. package/dist/{greet-D07t2_e6.mjs → greet-D89spydp.mjs} +1 -1
  4. package/dist/{greet-hjVsd2dt.cjs → greet-ok0_Wai_.cjs} +1 -1
  5. package/dist/guards.cjs +3 -3
  6. package/dist/guards.d.cts +1 -1
  7. package/dist/guards.d.mts +1 -1
  8. package/dist/guards.mjs +3 -3
  9. package/dist/{helpers-CQzi908i.cjs → helpers-D8yAKOsC.cjs} +3 -3
  10. package/dist/{helpers-DEf4sevD.mjs → helpers-eVQCueAC.mjs} +3 -3
  11. package/dist/index.cjs +22 -22
  12. package/dist/index.d.cts +1 -1
  13. package/dist/index.d.mts +1 -1
  14. package/dist/index.mjs +22 -22
  15. package/dist/{non-primitives-DBtomDty.mjs → non-primitives-B38XfU4A.mjs} +1 -1
  16. package/dist/{non-primitives-D9zxCwX8.cjs → non-primitives-Dj558axv.cjs} +1 -1
  17. package/dist/plugins/banglaPlugin.cjs +4 -4
  18. package/dist/plugins/banglaPlugin.d.cts +2 -2
  19. package/dist/plugins/banglaPlugin.d.mts +2 -2
  20. package/dist/plugins/banglaPlugin.mjs +4 -4
  21. package/dist/plugins/businessPlugin.cjs +2 -2
  22. package/dist/plugins/businessPlugin.d.cts +10 -10
  23. package/dist/plugins/businessPlugin.d.mts +10 -10
  24. package/dist/plugins/businessPlugin.mjs +2 -2
  25. package/dist/plugins/dateRangePlugin.cjs +2 -2
  26. package/dist/plugins/dateRangePlugin.d.cts +2 -2
  27. package/dist/plugins/dateRangePlugin.d.mts +2 -2
  28. package/dist/plugins/dateRangePlugin.mjs +2 -2
  29. package/dist/plugins/dayPartPlugin.cjs +1 -1
  30. package/dist/plugins/dayPartPlugin.d.cts +2 -2
  31. package/dist/plugins/dayPartPlugin.d.mts +2 -2
  32. package/dist/plugins/dayPartPlugin.mjs +1 -1
  33. package/dist/plugins/durationPlugin.d.cts +2 -2
  34. package/dist/plugins/durationPlugin.d.mts +2 -2
  35. package/dist/plugins/fromNowPlugin.cjs +1 -1
  36. package/dist/plugins/fromNowPlugin.d.cts +2 -2
  37. package/dist/plugins/fromNowPlugin.d.mts +2 -2
  38. package/dist/plugins/fromNowPlugin.mjs +1 -1
  39. package/dist/plugins/greetingPlugin.cjs +1 -1
  40. package/dist/plugins/greetingPlugin.d.cts +2 -2
  41. package/dist/plugins/greetingPlugin.d.mts +2 -2
  42. package/dist/plugins/greetingPlugin.mjs +1 -1
  43. package/dist/plugins/palindromePlugin.cjs +2 -2
  44. package/dist/plugins/palindromePlugin.d.cts +2 -2
  45. package/dist/plugins/palindromePlugin.d.mts +2 -2
  46. package/dist/plugins/palindromePlugin.mjs +2 -2
  47. package/dist/plugins/relativeTimePlugin.d.cts +2 -2
  48. package/dist/plugins/relativeTimePlugin.d.mts +2 -2
  49. package/dist/plugins/roundPlugin.cjs +1 -1
  50. package/dist/plugins/roundPlugin.d.cts +3 -3
  51. package/dist/plugins/roundPlugin.d.mts +3 -3
  52. package/dist/plugins/roundPlugin.mjs +1 -1
  53. package/dist/plugins/seasonPlugin.d.cts +2 -2
  54. package/dist/plugins/seasonPlugin.d.mts +2 -2
  55. package/dist/plugins/timeZonePlugin.cjs +6 -6
  56. package/dist/plugins/timeZonePlugin.d.cts +6 -6
  57. package/dist/plugins/timeZonePlugin.d.mts +6 -6
  58. package/dist/plugins/timeZonePlugin.mjs +6 -6
  59. package/dist/plugins/zodiacPlugin.cjs +1 -1
  60. package/dist/plugins/zodiacPlugin.d.cts +2 -2
  61. package/dist/plugins/zodiacPlugin.d.mts +2 -2
  62. package/dist/plugins/zodiacPlugin.mjs +1 -1
  63. package/dist/{primitives-dXzXlzJw.mjs → primitives-DpMa2dS2.mjs} +1 -1
  64. package/dist/{primitives-CtuSNmV7.cjs → primitives-DutXlR0D.cjs} +1 -1
  65. package/dist/{types-CaVuY1_4.d.cts → types-DgRC-2cA.d.cts} +63 -48
  66. package/dist/{types-Bs_rfkka.d.mts → types-Nd89nk1B.d.mts} +63 -48
  67. package/dist/types.d.cts +2 -2
  68. package/dist/types.d.mts +2 -2
  69. package/dist/{utilities-BKtVo78T.mjs → utilities-BfGFB7aw.mjs} +4 -4
  70. package/dist/{utilities-D47SN9EZ.cjs → utilities-CZTvwfjY.cjs} +4 -4
  71. package/dist/{utilities-BGX8dviZ.mjs → utilities-C_cYlUNI.mjs} +4 -4
  72. package/dist/{utilities-CpF3uys3.cjs → utilities-CkQA3Fkh.cjs} +4 -4
  73. package/dist/utils.cjs +4 -4
  74. package/dist/utils.d.cts +1 -1
  75. package/dist/utils.d.mts +1 -1
  76. package/dist/utils.mjs +4 -4
  77. package/package.json +4 -4
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { n as isNonEmptyString } from "./primitives-dXzXlzJw.mjs";
17
+ import { n as isNonEmptyString } from "./primitives-DpMa2dS2.mjs";
18
18
 
19
- //#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/basics.js
19
+ //#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/string/basics.js
20
20
  function trimString(input) {
21
21
  if (!input) return "";
22
22
  if (isNonEmptyString(input)) return input.trim().replace(/\s+/g, " ");
@@ -25,7 +25,7 @@ function trimString(input) {
25
25
  }
26
26
 
27
27
  //#endregion
28
- //#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/convert.js
28
+ //#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/string/convert.js
29
29
  const reverseString = (input) => {
30
30
  return trimString(input)?.split("")?.reverse()?.join("");
31
31
  };
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- const require_primitives = require('./primitives-CtuSNmV7.cjs');
17
+ const require_primitives = require('./primitives-DutXlR0D.cjs');
18
18
 
19
- //#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/basics.js
19
+ //#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/string/basics.js
20
20
  function trimString(input) {
21
21
  if (!input) return "";
22
22
  if (require_primitives.isNonEmptyString(input)) return input.trim().replace(/\s+/g, " ");
@@ -25,7 +25,7 @@ function trimString(input) {
25
25
  }
26
26
 
27
27
  //#endregion
28
- //#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/convert.js
28
+ //#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/string/convert.js
29
29
  const reverseString = (input) => {
30
30
  return trimString(input)?.split("")?.reverse()?.join("");
31
31
  };
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { isValidTime } from "./guards.mjs";
18
- import { n as extractHourMinute, p as getTotalMinutes } from "./utilities-BGX8dviZ.mjs";
18
+ import { n as extractHourMinute, p as getTotalMinutes } from "./utilities-C_cYlUNI.mjs";
19
19
 
20
20
  //#region src/utils/greet.ts
21
21
  /**
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  const require_guards = require('./guards.cjs');
18
- const require_utilities = require('./utilities-D47SN9EZ.cjs');
18
+ const require_utilities = require('./utilities-CZTvwfjY.cjs');
19
19
 
20
20
  //#region src/utils/greet.ts
21
21
  /**
package/dist/guards.cjs CHANGED
@@ -16,9 +16,9 @@
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
18
  const require_timezone = require('./timezone-BNnHFgki.cjs');
19
- const require_primitives = require('./primitives-CtuSNmV7.cjs');
20
- const require_non_primitives = require('./non-primitives-D9zxCwX8.cjs');
21
- const require_utilities = require('./utilities-CpF3uys3.cjs');
19
+ const require_primitives = require('./primitives-DutXlR0D.cjs');
20
+ const require_non_primitives = require('./non-primitives-Dj558axv.cjs');
21
+ const require_utilities = require('./utilities-CkQA3Fkh.cjs');
22
22
 
23
23
  //#region src/guards.ts
24
24
  /**
package/dist/guards.d.cts CHANGED
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { Dt as TimeWithUnit, Lt as UTCOffset, Sn as Numeric, X as $TimeZoneIdentifier, jt as TimeZoneIdNative, ot as DateLike, rt as ClockTime } from "./types-CaVuY1_4.cjs";
17
+ import { Cn as Numeric, Mt as TimeZoneIdNative, Ot as TimeWithUnit, Rt as UTCOffset, Z as $TimeZoneIdentifier, it as ClockTime, st as DateLike } from "./types-DgRC-2cA.cjs";
18
18
 
19
19
  //#region src/guards.d.ts
20
20
  /**
package/dist/guards.d.mts CHANGED
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { Dt as TimeWithUnit, Lt as UTCOffset, Sn as Numeric, X as $TimeZoneIdentifier, jt as TimeZoneIdNative, ot as DateLike, rt as ClockTime } from "./types-Bs_rfkka.mjs";
17
+ import { Cn as Numeric, Mt as TimeZoneIdNative, Ot as TimeWithUnit, Rt as UTCOffset, Z as $TimeZoneIdentifier, it as ClockTime, st as DateLike } from "./types-Nd89nk1B.mjs";
18
18
 
19
19
  //#region src/guards.d.ts
20
20
  /**
package/dist/guards.mjs CHANGED
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  import { n as NATIVE_TZ_IDS, t as IANA_TZ_IDS } from "./timezone-Db2CeL32.mjs";
18
- import { n as isNonEmptyString, t as isBoolean } from "./primitives-dXzXlzJw.mjs";
19
- import { r as isObject, t as isFunction } from "./non-primitives-DBtomDty.mjs";
20
- import { a as isNumericString, n as normalizeNumber } from "./utilities-BKtVo78T.mjs";
18
+ import { n as isNonEmptyString, t as isBoolean } from "./primitives-DpMa2dS2.mjs";
19
+ import { r as isObject, t as isFunction } from "./non-primitives-B38XfU4A.mjs";
20
+ import { a as isNumericString, n as normalizeNumber } from "./utilities-BfGFB7aw.mjs";
21
21
 
22
22
  //#region src/guards.ts
23
23
  /**
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  const require_basic = require('./basic-DsQqC5nZ.cjs');
18
- const require_primitives = require('./primitives-CtuSNmV7.cjs');
19
- const require_non_primitives = require('./non-primitives-D9zxCwX8.cjs');
20
- const require_utilities = require('./utilities-CpF3uys3.cjs');
18
+ const require_primitives = require('./primitives-DutXlR0D.cjs');
19
+ const require_non_primitives = require('./non-primitives-Dj558axv.cjs');
20
+ const require_utilities = require('./utilities-CkQA3Fkh.cjs');
21
21
  const require_guards = require('./guards.cjs');
22
22
 
23
23
  //#region src/utils/helpers.ts
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  import { c as MONTHS, d as SORTED_TIME_FORMATS, i as BN_SEASONS, o as DAYS, r as BN_MONTH_TABLES, u as MS_PER_DAY } from "./basic-DqKyujoj.mjs";
18
- import { i as isString, n as isNonEmptyString } from "./primitives-dXzXlzJw.mjs";
19
- import { a as isValidArray, i as isObjectWithKeys } from "./non-primitives-DBtomDty.mjs";
20
- import { t as getOrdinal } from "./utilities-BKtVo78T.mjs";
18
+ import { i as isString, n as isNonEmptyString } from "./primitives-DpMa2dS2.mjs";
19
+ import { a as isValidArray, i as isObjectWithKeys } from "./non-primitives-B38XfU4A.mjs";
20
+ import { t as getOrdinal } from "./utilities-BfGFB7aw.mjs";
21
21
  import { isDate, isDateString, isLeapYear, isValidUTCOffset } from "./guards.mjs";
22
22
 
23
23
  //#region src/utils/helpers.ts
package/dist/index.cjs CHANGED
@@ -16,11 +16,11 @@
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
18
  const require_basic = require('./basic-DsQqC5nZ.cjs');
19
- const require_primitives = require('./primitives-CtuSNmV7.cjs');
20
- const require_non_primitives = require('./non-primitives-D9zxCwX8.cjs');
19
+ const require_primitives = require('./primitives-DutXlR0D.cjs');
20
+ const require_non_primitives = require('./non-primitives-Dj558axv.cjs');
21
21
  const require_guards = require('./guards.cjs');
22
- const require_helpers = require('./helpers-CQzi908i.cjs');
23
- const require_utilities = require('./utilities-D47SN9EZ.cjs');
22
+ const require_helpers = require('./helpers-D8yAKOsC.cjs');
23
+ const require_utilities = require('./utilities-CZTvwfjY.cjs');
24
24
 
25
25
  //#region src/utils/chronos-fn.ts
26
26
  /**
@@ -641,46 +641,46 @@ var Chronos = class Chronos {
641
641
  /**
642
642
  * @instance Checks if another date is the same as this one in a specific unit.
643
643
  * @param other The other date to compare.
644
- * @param unit The unit to compare.
645
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
644
+ * @param unit The unit to compare. Default is `'millisecond'`.
645
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
646
646
  */
647
- isSame(other, unit, weekStartsOn = 0) {
647
+ isSame(other, unit = "millisecond", weekStartsOn = 0) {
648
648
  return this.startOf(unit, weekStartsOn).#timestamp === Chronos.#cast(other).startOf(unit, weekStartsOn).#timestamp;
649
649
  }
650
650
  /**
651
651
  * @instance Checks if this date is before another date in a specific unit.
652
652
  * @param other The other date to compare.
653
- * @param unit The unit to compare.
654
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
653
+ * @param unit The unit to compare. Default is ``millisecond``.
654
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
655
655
  */
656
- isBefore(other, unit, weekStartsOn = 0) {
656
+ isBefore(other, unit = "millisecond", weekStartsOn = 0) {
657
657
  return this.startOf(unit, weekStartsOn).#timestamp < Chronos.#cast(other).startOf(unit, weekStartsOn).#timestamp;
658
658
  }
659
659
  /**
660
660
  * @instance Checks if this date is after another date in a specific unit.
661
661
  * @param other The other date to compare.
662
- * @param unit The unit to compare.
663
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
662
+ * @param unit The unit to compare. Default is `'millisecond'`.
663
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
664
664
  */
665
- isAfter(other, unit, weekStartsOn = 0) {
665
+ isAfter(other, unit = "millisecond", weekStartsOn = 0) {
666
666
  return this.startOf(unit, weekStartsOn).#timestamp > Chronos.#cast(other).startOf(unit, weekStartsOn).#timestamp;
667
667
  }
668
668
  /**
669
669
  * @instance Checks if this date is the same or before another date in a specific unit.
670
670
  * @param other The other date to compare.
671
- * @param unit The unit to compare.
672
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
671
+ * @param unit The unit to compare. Default is `'millisecond'`.
672
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
673
673
  */
674
- isSameOrBefore(other, unit, weekStartsOn = 0) {
674
+ isSameOrBefore(other, unit = "millisecond", weekStartsOn = 0) {
675
675
  return this.isSame(other, unit, weekStartsOn) || this.isBefore(other, unit, weekStartsOn);
676
676
  }
677
677
  /**
678
678
  * @instance Checks if this date is the same or after another date in a specific unit.
679
679
  * @param other The other date to compare.
680
- * @param unit The unit to compare.
681
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
680
+ * @param unit The unit to compare. Default is `'millisecond'`.
681
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
682
682
  */
683
- isSameOrAfter(other, unit, weekStartsOn = 0) {
683
+ isSameOrAfter(other, unit = "millisecond", weekStartsOn = 0) {
684
684
  return this.isSame(other, unit, weekStartsOn) || this.isAfter(other, unit, weekStartsOn);
685
685
  }
686
686
  /**
@@ -739,7 +739,7 @@ var Chronos = class Chronos {
739
739
  /**
740
740
  * @instance Returns a new `Chronos` instance at the start of a given unit.
741
741
  * @param unit The unit to reset (e.g., year, month, day).
742
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
742
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
743
743
  */
744
744
  startOf(unit, weekStartsOn = 0) {
745
745
  const d = new Date(this.#date);
@@ -777,7 +777,7 @@ var Chronos = class Chronos {
777
777
  /**
778
778
  * @instance Returns a new `Chronos` instance at the end of a given unit.
779
779
  * @param unit The unit to adjust (e.g., year, month, day).
780
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
780
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
781
781
  */
782
782
  endOf(unit, weekStartsOn = 0) {
783
783
  const instance = this.startOf(unit, weekStartsOn).add(1, unit).add(-1, "millisecond");
@@ -972,7 +972,7 @@ var Chronos = class Chronos {
972
972
  }
973
973
  /**
974
974
  * @instance Calculates the week number of the year based on custom week start.
975
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
975
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
976
976
  * @returns Week number (1-53).
977
977
  */
978
978
  getWeekOfYear(weekStartsOn = 0) {
package/dist/index.d.cts CHANGED
@@ -15,5 +15,5 @@
15
15
  */
16
16
 
17
17
  import { D as INTERNALS } from "./seasons-CpUn45n6.cjs";
18
- import { Bt as Chronos, Vt as chronos } from "./types-CaVuY1_4.cjs";
18
+ import { Ht as chronos, Vt as Chronos } from "./types-DgRC-2cA.cjs";
19
19
  export { Chronos, INTERNALS, chronos };
package/dist/index.d.mts CHANGED
@@ -15,5 +15,5 @@
15
15
  */
16
16
 
17
17
  import { D as INTERNALS } from "./seasons-B_kjFWIX.mjs";
18
- import { Bt as Chronos, Vt as chronos } from "./types-Bs_rfkka.mjs";
18
+ import { Ht as chronos, Vt as Chronos } from "./types-Nd89nk1B.mjs";
19
19
  export { Chronos, INTERNALS, chronos };
package/dist/index.mjs CHANGED
@@ -15,11 +15,11 @@
15
15
  */
16
16
 
17
17
  import { c as MONTHS, o as DAYS, s as INTERNALS, u as MS_PER_DAY } from "./basic-DqKyujoj.mjs";
18
- import { r as isNumber } from "./primitives-dXzXlzJw.mjs";
19
- import { t as isFunction } from "./non-primitives-DBtomDty.mjs";
18
+ import { r as isNumber } from "./primitives-DpMa2dS2.mjs";
19
+ import { t as isFunction } from "./non-primitives-B38XfU4A.mjs";
20
20
  import { isDateString, isLeapYear } from "./guards.mjs";
21
- import { c as _hasChronosProperties, n as _dateArgsToDate, p as _resolveNativeTzName, r as _formatDate, u as _normalizeOffset } from "./helpers-DEf4sevD.mjs";
22
- import { l as getNativeTimeZoneId, r as extractMinutesFromUTC } from "./utilities-BGX8dviZ.mjs";
21
+ import { c as _hasChronosProperties, n as _dateArgsToDate, p as _resolveNativeTzName, r as _formatDate, u as _normalizeOffset } from "./helpers-eVQCueAC.mjs";
22
+ import { l as getNativeTimeZoneId, r as extractMinutesFromUTC } from "./utilities-C_cYlUNI.mjs";
23
23
 
24
24
  //#region src/utils/chronos-fn.ts
25
25
  /**
@@ -640,46 +640,46 @@ var Chronos = class Chronos {
640
640
  /**
641
641
  * @instance Checks if another date is the same as this one in a specific unit.
642
642
  * @param other The other date to compare.
643
- * @param unit The unit to compare.
644
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
643
+ * @param unit The unit to compare. Default is `'millisecond'`.
644
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
645
645
  */
646
- isSame(other, unit, weekStartsOn = 0) {
646
+ isSame(other, unit = "millisecond", weekStartsOn = 0) {
647
647
  return this.startOf(unit, weekStartsOn).#timestamp === Chronos.#cast(other).startOf(unit, weekStartsOn).#timestamp;
648
648
  }
649
649
  /**
650
650
  * @instance Checks if this date is before another date in a specific unit.
651
651
  * @param other The other date to compare.
652
- * @param unit The unit to compare.
653
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
652
+ * @param unit The unit to compare. Default is ``millisecond``.
653
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
654
654
  */
655
- isBefore(other, unit, weekStartsOn = 0) {
655
+ isBefore(other, unit = "millisecond", weekStartsOn = 0) {
656
656
  return this.startOf(unit, weekStartsOn).#timestamp < Chronos.#cast(other).startOf(unit, weekStartsOn).#timestamp;
657
657
  }
658
658
  /**
659
659
  * @instance Checks if this date is after another date in a specific unit.
660
660
  * @param other The other date to compare.
661
- * @param unit The unit to compare.
662
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
661
+ * @param unit The unit to compare. Default is `'millisecond'`.
662
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
663
663
  */
664
- isAfter(other, unit, weekStartsOn = 0) {
664
+ isAfter(other, unit = "millisecond", weekStartsOn = 0) {
665
665
  return this.startOf(unit, weekStartsOn).#timestamp > Chronos.#cast(other).startOf(unit, weekStartsOn).#timestamp;
666
666
  }
667
667
  /**
668
668
  * @instance Checks if this date is the same or before another date in a specific unit.
669
669
  * @param other The other date to compare.
670
- * @param unit The unit to compare.
671
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
670
+ * @param unit The unit to compare. Default is `'millisecond'`.
671
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
672
672
  */
673
- isSameOrBefore(other, unit, weekStartsOn = 0) {
673
+ isSameOrBefore(other, unit = "millisecond", weekStartsOn = 0) {
674
674
  return this.isSame(other, unit, weekStartsOn) || this.isBefore(other, unit, weekStartsOn);
675
675
  }
676
676
  /**
677
677
  * @instance Checks if this date is the same or after another date in a specific unit.
678
678
  * @param other The other date to compare.
679
- * @param unit The unit to compare.
680
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
679
+ * @param unit The unit to compare. Default is `'millisecond'`.
680
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
681
681
  */
682
- isSameOrAfter(other, unit, weekStartsOn = 0) {
682
+ isSameOrAfter(other, unit = "millisecond", weekStartsOn = 0) {
683
683
  return this.isSame(other, unit, weekStartsOn) || this.isAfter(other, unit, weekStartsOn);
684
684
  }
685
685
  /**
@@ -738,7 +738,7 @@ var Chronos = class Chronos {
738
738
  /**
739
739
  * @instance Returns a new `Chronos` instance at the start of a given unit.
740
740
  * @param unit The unit to reset (e.g., year, month, day).
741
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
741
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
742
742
  */
743
743
  startOf(unit, weekStartsOn = 0) {
744
744
  const d = new Date(this.#date);
@@ -776,7 +776,7 @@ var Chronos = class Chronos {
776
776
  /**
777
777
  * @instance Returns a new `Chronos` instance at the end of a given unit.
778
778
  * @param unit The unit to adjust (e.g., year, month, day).
779
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
779
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
780
780
  */
781
781
  endOf(unit, weekStartsOn = 0) {
782
782
  const instance = this.startOf(unit, weekStartsOn).add(1, unit).add(-1, "millisecond");
@@ -971,7 +971,7 @@ var Chronos = class Chronos {
971
971
  }
972
972
  /**
973
973
  * @instance Calculates the week number of the year based on custom week start.
974
- * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
974
+ * @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
975
975
  * @returns Week number (1-53).
976
976
  */
977
977
  getWeekOfYear(weekStartsOn = 0) {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- //#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/guards/non-primitives.js
17
+ //#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/guards/non-primitives.js
18
18
  function isArray(value) {
19
19
  return Array.isArray(value);
20
20
  }
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
 
18
- //#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/guards/non-primitives.js
18
+ //#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/guards/non-primitives.js
19
19
  function isArray(value) {
20
20
  return Array.isArray(value);
21
21
  }
@@ -16,11 +16,11 @@
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
18
  const require_basic = require('../basic-DsQqC5nZ.cjs');
19
- const require_primitives = require('../primitives-CtuSNmV7.cjs');
20
- const require_utilities = require('../utilities-CpF3uys3.cjs');
21
- const require_helpers = require('../helpers-CQzi908i.cjs');
19
+ const require_primitives = require('../primitives-DutXlR0D.cjs');
20
+ const require_utilities = require('../utilities-CkQA3Fkh.cjs');
21
+ const require_helpers = require('../helpers-D8yAKOsC.cjs');
22
22
 
23
- //#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/number/convert.js
23
+ //#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/number/convert.js
24
24
  function digitToBangla(digit, preserveNonDigit = true) {
25
25
  const banglaDigits = Object.keys(require_utilities.BN_DIGITS);
26
26
  const _matchAndConvert = (value) => {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { $t as BanglaDayName, C as $Chronos, Ht as $BanglaMonth, Kt as $BnEn, Qt as BanglaDateOptions, Ut as $BanglaMonthDate, Wt as $BanglaYear, Zt as BanglaDateObject, gn as StrictFormat, in as BnCalendarConfig, nn as BanglaSeasonName, tn as BanglaMonthName } from "../types-CaVuY1_4.cjs";
17
+ import { $t as BanglaDateOptions, Gt as $BanglaYear, Qt as BanglaDateObject, Ut as $BanglaMonth, Wt as $BanglaMonthDate, _n as StrictFormat, an as BnCalendarConfig, en as BanglaDayName, nn as BanglaMonthName, o as ChronosPlugin, qt as $BnEn, rn as BanglaSeasonName } from "../types-DgRC-2cA.cjs";
18
18
 
19
19
  //#region src/plugins/banglaPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -236,6 +236,6 @@ declare module 'chronos-date' {
236
236
  }
237
237
  }
238
238
  /** * Plugin to inject methods related to Bangla calendar system (`Bongabdo`) */
239
- declare const banglaPlugin: ($Chronos: $Chronos) => void;
239
+ declare const banglaPlugin: ChronosPlugin;
240
240
  //#endregion
241
241
  export { banglaPlugin };
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { $t as BanglaDayName, C as $Chronos, Ht as $BanglaMonth, Kt as $BnEn, Qt as BanglaDateOptions, Ut as $BanglaMonthDate, Wt as $BanglaYear, Zt as BanglaDateObject, gn as StrictFormat, in as BnCalendarConfig, nn as BanglaSeasonName, tn as BanglaMonthName } from "../types-Bs_rfkka.mjs";
17
+ import { $t as BanglaDateOptions, Gt as $BanglaYear, Qt as BanglaDateObject, Ut as $BanglaMonth, Wt as $BanglaMonthDate, _n as StrictFormat, an as BnCalendarConfig, en as BanglaDayName, nn as BanglaMonthName, o as ChronosPlugin, qt as $BnEn, rn as BanglaSeasonName } from "../types-Nd89nk1B.mjs";
18
18
 
19
19
  //#region src/plugins/banglaPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -236,6 +236,6 @@ declare module 'chronos-date' {
236
236
  }
237
237
  }
238
238
  /** * Plugin to inject methods related to Bangla calendar system (`Bongabdo`) */
239
- declare const banglaPlugin: ($Chronos: $Chronos) => void;
239
+ declare const banglaPlugin: ChronosPlugin;
240
240
  //#endregion
241
241
  export { banglaPlugin };
@@ -15,11 +15,11 @@
15
15
  */
16
16
 
17
17
  import { n as BN_MONTHS, s as INTERNALS, t as BN_DAYS } from "../basic-DqKyujoj.mjs";
18
- import { n as isNonEmptyString, r as isNumber } from "../primitives-dXzXlzJw.mjs";
19
- import { a as isNumericString, i as BN_DIGITS } from "../utilities-BKtVo78T.mjs";
20
- import { a as _getBnSeason, d as _padShunno, i as _formatDateCore, l as _isBnLeapYear, o as _getBnYear, t as _bnDaysMonthIdx } from "../helpers-DEf4sevD.mjs";
18
+ import { n as isNonEmptyString, r as isNumber } from "../primitives-DpMa2dS2.mjs";
19
+ import { a as isNumericString, i as BN_DIGITS } from "../utilities-BfGFB7aw.mjs";
20
+ import { a as _getBnSeason, d as _padShunno, i as _formatDateCore, l as _isBnLeapYear, o as _getBnYear, t as _bnDaysMonthIdx } from "../helpers-eVQCueAC.mjs";
21
21
 
22
- //#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/number/convert.js
22
+ //#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/number/convert.js
23
23
  function digitToBangla(digit, preserveNonDigit = true) {
24
24
  const banglaDigits = Object.keys(BN_DIGITS);
25
25
  const _matchAndConvert = (value) => {
@@ -16,8 +16,8 @@
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
18
  const require_basic = require('../basic-DsQqC5nZ.cjs');
19
- const require_primitives = require('../primitives-CtuSNmV7.cjs');
20
- const require_non_primitives = require('../non-primitives-D9zxCwX8.cjs');
19
+ const require_primitives = require('../primitives-DutXlR0D.cjs');
20
+ const require_non_primitives = require('../non-primitives-Dj558axv.cjs');
21
21
 
22
22
  //#region src/plugins/businessPlugin.ts
23
23
  /** * Plugin to inject `business` related methods */
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, Cn as Enumerate, D as ChronosInput, En as RangeTuple, a as BusinessOptionsWeekends, i as BusinessOptionsBasic, r as AcademicYear, wn as NumberRange, wt as Quarter } from "../types-CaVuY1_4.cjs";
17
+ import { D as ChronosInput, Dn as RangeTuple, Tn as NumberRange, Tt as Quarter, a as BusinessOptionsWeekends, i as BusinessOptionsBasic, o as ChronosPlugin, r as AcademicYear, wn as Enumerate } from "../types-DgRC-2cA.cjs";
18
18
 
19
19
  //#region src/plugins/businessPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -116,7 +116,7 @@ declare module 'chronos-date' {
116
116
  * // Custom 3-day weekend (Fri, Sat, Sun)
117
117
  * new Chronos().nextWorkday(1, 3);
118
118
  */
119
- nextWorkday(weekStartsOn?: Enumerate<7>, weekendLength?: NumberRange<1, 4>): Chronos;
119
+ nextWorkday(weekStartsOn?: Enumerate<7>, weekendLength?: NumberRange<1, 4>): this;
120
120
  /**
121
121
  * @instance Returns the next business day (workday) after the current date using custom weekend day indices.
122
122
  *
@@ -135,7 +135,7 @@ declare module 'chronos-date' {
135
135
  * // Custom weekend days (Friday, Saturday, Sunday)
136
136
  * new Chronos().nextWorkday([5, 6, 0]);
137
137
  */
138
- nextWorkday(weekendDays: RangeTuple<Enumerate<7>, 1, 4>): Chronos;
138
+ nextWorkday(weekendDays: RangeTuple<Enumerate<7>, 1, 4>): this;
139
139
  /**
140
140
  * @instance Returns the next weekend day after the current date using week start day and weekend length.
141
141
  *
@@ -161,7 +161,7 @@ declare module 'chronos-date' {
161
161
  * // Custom 3-day weekend (Fri, Sat, Sun)
162
162
  * new Chronos().nextWeekend(1, 3);
163
163
  */
164
- nextWeekend(weekStartsOn?: Enumerate<7>, weekendLength?: NumberRange<1, 4>): Chronos;
164
+ nextWeekend(weekStartsOn?: Enumerate<7>, weekendLength?: NumberRange<1, 4>): this;
165
165
  /**
166
166
  * @instance Returns the next weekend day after the current date using custom weekend day indices.
167
167
  *
@@ -180,7 +180,7 @@ declare module 'chronos-date' {
180
180
  * // Custom weekend days (Sunday, Friday, Saturday)
181
181
  * new Chronos().nextWeekend([0, 5, 6]);
182
182
  */
183
- nextWeekend(weekendDays: RangeTuple<Enumerate<7>, 1, 4>): Chronos;
183
+ nextWeekend(weekendDays: RangeTuple<Enumerate<7>, 1, 4>): this;
184
184
  /**
185
185
  * @instance Returns the previous workday before the current date using week start day and weekend length.
186
186
  *
@@ -206,7 +206,7 @@ declare module 'chronos-date' {
206
206
  * // Custom 3-day weekend (Fri, Sat, Sun)
207
207
  * new Chronos().previousWorkday(1, 3);
208
208
  */
209
- previousWorkday(weekStartsOn?: Enumerate<7>, weekendLength?: NumberRange<1, 4>): Chronos;
209
+ previousWorkday(weekStartsOn?: Enumerate<7>, weekendLength?: NumberRange<1, 4>): this;
210
210
  /**
211
211
  * @instance Returns the previous workday before the current date using custom weekend day indices.
212
212
  *
@@ -225,7 +225,7 @@ declare module 'chronos-date' {
225
225
  * // Custom weekend days (Friday, Saturday, Sunday)
226
226
  * new Chronos().previousWorkday([5, 6, 0]);
227
227
  */
228
- previousWorkday(weekendDays: RangeTuple<Enumerate<7>, 1, 4>): Chronos;
228
+ previousWorkday(weekendDays: RangeTuple<Enumerate<7>, 1, 4>): this;
229
229
  /**
230
230
  * @instance Returns the previous weekend day before the current date using week start day and weekend length.
231
231
  *
@@ -251,7 +251,7 @@ declare module 'chronos-date' {
251
251
  * // Custom 3-day weekend (Fri, Sat, Sun)
252
252
  * new Chronos().previousWeekend(1, 3);
253
253
  */
254
- previousWeekend(weekStartsOn?: Enumerate<7>, weekendLength?: NumberRange<1, 4>): Chronos;
254
+ previousWeekend(weekStartsOn?: Enumerate<7>, weekendLength?: NumberRange<1, 4>): this;
255
255
  /**
256
256
  * @instance Returns the previous weekend day before the current date using custom weekend day indices.
257
257
  *
@@ -270,7 +270,7 @@ declare module 'chronos-date' {
270
270
  * // Custom weekend days (Sunday, Friday, Saturday)
271
271
  * new Chronos().previousWeekend([0, 5, 6]);
272
272
  */
273
- previousWeekend(weekendDays: RangeTuple<Enumerate<7>, 1, 4>): Chronos;
273
+ previousWeekend(weekendDays: RangeTuple<Enumerate<7>, 1, 4>): this;
274
274
  /**
275
275
  * @instance Calculates the number of workdays between the current date and another using week start day and weekend length.
276
276
  *
@@ -457,6 +457,6 @@ declare module 'chronos-date' {
457
457
  }
458
458
  }
459
459
  /** * Plugin to inject `business` related methods */
460
- declare const businessPlugin: ($Chronos: $Chronos) => void;
460
+ declare const businessPlugin: ChronosPlugin;
461
461
  //#endregion
462
462
  export { businessPlugin };