nhb-toolbox 3.9.27 → 3.9.50

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.
@@ -4,41 +4,85 @@ import type { AlphaColors, ColorType, Hex6, Hex8, HSL, HSLA, OpacityValue, RGB,
4
4
  * * It has 1 instance method `applyOpacity()` to apply opacity to `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` color.
5
5
  * * It has 6 static methods that can be used to check if a color is in `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` format.
6
6
  *
7
- * @property {Hex} hex - The color in `Hex` format.
8
- * @property {Hex8} hex8 - The color in `Hex8` format.
9
- * @property {RGB} rgb - The color in `RGB` format.
10
- * @property {RGBA} rgba - The color in `RGBA` format.
11
- * @property {HSL} hsl - The color in `HSL` format.
12
- * @property {HSLA} hsla - The color in `HSLA` format.
13
- *
14
- * @example
15
- * const color = new Color("#ff5733"); // Accepts a color in `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` format.
16
- * console.log(color.hex); // Get Hex equivalent
17
- * console.log(color.hex8); // Get Hex8 equivalent
18
- * console.log(color.rgb); // Get RGB equivalent
19
- * console.log(color.rgba); // Get RGBA equivalent
20
- * console.log(color.hsl); // Get HSL equivalent
21
- * console.log(color.hsla); // Get HSLA equivalent
22
- *
23
- * @example
24
- * const randomColor = new Color(); // Generate a random color
25
- * console.log(randomColor.hex, randomColor.rgb, randomColor.hsl, randomColor.hex8, randomColor.rgba, randomColor.hsla); // Get RGBA and HSLA equivalent
7
+ * @property hex - The color in `Hex` format.
8
+ * @property hex8 - The color in `Hex8` format.
9
+ * @property rgb - The color in `RGB` format.
10
+ * @property rgba - The color in `RGBA` format.
11
+ * @property hsl - The color in `HSL` format.
12
+ * @property hsla - The color in `HSLA` format.
26
13
  */
27
14
  export declare class Color {
15
+ #private;
28
16
  hex: Hex6;
29
17
  hex8: Hex8;
30
18
  rgb: RGB;
31
19
  rgba: RGBA;
32
20
  hsl: HSL;
33
21
  hsla: HSLA;
34
- /** - Iterates over the color representations (Hex, RGB, HSL). */
35
- [Symbol.iterator](): Generator<Hex6 | RGB | HSL | Hex8 | RGBA | HSLA, void, unknown>;
36
22
  /**
37
- * * Creates a new `Color` instance, optionally converts an input color to other 5 different color formats.
23
+ * * Creates a new `Color` instance with a random color and automatically converts the generated color to all other supported formats: `Hex`, `Hex8`, `RGB`, `RGBA`, `HSL`, and `HSLA`.
24
+ *
25
+ * @description
26
+ * The `Color` class generates a random color in six common color representations:
27
+ * - `Hex` (e.g., `#ff5733`)
28
+ * - `Hex8` (Hex with opacity, e.g., `#ff573380`)
29
+ * - `RGB` (e.g., `rgb(255, 87, 51)`)
30
+ * - `RGBA` (e.g., `rgba(255, 87, 51, 1)`)
31
+ * - `HSL` (e.g., `hsl(14, 100%, 60%)`)
32
+ * - `HSLA` (e.g., `hsla(14, 100%, 60%, 1)`)
33
+ *
34
+ * Additionally:
35
+ * - Use `.applyOpacity(opacity)` to modify or add opacity to the color.
36
+ * - Use static methods like `Color.isHex6(color)` to validate color strings.
37
+ *
38
+ * @example
39
+ * // Generate a random color
40
+ * const randomColor = new Color();
41
+ * console.log(randomColor.hex, randomColor.rgb, randomColor.hsl);
42
+ *
43
+ * @returns Instance of `Color`.
44
+ */
45
+ constructor();
46
+ /**
47
+ * * Creates a new `Color` instance with the input color and automatically converts it to all other supported formats: `Hex`, `Hex8`, `RGB`, `RGBA`, `HSL`, and `HSLA`.
48
+ *
49
+ * @description
50
+ * The `Color` class allows seamless transformation between six common color representations:
51
+ * - `Hex` (e.g., `#ff5733`)
52
+ * - `Hex8` (Hex with opacity, e.g., `#ff573380`)
53
+ * - `RGB` (e.g., `rgb(255, 87, 51)`)
54
+ * - `RGBA` (e.g., `rgba(255, 87, 51, 1)`)
55
+ * - `HSL` (e.g., `hsl(14, 100%, 60%)`)
56
+ * - `HSLA` (e.g., `hsla(14, 100%, 60%, 1)`)
38
57
  *
39
- * @param toConvert - The color to convert. If not provided, a random color is generated.
58
+ * You can create a color from any of these formats, and the class will populate the rest.
59
+ *
60
+ * Additionally:
61
+ * - Use `.applyOpacity(opacity)` to modify or add opacity to the color.
62
+ * - Use available 6 static methods like `Color.isHex6(color)` to validate color strings.
63
+ *
64
+ * @param toConvert - A color string in any supported format (`Hex`, `Hex8`, `RGB`, `RGBA`, `HSL`, or `HSLA`) to convert in all other formats (includes the current format).
65
+ *
66
+ * @example
67
+ * // Convert an existing Hex color to all other formats
68
+ * const color = new Color("#ff5733");
69
+ * console.log(color.rgb); // 'rgb(255, 87, 51)'
70
+ * console.log(color.hsl); // 'hsl(14, 100%, 60%)'
71
+ * console.log(color.rgba); // 'rgba(255, 87, 51, 1)'
72
+ * console.log(color.hsla); // 'hsla(14, 100%, 60%, 1)'
73
+ * console.log(color.hex8); // '#FF5733FF'
74
+ *
75
+ * @example
76
+ * // Handle a color with alpha
77
+ * const alphaColor = new Color("rgba(255, 0, 0, 0.5)");
78
+ * console.log(alphaColor.hex8); // '#FF000080'
79
+ * console.log(alphaColor.hsla); // 'hsla(0, 100%, 50%, 0.5)'
80
+ *
81
+ * @returns Instance of `Color`.
40
82
  */
41
- constructor(toConvert?: ColorType);
83
+ constructor(toConvert: ColorType);
84
+ /** - Iterates over the color representations (Hex, RGB, HSL). */
85
+ [Symbol.iterator](): Generator<Hex6 | RGB | HSL | Hex8 | RGBA | HSLA, void, unknown>;
42
86
  /**
43
87
  * * Applies or modifies the opacity of a color.
44
88
  * - For solid colors (Hex6/RGB/HSL): Adds an alpha channel with the specified opacity
@@ -100,12 +144,5 @@ export declare class Color {
100
144
  * @returns Boolean: `true` if it's an `HSLA` color, `false` if not.
101
145
  */
102
146
  static isHSLA(color: string): color is HSLA;
103
- /**
104
- * @private Converts the given color to all other formats while preserving the original.
105
- *
106
- * @param color - The color to convert.
107
- * @returns An object containing Hex, RGB, and HSL representations.
108
- */
109
- private _convertColorToOthers;
110
147
  }
111
148
  //# sourceMappingURL=Color.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../src/colors/Color.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,WAAW,EACX,MAAM,SAAS,CAAC;AAKjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,KAAK;IACV,GAAG,EAAE,IAAI,CAAC;IACV,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,IAAI,CAAC;IAElB,iEAAiE;IAChE,CAAC,MAAM,CAAC,QAAQ,CAAC;IASlB;;;;OAIG;gBACS,SAAS,CAAC,EAAE,SAAS;IA2CjC;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,GAAG,WAAW;IAkB9D;;;;;OAKG;WACW,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI;IAIlD;;;;;OAKG;WACW,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI;IAIlD;;;;;OAKG;WACW,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG;IAIhD;;;;;OAKG;WACW,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI;IAMlD;;;;;OAKG;WACW,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG;IAIhD;;;;;OAKG;WACW,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI;IAMlD;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;CAuB7B"}
1
+ {"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../src/colors/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gb } = convertColorCode(hsl);
8
8
  * * It has 1 instance method `applyOpacity()` to apply opacity to `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` color.
9
9
  * * It has 6 static methods that can be used to check if a color is in `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` format.
10
10
  *
11
- * @property {Hex} hex - The color in `Hex` format.
12
- * @property {Hex8} hex8 - The color in `Hex8` format.
13
- * @property {RGB} rgb - The color in `RGB` format.
14
- * @property {RGBA} rgba - The color in `RGBA` format.
15
- * @property {HSL} hsl - The color in `HSL` format.
16
- * @property {HSLA} hsla - The color in `HSLA` format.
17
- *
18
- * @example
19
- * const color = new Color("#ff5733"); // Accepts a color in `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` format.
20
- * console.log(color.hex); // Get Hex equivalent
21
- * console.log(color.hex8); // Get Hex8 equivalent
22
- * console.log(color.rgb); // Get RGB equivalent
23
- * console.log(color.rgba); // Get RGBA equivalent
24
- * console.log(color.hsl); // Get HSL equivalent
25
- * console.log(color.hsla); // Get HSLA equivalent
26
- *
27
- * @example
28
- * const randomColor = new Color(); // Generate a random color
29
- * console.log(randomColor.hex, randomColor.rgb, randomColor.hsl, randomColor.hex8, randomColor.rgba, randomColor.hsla); // Get RGBA and HSLA equivalent
11
+ * @property hex - The color in `Hex` format.
12
+ * @property hex8 - The color in `Hex8` format.
13
+ * @property rgb - The color in `RGB` format.
14
+ * @property rgba - The color in `RGBA` format.
15
+ * @property hsl - The color in `HSL` format.
16
+ * @property hsla - The color in `HSLA` format.
30
17
  */
31
18
  export class Color {
32
19
  hex;
@@ -35,23 +22,52 @@ export class Color {
35
22
  rgba;
36
23
  hsl;
37
24
  hsla;
38
- /** - Iterates over the color representations (Hex, RGB, HSL). */
39
- *[Symbol.iterator]() {
40
- yield this.hex;
41
- yield this.hex8;
42
- yield this.rgb;
43
- yield this.rgba;
44
- yield this.hsl;
45
- yield this.hsla;
46
- }
47
25
  /**
48
- * * Creates a new `Color` instance, optionally converts an input color to other 5 different color formats.
26
+ * * Creates a new `Color` instance and automatically converts the input color to all other supported formats: `Hex`, `Hex8`, `RGB`, `RGBA`, `HSL`, and `HSLA`.
27
+ *
28
+ * @description
29
+ * The `Color` class allows seamless transformation between six common color representations:
30
+ * - `Hex` (e.g., `#ff5733`)
31
+ * - `Hex8` (Hex with opacity, e.g., `#ff573380`)
32
+ * - `RGB` (e.g., `rgb(255, 87, 51)`)
33
+ * - `RGBA` (e.g., `rgba(255, 87, 51, 1)`)
34
+ * - `HSL` (e.g., `hsl(14, 100%, 60%)`)
35
+ * - `HSLA` (e.g., `hsla(14, 100%, 60%, 1)`)
36
+ *
37
+ * You can create a color from any of these formats, and the class will populate the rest.
38
+ * If no color is passed, a random color will be generated.
39
+ *
40
+ * Additionally:
41
+ * - Use `.applyOpacity(opacity)` to modify or add opacity to the color.
42
+ * - Use static methods like `Color.isHex6(color)` to validate color strings.
43
+ *
44
+ * @param toConvert - An optional input color string in any supported format (`Hex`, `Hex8`, `RGB`, `RGBA`, `HSL`, or `HSLA`) to convert in all other (includes the current format) formats.
49
45
  *
50
- * @param toConvert - The color to convert. If not provided, a random color is generated.
46
+ * @example
47
+ * // Convert an existing Hex color to all other formats
48
+ * const color = new Color("#ff5733");
49
+ * console.log(color.rgb); // 'rgb(255, 87, 51)'
50
+ * console.log(color.hsl); // 'hsl(14, 100%, 60%)'
51
+ * console.log(color.rgba); // 'rgba(255, 87, 51, 1)'
52
+ * console.log(color.hsla); // 'hsla(14, 100%, 60%, 1)'
53
+ * console.log(color.hex8); // '#FF5733FF'
54
+ *
55
+ * @example
56
+ * // Handle a color with alpha
57
+ * const alphaColor = new Color("rgba(255, 0, 0, 0.5)");
58
+ * console.log(alphaColor.hex8); // '#FF000080'
59
+ * console.log(alphaColor.hsla); // 'hsla(0, 100%, 50%, 0.5)'
60
+ *
61
+ * @example
62
+ * // Generate a random color
63
+ * const randomColor = new Color();
64
+ * console.log(randomColor.hex, randomColor.rgb, randomColor.hsl);
65
+ *
66
+ * @returns Instance of `Color`.
51
67
  */
52
68
  constructor(toConvert) {
53
69
  if (toConvert) {
54
- const colors = this._convertColorToOthers(toConvert);
70
+ const colors = this.#convertColorToOthers(toConvert);
55
71
  if ('hex8' in colors) {
56
72
  // Extract alpha color values (Hex8, RGBA, HSLA)
57
73
  const rgbaValues = _extractAlphaColorValues(colors.rgba);
@@ -89,6 +105,15 @@ export class Color {
89
105
  this.hsla = `hsla(${hslValues[0]}, ${hslValues[1]}%, ${hslValues[2]}%, 1)`;
90
106
  }
91
107
  }
108
+ /** - Iterates over the color representations (Hex, RGB, HSL). */
109
+ *[Symbol.iterator]() {
110
+ yield this.hex;
111
+ yield this.hex8;
112
+ yield this.rgb;
113
+ yield this.rgba;
114
+ yield this.hsl;
115
+ yield this.hsla;
116
+ }
92
117
  /**
93
118
  * * Applies or modifies the opacity of a color.
94
119
  * - For solid colors (Hex6/RGB/HSL): Adds an alpha channel with the specified opacity
@@ -182,7 +207,7 @@ export class Color {
182
207
  * @param color - The color to convert.
183
208
  * @returns An object containing Hex, RGB, and HSL representations.
184
209
  */
185
- _convertColorToOthers(color) {
210
+ #convertColorToOthers(color) {
186
211
  if (Color.isHex6(color)) {
187
212
  const { rgb, hsl } = convertColorCode(color);
188
213
  return { hex: color, rgb, hsl };
@@ -207,6 +232,6 @@ export class Color {
207
232
  const { hex8, rgba } = convertColorCode(color);
208
233
  return { hex8, rgba, hsla: color };
209
234
  }
210
- throw new Error(`Unrecognized Color Format! ${color}`);
235
+ throw new Error(`Unrecognized color format: ${color}`);
211
236
  }
212
237
  }
@@ -1,19 +1,96 @@
1
1
  import type { LocaleCode } from '../number/types';
2
2
  import { ORIGIN } from './constants';
3
- import type { ChronosMethods, ChronosObject, FormatOptions, StrictFormat, TimeUnit, TimeZone, UTCOffSet } from './types';
3
+ import type { ChronosInput, ChronosMethods, ChronosObject, FormatOptions, StrictFormat, TimeUnit, TimeZone, UTCOffSet } from './types';
4
+ /**
5
+ * * Creates a new immutable `Chronos` instance.
6
+ *
7
+ * @param value - A date value (`number`, `string`, `Date`, or `Chronos` object).
8
+ * - If a string is provided, it should be in a format that can be parsed by the Date constructor.
9
+ * - If a number is provided, it should be a timestamp (milliseconds since the Unix epoch).
10
+ * - If a Date object is provided, it will be used as is.
11
+ * - If a Chronos object is provided, it will be converted to a Date object.
12
+ *
13
+ * **It also accepts number values as following:**
14
+ * - **`year, month, date, hours, minutes, seconds, milliseconds`**: Individual components of a date-time to construct a `Chronos` instance.
15
+ * - **`year`**: A number representing the year. If the year is between 0 and 99, it will be assumed to be the year 1900 + the provided year.
16
+ * - **`month`**: A number between 1 and 12 representing the month (1 for January, 12 for December). It is adjusted internally to a 0-based index (0 for January, 11 for December).
17
+ * - **`date`**: A number between 1 and 31 representing the day of the month.
18
+ * - **`hours`**: A number between 0 and 23 representing the hour of the day.
19
+ * - **`minutes`**: A number between 0 and 59 representing the minutes past the hour.
20
+ * - **`seconds`**: A number between 0 and 59 representing the seconds past the minute.
21
+ * - **`milliseconds`**: A number between 0 and 999 representing the milliseconds past the second.
22
+ *
23
+ * @returns Instance of `Chronos` with all methods and properties.
24
+ */
4
25
  export declare class Chronos {
5
26
  #private;
6
27
  [ORIGIN]?: ChronosMethods | 'root';
28
+ /**
29
+ * * Creates a new immutable `Chronos` instance.
30
+ *
31
+ * Accepts no arguments (defaults to now).
32
+ *
33
+ * @returns Instance of `Chronos` with all methods and properties.
34
+ */
35
+ constructor();
36
+ /**
37
+ * * Creates a new immutable `Chronos` instance.
38
+ *
39
+ * @param value - A date value in `number`, it should be a timestamp (milliseconds since the Unix epoch).
40
+ *
41
+ * @returns Instance of `Chronos` with all methods and properties.
42
+ */
43
+ constructor(value: number);
44
+ /**
45
+ * * Creates a new immutable `Chronos` instance.
46
+ *
47
+ * @param value - A date value in `string`, it should be in a format that can be parsed by the `Date` constructor.
48
+ *
49
+ * @returns Instance of `Chronos` with all methods and properties.
50
+ */
51
+ constructor(value: string);
52
+ /**
53
+ * * Creates a new immutable `Chronos` instance.
54
+ *
55
+ * @param value - A date value as `Date` object, it will be used as is.
56
+ *
57
+ * @returns Instance of `Chronos` with all methods and properties.
58
+ */
59
+ constructor(value: Date);
60
+ /**
61
+ * * Creates a new immutable `Chronos` instance.
62
+ *
63
+ * @param value - A date value as `Chronos` object.
64
+ *
65
+ * @returns Instance of `Chronos` with all methods and properties.
66
+ */
67
+ constructor(value: Chronos);
68
+ /**
69
+ * * Creates a new immutable `Chronos` instance.
70
+ *
71
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
72
+ * @param month The month as a number between 1 and 12 (January to December).
73
+ * @param date The date as a number between 1 and 31.
74
+ * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
75
+ * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
76
+ * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
77
+ * @param ms A number from 0 to 999 that specifies the milliseconds.
78
+ *
79
+ * @returns Instance of `Chronos` with all methods and properties.
80
+ */
81
+ constructor(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number);
7
82
  /**
8
83
  * * Creates a new immutable `Chronos` instance.
9
84
  *
10
85
  * @param value - A date value (`number`, `string`, `Date`, or `Chronos` object).
11
- * - If a string is provided, it should be in a format that can be parsed by the Date constructor.
86
+ * - If a string is provided, it should be in a format that can be parsed by the `Date` constructor.
12
87
  * - If a number is provided, it should be a timestamp (milliseconds since the Unix epoch).
13
88
  * - If a Date object is provided, it will be used as is.
14
- * - If a Chronos object is provided, it will be converted to a Date object.
89
+ * - If a Chronos object is provided, it will be used directly.
90
+ *
91
+ * @returns Instance of `Chronos` with all methods and properties.
15
92
  */
16
- constructor(value?: number | string | Date | Chronos);
93
+ constructor(value?: ChronosInput);
17
94
  [Symbol.iterator](): IterableIterator<[string, number]>;
18
95
  /**
19
96
  * * Enables primitive coercion like `console.log`, `${chronos}`, etc.
@@ -47,6 +124,8 @@ export declare class Chronos {
47
124
  get isoMonth(): number;
48
125
  /** Gets the time value in milliseconds since midnight, January 1, 1970 UTC. */
49
126
  get unix(): number;
127
+ /** Gets the time value in milliseconds since midnight, January 1, 1970 UTC. */
128
+ get timestamp(): number;
50
129
  /** @public @instance Returns a debug-friendly string for `console.log` or `util.inspect`. */
51
130
  inspect(): string;
52
131
  /** @public @instance Clones and returns a new Chronos instance with the same date. */
@@ -75,7 +154,7 @@ export declare class Chronos {
75
154
  getTimeStamp(): number;
76
155
  /**
77
156
  * @public @instance Returns the current date and time in a specified format in local time.
78
- * @description Default format is dd, `mmm DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55:379`
157
+ * @description Default format is dd, `mmm DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55`
79
158
  *
80
159
  * @param options - Configure format string and whether to format using utc offset.
81
160
  * @returns Formatted date string in desired format.
@@ -129,6 +208,12 @@ export declare class Chronos {
129
208
  * @returns A new `Chronos` instance with the updated date.
130
209
  */
131
210
  addDays(days: number): Chronos;
211
+ /**
212
+ * @public @instance Adds weeks and returns a new immutable instance.
213
+ * @param weeks - Number of weeks to add.
214
+ * @returns A new `Chronos` instance with the updated date.
215
+ */
216
+ addWeeks(weeks: number): Chronos;
132
217
  /**
133
218
  * @public @instance Adds months and returns a new immutable instance.
134
219
  * @param months - Number of months to add.
@@ -166,19 +251,19 @@ export declare class Chronos {
166
251
  * @param other The other date to compare.
167
252
  * @param unit The unit to compare.
168
253
  */
169
- isSame(other: number | string | Date | Chronos, unit: TimeUnit): boolean;
254
+ isSame(other: ChronosInput, unit: TimeUnit): boolean;
170
255
  /**
171
256
  * @public @instance Checks if this date is before another date in a specific unit.
172
257
  * @param other The other date to compare.
173
258
  * @param unit The unit to compare.
174
259
  */
175
- isBefore(other: number | string | Date | Chronos, unit: TimeUnit): boolean;
260
+ isBefore(other: ChronosInput, unit: TimeUnit): boolean;
176
261
  /**
177
262
  * @public @instance Checks if this date is after another date in a specific unit.
178
263
  * @param other The other date to compare.
179
264
  * @param unit The unit to compare.
180
265
  */
181
- isAfter(other: number | string | Date | Chronos, unit: TimeUnit): boolean;
266
+ isAfter(other: ChronosInput, unit: TimeUnit): boolean;
182
267
  /**
183
268
  * @public @instance Checks if the current date is between the given start and end dates.
184
269
  *
@@ -192,7 +277,7 @@ export declare class Chronos {
192
277
  *
193
278
  * @returns `true` if the current date is within the specified range based on the `inclusive` mode.
194
279
  */
195
- isBetween(start: number | string | Date | Chronos, end: number | string | Date | Chronos, inclusive?: '[]' | '[)' | '(]' | '()'): boolean;
280
+ isBetween(start: ChronosInput, end: ChronosInput, inclusive?: '[]' | '[)' | '(]' | '()'): boolean;
196
281
  /** @public @instance Checks if currently in DST */
197
282
  isDST(): boolean;
198
283
  /**
@@ -203,19 +288,19 @@ export declare class Chronos {
203
288
  * @param time An optional time value to compare with (`string`, `number`, `Date`, or `Chronos` instance). Defaults to `now`.
204
289
  * @returns The difference as a human-readable string, e.g., `2 years 1 month 9 days 18 hours 56 minutes ago`.
205
290
  */
206
- fromNow(level?: Exclude<TimeUnit, 'millisecond'>, withSuffixPrefix?: boolean, time?: number | string | Date | Chronos): string;
291
+ fromNow(level?: Exclude<TimeUnit, 'millisecond'>, withSuffixPrefix?: boolean, time?: ChronosInput): string;
207
292
  /**
208
293
  * @public @instance Returns the number of full years between the input date and now.
209
294
  * @param time Optional time to compare with the `Chronos` date/time.
210
295
  * @returns The difference in number, negative is `Chronos` time is a past time else positive.
211
296
  */
212
- getRelativeYear(time?: number | string | Date | Chronos): number;
297
+ getRelativeYear(time?: ChronosInput): number;
213
298
  /**
214
299
  * @public @instance Returns the number of full months between the input date and now.
215
300
  * @param time Optional time to compare with the `Chronos` date/time.
216
301
  * @returns The difference in number, negative is `Chronos` time is a past time else positive.
217
302
  */
218
- getRelativeMonth(time?: number | string | Date | Chronos): number;
303
+ getRelativeMonth(time?: ChronosInput): number;
219
304
  /**
220
305
  * @public @instance Determines if the given date is today, tomorrow, yesterday or any relative day.
221
306
  * @param date - The date to compare (Date object).
@@ -226,31 +311,37 @@ export declare class Chronos {
226
311
  * - `1` if the date is tomorrow.
227
312
  * - Other positive or negative numbers for other relative days (e.g., `-2` for two days ago, `2` for two days ahead).
228
313
  */
229
- getRelativeDay(time?: number | string | Date | Chronos): number;
314
+ getRelativeDay(time?: ChronosInput): number;
315
+ /**
316
+ * @public @instance Determines how many full weeks apart the input date is from the `Chronos` instance.
317
+ * @param time Optional time to compare with the `Chronos` date/time.
318
+ * @returns Difference in weeks; negative if past, positive if future.
319
+ */
320
+ getRelativeWeek(time?: ChronosInput): number;
230
321
  /**
231
322
  * @public @instance Returns the number of full hours between the input date and now.
232
323
  * @param time Optional time to compare with the `Chronos` date/time.
233
324
  * @returns The difference in number, negative is `Chronos` time is a past time else positive.
234
325
  */
235
- getRelativeHour(time?: number | string | Date | Chronos): number;
326
+ getRelativeHour(time?: ChronosInput): number;
236
327
  /**
237
328
  * @public @instance Returns the number of full minutes between the input date and now.
238
329
  * @param time Optional time to compare with the `Chronos` date/time.
239
330
  * @returns The difference in number, negative is `Chronos` time is a past time else positive.
240
331
  */
241
- getRelativeMinute(time?: number | string | Date | Chronos): number;
332
+ getRelativeMinute(time?: ChronosInput): number;
242
333
  /**
243
334
  * @public @instance Returns the number of full seconds between the input date and now.
244
335
  * @param time Optional time to compare with the `Chronos` date/time.
245
336
  * @returns The difference in number, negative is `Chronos` time is a past time else positive.
246
337
  */
247
- getRelativeSecond(time?: number | string | Date | Chronos): number;
338
+ getRelativeSecond(time?: ChronosInput): number;
248
339
  /**
249
340
  * @public @instance Returns the number of milliseconds between the input date and now.
250
341
  * @param time Optional time to compare with the `Chronos` date/time.
251
342
  * @returns The difference in number, negative is `Chronos` time is a past time else positive.
252
343
  */
253
- getRelativeMilliSecond(time?: number | string | Date | Chronos): number;
344
+ getRelativeMilliSecond(time?: ChronosInput): number;
254
345
  /**
255
346
  * @public @instance Compares the stored date with now, returning the difference in the specified unit.
256
347
  *
@@ -258,12 +349,12 @@ export declare class Chronos {
258
349
  * @param time Optional time to compare with the `Chronos` date/time.
259
350
  * @returns The difference in number, negative is `Chronos` time is a past time else positive.
260
351
  */
261
- compare(unit?: TimeUnit, time?: number | string | Date | Chronos): number;
352
+ compare(unit?: TimeUnit, time?: ChronosInput): number;
262
353
  /**
263
354
  * @public @instance Returns a new Chronos instance at the start of a given unit.
264
355
  * @param unit The unit to reset (e.g., year, month, day).
265
356
  */
266
- startOf(unit: TimeUnit | 'week'): Chronos;
357
+ startOf(unit: TimeUnit): Chronos;
267
358
  /**
268
359
  * @public @instance Returns a new Chronos instance at the end of a given unit.
269
360
  * @param unit The unit to adjust (e.g., year, month, day).
@@ -297,15 +388,26 @@ export declare class Chronos {
297
388
  * @param other The other date to compare.
298
389
  * @param unit The unit in which to return the difference.
299
390
  */
300
- diff(other: number | string | Date | Chronos, unit: TimeUnit): number;
391
+ diff(other: ChronosInput, unit: TimeUnit): number;
301
392
  /**
302
393
  * @public @instance Returns a human-readable relative calendar time like "Today at 3:00 PM"
303
394
  * @param baseDate Optional base date to compare with.
304
395
  */
305
- calendar(baseDate?: number | string | Date | Chronos): string;
396
+ calendar(baseDate?: ChronosInput): string;
306
397
  /** @public @instance Returns a short human-readable string like "2h ago", "in 5m" */
307
398
  fromNowShort(): string;
308
- /** @public @instance Returns ISO week number */
399
+ /**
400
+ * @public @instance Sets the date to the Monday of the specified ISO week number within the current year.
401
+ * This method assumes ISO week logic, where week 1 is the week containing January 4th.
402
+ *
403
+ * @param week The ISO week number (1–53) to set the date to.
404
+ * @returns A new Chronos instance set to the start (Monday) of the specified week.
405
+ */
406
+ setWeek(week: number): Chronos;
407
+ /**
408
+ * @public @instance Calculates the ISO week number of the year.
409
+ * @returns Week number (1-53).
410
+ */
309
411
  getWeek(): number;
310
412
  /** @public @instance Returns ISO week year */
311
413
  getWeekYear(): number;
@@ -325,7 +427,7 @@ export declare class Chronos {
325
427
  toLocal(): Chronos;
326
428
  /**
327
429
  * @public @static Returns the current date and time in a specified format in local time.
328
- * * Default format is dd, `mmm DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55:379`
430
+ * * Default format is dd, `mmm DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55`
329
431
  * @param options - Configure format string and whether to format using utc offset.
330
432
  * @returns Formatted date string in desired format.
331
433
  */
@@ -354,27 +456,27 @@ export declare class Chronos {
354
456
  * // returns Chronos instance with the parsed date 2023-12-31T15:30:45
355
457
  * ```
356
458
  *
357
- * @param {string} dateStr - The date string to be parsed
358
- * @param {string} format - The format of the date string. Tokens like `YYYY`, `MM`, `DD`, `HH`, `mm`, `ss` are used to specify the structure.
359
- * @returns {Chronos} - A new `Chronos` instance representing the parsed date.
360
- * @throws {Error} - If the date string does not match the format.
459
+ * @param dateStr - The date string to be parsed
460
+ * @param format - The format of the date string. Tokens like `YYYY`, `MM`, `DD`, `HH`, `mm`, `ss` are used to specify the structure.
461
+ * @returns A new `Chronos` instance representing the parsed date.
462
+ * @throws `Error` If the date string does not match the format.
361
463
  */
362
464
  static parse(dateStr: string, format: string): Chronos;
363
465
  /**
364
466
  * @public @static Creates UTC Chronos
365
467
  * @param dateLike Date input to create utc time.
366
468
  */
367
- static utc(dateLike: number | string | Date | Chronos): Chronos;
469
+ static utc(dateLike: ChronosInput): Chronos;
368
470
  /**
369
471
  * @public @static Returns earliest Chronos
370
472
  * @param dates Date inputs.
371
473
  */
372
- static min(...dates: (number | string | Date | Chronos)[]): Chronos;
474
+ static min(...dates: ChronosInput[]): Chronos;
373
475
  /**
374
476
  * @public @static Returns latest Chronos
375
477
  * @param dates Date inputs.
376
478
  */
377
- static max(...dates: (number | string | Date | Chronos)[]): Chronos;
479
+ static max(...dates: ChronosInput[]): Chronos;
378
480
  /**
379
481
  * @public @static Checks if the year in the date string or year (from 0 - 9999) is a leap year.
380
482
  * - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
@@ -390,7 +492,7 @@ export declare class Chronos {
390
492
  * @param date - A `number` (year or Unix timestamp), `string`, `Date`, or `Chronos` instance representing a date.
391
493
  * @returns `true` if the year is a leap year, `false` otherwise.
392
494
  */
393
- static isLeapYear(date: number | string | Date | Chronos): boolean;
495
+ static isLeapYear(date: ChronosInput): boolean;
394
496
  /**
395
497
  * @public @static Checks if the given value is a valid `Date` object.
396
498
  * - A value is considered valid if it is an instance of the built-in `Date` class.
@@ -1 +1 @@
1
- {"version":3,"file":"Chronos.d.ts","sourceRoot":"","sources":["../../src/date/Chronos.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAGN,MAAM,EAIN,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAEX,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,MAAM,SAAS,CAAC;AAGjB,qBAAa,OAAO;;IAGnB,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;IAEnC;;;;;;;;OAQG;gBACS,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO;IAQnD,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAaxD;;;;OAIG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAKnD,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM;IAuB7D,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAqBvC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;IAqBxC,IA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