chronos-date 1.1.1 → 1.2.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 (44) hide show
  1. package/README.md +64 -16
  2. package/dist/guards.d.cts +1 -1
  3. package/dist/guards.d.mts +1 -1
  4. package/dist/index.cjs +13 -13
  5. package/dist/index.d.cts +1 -1
  6. package/dist/index.d.mts +1 -1
  7. package/dist/index.mjs +13 -13
  8. package/dist/plugins/banglaPlugin.d.cts +1 -1
  9. package/dist/plugins/banglaPlugin.d.mts +1 -1
  10. package/dist/plugins/businessPlugin.d.cts +1 -1
  11. package/dist/plugins/businessPlugin.d.mts +1 -1
  12. package/dist/plugins/dateRangePlugin.d.cts +3 -3
  13. package/dist/plugins/dateRangePlugin.d.mts +3 -3
  14. package/dist/plugins/dayPartPlugin.d.cts +1 -1
  15. package/dist/plugins/dayPartPlugin.d.mts +1 -1
  16. package/dist/plugins/durationPlugin.d.cts +1 -1
  17. package/dist/plugins/durationPlugin.d.mts +1 -1
  18. package/dist/plugins/fromNowPlugin.d.cts +1 -1
  19. package/dist/plugins/fromNowPlugin.d.mts +1 -1
  20. package/dist/plugins/greetingPlugin.d.cts +2 -2
  21. package/dist/plugins/greetingPlugin.d.mts +2 -2
  22. package/dist/plugins/palindromePlugin.d.cts +1 -1
  23. package/dist/plugins/palindromePlugin.d.mts +1 -1
  24. package/dist/plugins/relativeTimePlugin.d.cts +1 -1
  25. package/dist/plugins/relativeTimePlugin.d.mts +1 -1
  26. package/dist/plugins/roundPlugin.cjs +1 -1
  27. package/dist/plugins/roundPlugin.d.cts +1 -1
  28. package/dist/plugins/roundPlugin.d.mts +1 -1
  29. package/dist/plugins/roundPlugin.mjs +1 -1
  30. package/dist/plugins/seasonPlugin.d.cts +2 -2
  31. package/dist/plugins/seasonPlugin.d.mts +2 -2
  32. package/dist/plugins/timeZonePlugin.cjs +13 -7
  33. package/dist/plugins/timeZonePlugin.d.cts +1 -1
  34. package/dist/plugins/timeZonePlugin.d.mts +1 -1
  35. package/dist/plugins/timeZonePlugin.mjs +13 -7
  36. package/dist/plugins/zodiacPlugin.d.cts +2 -2
  37. package/dist/plugins/zodiacPlugin.d.mts +2 -2
  38. package/dist/{types-Cb4gxrgJ.d.mts → types-Bs_rfkka.d.mts} +17 -17
  39. package/dist/{types-CdmsXbU_.d.cts → types-CaVuY1_4.d.cts} +17 -17
  40. package/dist/types.d.cts +1 -1
  41. package/dist/types.d.mts +1 -1
  42. package/dist/utils.d.cts +1 -1
  43. package/dist/utils.d.mts +1 -1
  44. package/package.json +5 -5
package/README.md CHANGED
@@ -1,31 +1,79 @@
1
1
  # Chronos Date
2
2
 
3
- > A comprehensive date and time library for any JavaScript and TypeScript environment.
3
+ A lightweight, immutable, and plugin-based date-time manipulation library for JavaScript and TypeScript.
4
4
 
5
- ## Install
5
+ ![Chronos Date](https://raw.githubusercontent.com/nazmul-nhb/chronos-date/refs/heads/main/chronos.png)
6
6
 
7
- ### NPM
7
+ ## Why Chronos?
8
8
 
9
- ```bash
10
- npm i chronos-date
11
- ```
9
+ In ancient Greek mythology, **Chronos** is the primordial embodiment of time — not merely tracking moments, but **defining their very existence**. Like its mythological namesake, the `Chronos` class offers **precise, immutable, and expressive control** over time within your application.
10
+
11
+ Designed to go beyond the native `Date` object, it empowers you to manipulate, format, compare, and traverse time with **clarity, reliability, and confidence** — all while staying _immutable_ and _framework-agnostic_.
12
+
13
+ ## Key Features
12
14
 
13
- ### PNPM
15
+ - **Immutability:** Every modification returns a new `Chronos` instance. Your original dates remain intact.
16
+ - **Rich API:** From formatting to comparison, calculation, and detailed part extraction.
17
+ - **Plugin System:** Extend core capabilities seamlessly using `Chronos.use(plugin)`. Over a dozen official plugins exist for advanced operations like business hours, seasons, zodiacs, relative times, and more.
18
+ - **Time Zone Support:** Advanced formatting and tracking of UTC offsets and Native time zone properties.
19
+ - **Date Utilities:** Extra utilities, type guards, types and constants for light weight date operations without the need of core class.
20
+ - **Comprehensive TypeScript IntelliSense:** Built with first-class TypeScript types and granular tracking for strict date formatting tokens.
21
+ - **Cross-environment compatibility:** Works anywhere JS runs (Node.js, Browser, Deno, Bun).
14
22
 
15
- ```bash
23
+ ## Installation
24
+
25
+ ```sh
26
+ npm install chronos-date
27
+ # or
28
+ yarn add chronos-date
29
+ # or
16
30
  pnpm add chronos-date
17
31
  ```
18
32
 
19
- ### YARN
33
+ ## Quick Start
20
34
 
21
- ```bash
22
- yarn add chronos-date
35
+ ```ts
36
+ import { Chronos, chronos } from 'chronos-date';
37
+
38
+ // Using the constructor
39
+ const now = new Chronos();
40
+ console.log(now.format('dd, mmm DD, YYYY'));
41
+
42
+ // Using the function wrapper
43
+ const tomorrow = chronos().addDays(1);
44
+ console.log(tomorrow.formatStrict('YYYY-MM-DD'));
45
+
46
+ // Calculate differences
47
+ const eventDate = new Chronos('2025-12-31');
48
+ console.log(now.diff(eventDate, 'day')); // Days until event
23
49
  ```
24
50
 
25
- ---
51
+ ## Modular Imports
52
+
53
+ You can import specific submodules for better tree-shaking:
54
+
55
+ ```ts
56
+ // Guards
57
+ import { isValidDateInput } from "chronos-date/guards";
58
+
59
+ // Utility functions
60
+ import { formatDate } from "chronos-date/utils";
61
+
62
+ // Type definitions
63
+ import type { ChronosInput } from "chronos-date/types";
64
+
65
+ // Constants
66
+ import { MONTHS } from "chronos-date/constants";
67
+
68
+ // Plugins (imported individually)
69
+ import { timeZonePlugin } from "chronos-date/plugins/timeZonePlugin";
70
+ import { seasonPlugin } from "chronos-date/plugins/seasonPlugin";
71
+ ```
72
+
73
+ ## Documentation
74
+
75
+ For full documentation, API reference, and interactive playgrounds, visit the [**Documentation Site**](https://chronos.nazmul-nhb.dev/).
26
76
 
27
- ## Features
77
+ ## License
28
78
 
29
- >[!INFO]
30
- >
31
- > Full Docs Coming Soon...
79
+ This project is licensed under the [Apache License 2.0](LICENSE).
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-CdmsXbU_.cjs";
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";
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-Cb4gxrgJ.mjs";
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";
18
18
 
19
19
  //#region src/guards.d.ts
20
20
  /**
package/dist/index.cjs CHANGED
@@ -216,24 +216,24 @@ var Chronos = class Chronos {
216
216
  * Represents the current timezone name (e.g., `"Bangladesh Standard Time"`), or falls back to the corresponding timezone identifier (e.g., `"Asia/Dhaka"`) if no name can be resolved.
217
217
  *
218
218
  * @remarks
219
- * - Invoking the {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} method sets the timezone name that corresponds to the specified UTC offset, or the UTC offset itself if no name exists. For more details on this behavior, see {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/names#gettimezonename getTimeZoneName}.
219
+ * - Invoking the {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method sets the timezone name that corresponds to the specified UTC offset, or the UTC offset itself if no name exists. For more details on this behavior, see {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/names#gettimezonename getTimeZoneName}.
220
220
  * - To retrieve the local system's native timezone name (or its identifier if the name is unavailable), use the {@link $getNativeTimeZoneName} instance method.
221
221
  */
222
222
  timeZoneName;
223
223
  /**
224
224
  * Represents the current timezone context, which can be a single identifier, an array of equivalent identifiers, or a UTC offset.
225
225
  *
226
- * - **{@link $TimeZoneIdentifier}** — e.g., `"Asia/Dhaka"`. Returned when the {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} method has not been invoked. It is default behavior.
226
+ * - **{@link $TimeZoneIdentifier}** — e.g., `"Asia/Dhaka"`. Returned when the {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method has not been invoked. It is default behavior.
227
227
  * - **Array of {@link $TimeZoneIdentifier}** — e.g., `[ 'Asia/Calcutta', 'Asia/Colombo' ]`, used when multiple timezones share the same UTC offset such as `"UTC+05:30"`.
228
228
  * - **{@link UTCOffset}** — e.g., `"UTC+06:45"` or `"UTC+02:15"`, returned when no named timezone corresponds to a given offset.
229
229
  *
230
230
  * @remarks
231
- * - By default, when {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} is not applied, a single {@link $TimeZoneIdentifier} string is provided.
231
+ * - By default, when {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} is not applied, a single {@link $TimeZoneIdentifier} string is provided.
232
232
  * - When applied, it may instead return a single identifier string, an array of equivalent identifiers or a UTC offset string.
233
233
  * - To retrieve the local system's native timezone identifier, use the {@link $getNativeTimeZoneId} instance method.
234
234
  */
235
235
  timeZoneId;
236
- /** Tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} method */
236
+ /** Tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method */
237
237
  $tzTracker;
238
238
  /**
239
239
  * * Creates a new immutable `Chronos` instance.
@@ -310,7 +310,7 @@ var Chronos = class Chronos {
310
310
  *
311
311
  * @remarks
312
312
  * - This method always reflects the local machine's time zone if `tzId` is parameter is omitted.
313
- * - {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
313
+ * - {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
314
314
  * - To access the time zone name of a modified or converted instance, use the {@link timeZoneName} public property instead.
315
315
  *
316
316
  * @param tzId Optional time zone identifier to get time zone name for that specific identifier if available.
@@ -326,7 +326,7 @@ var Chronos = class Chronos {
326
326
  *
327
327
  * @remarks
328
328
  * - This method always returns the identifier of the local machine's time zone.
329
- * - {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
329
+ * - {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
330
330
  * - To obtain the identifier(s) of a modified or converted instance, use the {@link timeZoneId} public property instead.
331
331
  *
332
332
  * @returns The local system's IANA time zone identifier.
@@ -355,7 +355,7 @@ var Chronos = class Chronos {
355
355
  * @param offset Optional UTC offset in `UTC±HH:mm` format.
356
356
  * @param tzName Optional time zone name to set.
357
357
  * @param tzId Optional time zone identifier(s) to set.
358
- * @param tzTracker Optional tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} method.
358
+ * @param tzTracker Optional tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method.
359
359
  * @returns The `Chronos` instance with the specified origin and other properties.
360
360
  */
361
361
  #withOrigin(origin, offset, tzName, tzId, tzTracker) {
@@ -516,7 +516,7 @@ var Chronos = class Chronos {
516
516
  *
517
517
  * - Supported format tokens include: `YYYY`, `YY`, `mmmm`, `mmm`, `MM`, `M`, `DD`, `D`, `dd`, `ddd`, `Do`, `HH`, `H`, `hh`, `h`, `mm`, `m`, `ss`, `s`, `ms`, `mss`, `a`, `A`, `ZZ` and `Z`.
518
518
  * - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
519
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#format-tokens format tokens} for details.
519
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/format#format-tokens format tokens} for details.
520
520
  *
521
521
  * @param useUTC - Optional boolean to format the date using UTC time.
522
522
  * When `true`, it behaves like `formatUTC()` and outputs time based on UTC offset. Defaults to `false`.
@@ -534,7 +534,7 @@ var Chronos = class Chronos {
534
534
  *
535
535
  * @param format - The desired format string. Defaults to `'dd, mmm DD, YYYY HH:mm:ss'`
536
536
  * (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
537
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#format-tokens format tokens} for details.
537
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/format#format-tokens format tokens} for details.
538
538
  *
539
539
  * @param useUTC - If `true`, formats the date in UTC (equivalent to `formatUTC()`).
540
540
  * Defaults to `false` (local time).
@@ -553,7 +553,7 @@ var Chronos = class Chronos {
553
553
  *
554
554
  * - Supported format tokens include: `YYYY`, `YY`, `mmmm`, `mmm`, `MM`, `M`, `DD`, `D`, `dd`, `ddd`, `Do`, `HH`, `H`, `hh`, `h`, `mm`, `m`, `ss`, `s`, `ms`, `mss`, `a`, `A`, `ZZ` and `Z`.
555
555
  * - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
556
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#format-tokens format tokens} for details.
556
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/format#format-tokens format tokens} for details.
557
557
  *
558
558
  * @returns Formatted date string in desired format (UTC time).
559
559
  */
@@ -1286,7 +1286,7 @@ var Chronos = class Chronos {
1286
1286
  * @param options - Relative range (e.g., 7 days, 4 weeks) or date range (from/to) and output format.
1287
1287
  * @returns Array of ISO date strings in the specified format.
1288
1288
  *
1289
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/statics#getdatesforday docs} for details.
1289
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/statics#getdatesforday docs} for details.
1290
1290
  */
1291
1291
  static getDatesForDay(day, options) {
1292
1292
  let startDate = new Chronos(), endDate = startDate.addWeeks(4);
@@ -1442,7 +1442,7 @@ var Chronos = class Chronos {
1442
1442
  * - To prevent this incorrect *linter error* in `React` projects, prefer using {@link register} method (alias `use` method).
1443
1443
  *
1444
1444
  * - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
1445
- * - See {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/plugins#-official-plugins full list of plugins and the methods they register}.
1445
+ * - See {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/plugins#-official-plugins full list of plugins and the methods they register}.
1446
1446
  */
1447
1447
  static use(plugin) {
1448
1448
  if (!Chronos.#plugins.has(plugin)) {
@@ -1460,7 +1460,7 @@ var Chronos = class Chronos {
1460
1460
  * - To prevent this incorrect *linter error* in `React` projects, prefer using this (`register`) method over {@link use} method.
1461
1461
  *
1462
1462
  * - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
1463
- * - See {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/plugins#-official-plugins full list of plugins and the methods they register}.
1463
+ * - See {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/plugins#-official-plugins full list of plugins and the methods they register}.
1464
1464
  */
1465
1465
  static register(plugin) {
1466
1466
  Chronos.use(plugin);
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-CdmsXbU_.cjs";
18
+ import { Bt as Chronos, Vt as chronos } from "./types-CaVuY1_4.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-Cb4gxrgJ.mjs";
18
+ import { Bt as Chronos, Vt as chronos } from "./types-Bs_rfkka.mjs";
19
19
  export { Chronos, INTERNALS, chronos };
package/dist/index.mjs CHANGED
@@ -215,24 +215,24 @@ var Chronos = class Chronos {
215
215
  * Represents the current timezone name (e.g., `"Bangladesh Standard Time"`), or falls back to the corresponding timezone identifier (e.g., `"Asia/Dhaka"`) if no name can be resolved.
216
216
  *
217
217
  * @remarks
218
- * - Invoking the {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} method sets the timezone name that corresponds to the specified UTC offset, or the UTC offset itself if no name exists. For more details on this behavior, see {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/names#gettimezonename getTimeZoneName}.
218
+ * - Invoking the {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method sets the timezone name that corresponds to the specified UTC offset, or the UTC offset itself if no name exists. For more details on this behavior, see {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/names#gettimezonename getTimeZoneName}.
219
219
  * - To retrieve the local system's native timezone name (or its identifier if the name is unavailable), use the {@link $getNativeTimeZoneName} instance method.
220
220
  */
221
221
  timeZoneName;
222
222
  /**
223
223
  * Represents the current timezone context, which can be a single identifier, an array of equivalent identifiers, or a UTC offset.
224
224
  *
225
- * - **{@link $TimeZoneIdentifier}** — e.g., `"Asia/Dhaka"`. Returned when the {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} method has not been invoked. It is default behavior.
225
+ * - **{@link $TimeZoneIdentifier}** — e.g., `"Asia/Dhaka"`. Returned when the {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method has not been invoked. It is default behavior.
226
226
  * - **Array of {@link $TimeZoneIdentifier}** — e.g., `[ 'Asia/Calcutta', 'Asia/Colombo' ]`, used when multiple timezones share the same UTC offset such as `"UTC+05:30"`.
227
227
  * - **{@link UTCOffset}** — e.g., `"UTC+06:45"` or `"UTC+02:15"`, returned when no named timezone corresponds to a given offset.
228
228
  *
229
229
  * @remarks
230
- * - By default, when {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} is not applied, a single {@link $TimeZoneIdentifier} string is provided.
230
+ * - By default, when {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} is not applied, a single {@link $TimeZoneIdentifier} string is provided.
231
231
  * - When applied, it may instead return a single identifier string, an array of equivalent identifiers or a UTC offset string.
232
232
  * - To retrieve the local system's native timezone identifier, use the {@link $getNativeTimeZoneId} instance method.
233
233
  */
234
234
  timeZoneId;
235
- /** Tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} method */
235
+ /** Tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method */
236
236
  $tzTracker;
237
237
  /**
238
238
  * * Creates a new immutable `Chronos` instance.
@@ -309,7 +309,7 @@ var Chronos = class Chronos {
309
309
  *
310
310
  * @remarks
311
311
  * - This method always reflects the local machine's time zone if `tzId` is parameter is omitted.
312
- * - {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
312
+ * - {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
313
313
  * - To access the time zone name of a modified or converted instance, use the {@link timeZoneName} public property instead.
314
314
  *
315
315
  * @param tzId Optional time zone identifier to get time zone name for that specific identifier if available.
@@ -325,7 +325,7 @@ var Chronos = class Chronos {
325
325
  *
326
326
  * @remarks
327
327
  * - This method always returns the identifier of the local machine's time zone.
328
- * - {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
328
+ * - {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
329
329
  * - To obtain the identifier(s) of a modified or converted instance, use the {@link timeZoneId} public property instead.
330
330
  *
331
331
  * @returns The local system's IANA time zone identifier.
@@ -354,7 +354,7 @@ var Chronos = class Chronos {
354
354
  * @param offset Optional UTC offset in `UTC±HH:mm` format.
355
355
  * @param tzName Optional time zone name to set.
356
356
  * @param tzId Optional time zone identifier(s) to set.
357
- * @param tzTracker Optional tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/conversion#timezone timeZone} method.
357
+ * @param tzTracker Optional tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method.
358
358
  * @returns The `Chronos` instance with the specified origin and other properties.
359
359
  */
360
360
  #withOrigin(origin, offset, tzName, tzId, tzTracker) {
@@ -515,7 +515,7 @@ var Chronos = class Chronos {
515
515
  *
516
516
  * - Supported format tokens include: `YYYY`, `YY`, `mmmm`, `mmm`, `MM`, `M`, `DD`, `D`, `dd`, `ddd`, `Do`, `HH`, `H`, `hh`, `h`, `mm`, `m`, `ss`, `s`, `ms`, `mss`, `a`, `A`, `ZZ` and `Z`.
517
517
  * - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
518
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#format-tokens format tokens} for details.
518
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/format#format-tokens format tokens} for details.
519
519
  *
520
520
  * @param useUTC - Optional boolean to format the date using UTC time.
521
521
  * When `true`, it behaves like `formatUTC()` and outputs time based on UTC offset. Defaults to `false`.
@@ -533,7 +533,7 @@ var Chronos = class Chronos {
533
533
  *
534
534
  * @param format - The desired format string. Defaults to `'dd, mmm DD, YYYY HH:mm:ss'`
535
535
  * (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
536
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#format-tokens format tokens} for details.
536
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/format#format-tokens format tokens} for details.
537
537
  *
538
538
  * @param useUTC - If `true`, formats the date in UTC (equivalent to `formatUTC()`).
539
539
  * Defaults to `false` (local time).
@@ -552,7 +552,7 @@ var Chronos = class Chronos {
552
552
  *
553
553
  * - Supported format tokens include: `YYYY`, `YY`, `mmmm`, `mmm`, `MM`, `M`, `DD`, `D`, `dd`, `ddd`, `Do`, `HH`, `H`, `hh`, `h`, `mm`, `m`, `ss`, `s`, `ms`, `mss`, `a`, `A`, `ZZ` and `Z`.
554
554
  * - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
555
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#format-tokens format tokens} for details.
555
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/format#format-tokens format tokens} for details.
556
556
  *
557
557
  * @returns Formatted date string in desired format (UTC time).
558
558
  */
@@ -1285,7 +1285,7 @@ var Chronos = class Chronos {
1285
1285
  * @param options - Relative range (e.g., 7 days, 4 weeks) or date range (from/to) and output format.
1286
1286
  * @returns Array of ISO date strings in the specified format.
1287
1287
  *
1288
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/statics#getdatesforday docs} for details.
1288
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/statics#getdatesforday docs} for details.
1289
1289
  */
1290
1290
  static getDatesForDay(day, options) {
1291
1291
  let startDate = new Chronos(), endDate = startDate.addWeeks(4);
@@ -1441,7 +1441,7 @@ var Chronos = class Chronos {
1441
1441
  * - To prevent this incorrect *linter error* in `React` projects, prefer using {@link register} method (alias `use` method).
1442
1442
  *
1443
1443
  * - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
1444
- * - See {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/plugins#-official-plugins full list of plugins and the methods they register}.
1444
+ * - See {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/plugins#-official-plugins full list of plugins and the methods they register}.
1445
1445
  */
1446
1446
  static use(plugin) {
1447
1447
  if (!Chronos.#plugins.has(plugin)) {
@@ -1459,7 +1459,7 @@ var Chronos = class Chronos {
1459
1459
  * - To prevent this incorrect *linter error* in `React` projects, prefer using this (`register`) method over {@link use} method.
1460
1460
  *
1461
1461
  * - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
1462
- * - See {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/plugins#-official-plugins full list of plugins and the methods they register}.
1462
+ * - See {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/plugins#-official-plugins full list of plugins and the methods they register}.
1463
1463
  */
1464
1464
  static register(plugin) {
1465
1465
  Chronos.use(plugin);
@@ -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-CdmsXbU_.cjs";
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";
18
18
 
19
19
  //#region src/plugins/banglaPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -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-Cb4gxrgJ.mjs";
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";
18
18
 
19
19
  //#region src/plugins/banglaPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -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-CdmsXbU_.cjs";
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";
18
18
 
19
19
  //#region src/plugins/businessPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -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-Cb4gxrgJ.mjs";
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-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/businessPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, I as RangeWithDates, L as RelativeDateRange, mt as ISODateTimeString } from "../types-CdmsXbU_.cjs";
17
+ import { C as $Chronos, I as RangeWithDates, L as RelativeDateRange, mt as ISODateTimeString } from "../types-CaVuY1_4.cjs";
18
18
 
19
19
  //#region src/plugins/dateRangePlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -29,7 +29,7 @@ declare module 'chronos-date' {
29
29
  * @param options - Configuration for the date range. Accepts a fixed (`RangeWithDates`) format.
30
30
  * @returns Array of ISO date-time strings in either local or UTC format, excluding any skipped weekdays if specified.
31
31
  *
32
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/calculation#getdatesinrange docs} for details.
32
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/calculation#getdatesinrange docs} for details.
33
33
  *
34
34
  * @remarks
35
35
  * - When using `Chronos` instances for `from` and/or `to`, ensure both are created in the **same time zone** to avoid mismatched boundaries.
@@ -61,7 +61,7 @@ declare module 'chronos-date' {
61
61
  * @param options - Configuration for the date range. Accepts a relative (`RelativeDateRange`) format.
62
62
  * @returns Array of ISO date-time strings in either local or UTC format, excluding any skipped weekdays if specified.
63
63
  *
64
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/calculation#getdatesinrange docs} for details.
64
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/calculation#getdatesinrange docs} for details.
65
65
  *
66
66
  * @example
67
67
  * // Using a relative date range with skipDays:
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, I as RangeWithDates, L as RelativeDateRange, mt as ISODateTimeString } from "../types-Cb4gxrgJ.mjs";
17
+ import { C as $Chronos, I as RangeWithDates, L as RelativeDateRange, mt as ISODateTimeString } from "../types-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/dateRangePlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -29,7 +29,7 @@ declare module 'chronos-date' {
29
29
  * @param options - Configuration for the date range. Accepts a fixed (`RangeWithDates`) format.
30
30
  * @returns Array of ISO date-time strings in either local or UTC format, excluding any skipped weekdays if specified.
31
31
  *
32
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/calculation#getdatesinrange docs} for details.
32
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/calculation#getdatesinrange docs} for details.
33
33
  *
34
34
  * @remarks
35
35
  * - When using `Chronos` instances for `from` and/or `to`, ensure both are created in the **same time zone** to avoid mismatched boundaries.
@@ -61,7 +61,7 @@ declare module 'chronos-date' {
61
61
  * @param options - Configuration for the date range. Accepts a relative (`RelativeDateRange`) format.
62
62
  * @returns Array of ISO date-time strings in either local or UTC format, excluding any skipped weekdays if specified.
63
63
  *
64
- * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/calculation#getdatesinrange docs} for details.
64
+ * - Please refer to {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/calculation#getdatesinrange docs} for details.
65
65
  *
66
66
  * @example
67
67
  * // Using a relative date range with skipDays:
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, c as DayPart, l as DayPartConfig } from "../types-CdmsXbU_.cjs";
17
+ import { C as $Chronos, c as DayPart, l as DayPartConfig } from "../types-CaVuY1_4.cjs";
18
18
 
19
19
  //#region src/plugins/dayPartPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, c as DayPart, l as DayPartConfig } from "../types-Cb4gxrgJ.mjs";
17
+ import { C as $Chronos, c as DayPart, l as DayPartConfig } from "../types-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/dayPartPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, D as ChronosInput, d as DurationOptions, g as TimeDuration } from "../types-CdmsXbU_.cjs";
17
+ import { C as $Chronos, D as ChronosInput, d as DurationOptions, g as TimeDuration } from "../types-CaVuY1_4.cjs";
18
18
 
19
19
  //#region src/plugins/durationPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, D as ChronosInput, d as DurationOptions, g as TimeDuration } from "../types-Cb4gxrgJ.mjs";
17
+ import { C as $Chronos, D as ChronosInput, d as DurationOptions, g as TimeDuration } from "../types-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/durationPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, D as ChronosInput, ut as FromNowUnit } from "../types-CdmsXbU_.cjs";
17
+ import { C as $Chronos, D as ChronosInput, ut as FromNowUnit } from "../types-CaVuY1_4.cjs";
18
18
 
19
19
  //#region src/plugins/fromNowPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, D as ChronosInput, ut as FromNowUnit } from "../types-Cb4gxrgJ.mjs";
17
+ import { C as $Chronos, D as ChronosInput, ut as FromNowUnit } from "../types-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/fromNowPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, dt as GreetingConfigs } from "../types-CdmsXbU_.cjs";
17
+ import { C as $Chronos, dt as GreetingConfigs } from "../types-CaVuY1_4.cjs";
18
18
 
19
19
  //#region src/plugins/greetingPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -31,7 +31,7 @@ declare module 'chronos-date' {
31
31
  /**
32
32
  * @instance Returns a greeting message based on current instance of `Chronos` time or provided time in the `configs`.
33
33
  *
34
- * @remarks This method is an alias for {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#getgreeting getGreeting} method.
34
+ * @remarks This method is an alias for {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/format#getgreeting getGreeting} method.
35
35
  *
36
36
  * @param configs - Configuration options for greeting times and messages.
37
37
  * @returns The appropriate greeting message.
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, dt as GreetingConfigs } from "../types-Cb4gxrgJ.mjs";
17
+ import { C as $Chronos, dt as GreetingConfigs } from "../types-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/greetingPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -31,7 +31,7 @@ declare module 'chronos-date' {
31
31
  /**
32
32
  * @instance Returns a greeting message based on current instance of `Chronos` time or provided time in the `configs`.
33
33
  *
34
- * @remarks This method is an alias for {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/format#getgreeting getGreeting} method.
34
+ * @remarks This method is an alias for {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/format#getgreeting getGreeting} method.
35
35
  *
36
36
  * @param configs - Configuration options for greeting times and messages.
37
37
  * @returns The appropriate greeting message.
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos } from "../types-CdmsXbU_.cjs";
17
+ import { C as $Chronos } from "../types-CaVuY1_4.cjs";
18
18
 
19
19
  //#region src/plugins/palindromePlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos } from "../types-Cb4gxrgJ.mjs";
17
+ import { C as $Chronos } from "../types-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/palindromePlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, D as ChronosInput, Tt as TimeUnit } from "../types-CdmsXbU_.cjs";
17
+ import { C as $Chronos, D as ChronosInput, Tt as TimeUnit } from "../types-CaVuY1_4.cjs";
18
18
 
19
19
  //#region src/plugins/relativeTimePlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, D as ChronosInput, Tt as TimeUnit } from "../types-Cb4gxrgJ.mjs";
17
+ import { C as $Chronos, D as ChronosInput, Tt as TimeUnit } from "../types-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/relativeTimePlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -59,7 +59,7 @@ const roundPlugin = ($Chronos) => {
59
59
  const endOfWeek = new Date(startOfWeek);
60
60
  endOfWeek.setDate(endOfWeek.getDate() + 7);
61
61
  const diffToStart = Math.abs(date.getTime() - startOfWeek.getTime());
62
- return withOrigin(new $Chronos(Math.abs(endOfWeek.getTime() - date.getTime()) < diffToStart ? endOfWeek : startOfWeek), "round");
62
+ return withOrigin(new $Chronos(Math.abs(endOfWeek.getTime() - date.getTime()) < diffToStart ? endOfWeek : startOfWeek), "round", offset(this), this.timeZoneName, this.timeZoneId, this.$tzTracker);
63
63
  }
64
64
  case "month": {
65
65
  const roundedMonth = require_utilities.roundToNearest(date.getMonth() + date.getDate() / this.lastDateOfMonth, nearest);
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, Tt as TimeUnit } from "../types-CdmsXbU_.cjs";
17
+ import { C as $Chronos, Tt as TimeUnit } from "../types-CaVuY1_4.cjs";
18
18
 
19
19
  //#region src/plugins/roundPlugin.d.ts
20
20
  declare module 'chronos-date' {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as $Chronos, Tt as TimeUnit } from "../types-Cb4gxrgJ.mjs";
17
+ import { C as $Chronos, Tt as TimeUnit } from "../types-Bs_rfkka.mjs";
18
18
 
19
19
  //#region src/plugins/roundPlugin.d.ts
20
20
  declare module 'chronos-date' {