chronos-date 1.4.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{greet-BJ2Fsag1.cjs → greet-CMkwXJ7o.cjs} +1 -1
- package/dist/{greet-2HTytQc8.mjs → greet-DNGvP7nm.mjs} +1 -1
- package/dist/guards.d.cts +1 -1
- package/dist/guards.d.mts +1 -1
- package/dist/index.cjs +26 -27
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +26 -27
- package/dist/plugins/banglaPlugin.d.cts +1 -1
- package/dist/plugins/banglaPlugin.d.mts +1 -1
- package/dist/plugins/businessPlugin.cjs +2 -2
- package/dist/plugins/businessPlugin.d.cts +3 -3
- package/dist/plugins/businessPlugin.d.mts +3 -3
- package/dist/plugins/businessPlugin.mjs +2 -2
- package/dist/plugins/dateRangePlugin.d.cts +3 -3
- package/dist/plugins/dateRangePlugin.d.mts +3 -3
- package/dist/plugins/dayPartPlugin.d.cts +1 -1
- package/dist/plugins/dayPartPlugin.d.mts +1 -1
- package/dist/plugins/durationPlugin.d.cts +1 -1
- package/dist/plugins/durationPlugin.d.mts +1 -1
- package/dist/plugins/fromNowPlugin.d.cts +1 -1
- package/dist/plugins/fromNowPlugin.d.mts +1 -1
- package/dist/plugins/greetingPlugin.cjs +1 -1
- package/dist/plugins/greetingPlugin.d.cts +3 -3
- package/dist/plugins/greetingPlugin.d.mts +3 -3
- package/dist/plugins/greetingPlugin.mjs +1 -1
- package/dist/plugins/palindromePlugin.d.cts +1 -1
- package/dist/plugins/palindromePlugin.d.mts +1 -1
- package/dist/plugins/relativeTimePlugin.d.cts +1 -1
- package/dist/plugins/relativeTimePlugin.d.mts +1 -1
- package/dist/plugins/roundPlugin.d.cts +1 -1
- package/dist/plugins/roundPlugin.d.mts +1 -1
- package/dist/plugins/seasonPlugin.d.cts +2 -2
- package/dist/plugins/seasonPlugin.d.mts +2 -2
- package/dist/plugins/timeZonePlugin.cjs +1 -1
- package/dist/plugins/timeZonePlugin.d.cts +1 -1
- package/dist/plugins/timeZonePlugin.d.mts +1 -1
- package/dist/plugins/timeZonePlugin.mjs +1 -1
- package/dist/plugins/zodiacPlugin.d.cts +2 -2
- package/dist/plugins/zodiacPlugin.d.mts +2 -2
- package/dist/{types-C_H5zQ8v.d.mts → types-Be4ZMpOV.d.mts} +44 -29
- package/dist/{types-g6rO6-Xe.d.cts → types-dNpvroNQ.d.cts} +44 -29
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/{utilities-DwMJexGo.mjs → utilities-C6NiChRE.mjs} +2 -2
- package/dist/{utilities-By0PGa-z.cjs → utilities-CCnKWAsS.cjs} +2 -2
- package/dist/utils.cjs +2 -2
- package/dist/utils.d.cts +3 -3
- package/dist/utils.d.mts +3 -3
- package/dist/utils.mjs +2 -2
- package/package.json +3 -2
|
@@ -560,24 +560,24 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
560
560
|
* 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.
|
|
561
561
|
*
|
|
562
562
|
* @remarks
|
|
563
|
-
* - Invoking the {@link https://
|
|
563
|
+
* - Invoking the {@link https://chronos.nazmul-nhb.dev/docs/plugins/timezone-plugin#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://chronos.nazmul-nhb.dev/docs/plugins/timezone-plugin#gettimezonename getTimeZoneName}.
|
|
564
564
|
* - To retrieve the local system's native timezone name (or its identifier if the name is unavailable), use the {@link $getNativeTimeZoneName} instance method.
|
|
565
565
|
*/
|
|
566
566
|
timeZoneName: LooseLiteral<TimeZoneName>;
|
|
567
567
|
/**
|
|
568
568
|
* Represents the current timezone context, which can be a single identifier, an array of equivalent identifiers, or a UTC offset.
|
|
569
569
|
*
|
|
570
|
-
* - **{@link $TimeZoneIdentifier}** — e.g., `"Asia/Dhaka"`. Returned when the {@link https://
|
|
570
|
+
* - **{@link $TimeZoneIdentifier}** — e.g., `"Asia/Dhaka"`. Returned when the {@link https://chronos.nazmul-nhb.dev/docs/plugins/timezone-plugin#timezone timeZone} method has not been invoked. It is default behavior.
|
|
571
571
|
* - **Array of {@link $TimeZoneIdentifier}** — e.g., `[ 'Asia/Calcutta', 'Asia/Colombo' ]`, used when multiple timezones share the same UTC offset such as `"UTC+05:30"`.
|
|
572
572
|
* - **{@link UTCOffset}** — e.g., `"UTC+06:45"` or `"UTC+02:15"`, returned when no named timezone corresponds to a given offset.
|
|
573
573
|
*
|
|
574
574
|
* @remarks
|
|
575
|
-
* - By default, when {@link https://
|
|
575
|
+
* - By default, when {@link https://chronos.nazmul-nhb.dev/docs/plugins/timezone-plugin#timezone timeZone} is not applied, a single {@link $TimeZoneIdentifier} string is provided.
|
|
576
576
|
* - When applied, it may instead return a single identifier string, an array of equivalent identifiers or a UTC offset string.
|
|
577
577
|
* - To retrieve the local system's native timezone identifier, use the {@link $getNativeTimeZoneId} instance method.
|
|
578
578
|
*/
|
|
579
579
|
timeZoneId: TimeZoneId;
|
|
580
|
-
/** Tracker to identify the instance created by {@link https://
|
|
580
|
+
/** Tracker to identify the instance created by {@link https://chronos.nazmul-nhb.dev/docs/plugins/timezone-plugin#timezone timeZone} method */
|
|
581
581
|
protected $tzTracker?: $TimeZoneIdentifier | TimeZone | UTCOffset;
|
|
582
582
|
/**
|
|
583
583
|
* * Creates a new immutable `Chronos` instance from current date & time (UTC).
|
|
@@ -635,6 +635,22 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
635
635
|
* @returns Instance of `Chronos` with all methods and properties.
|
|
636
636
|
*/
|
|
637
637
|
constructor(year: number, month?: NumberRange<1, 12>, date?: NumberRange<1, 31>, hours?: Enumerate<24>, minutes?: Enumerate<60>, seconds?: Enumerate<60>, ms?: Milliseconds);
|
|
638
|
+
/**
|
|
639
|
+
* * Creates a new immutable `Chronos` instance.
|
|
640
|
+
*
|
|
641
|
+
* **Note**: *If a date is provided **without a time component**, the instance will default to `00:00:00.000` UTC and convert it to the **equivalent local time** using the current environment's UTC offset.*
|
|
642
|
+
*
|
|
643
|
+
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99, year is assumed to be 1900 + year.
|
|
644
|
+
* @param month The month as a `number` between 1 and 12 (January to December).
|
|
645
|
+
* @param date The date as a `number` between 1 and 31.
|
|
646
|
+
* @param hours Must be supplied if minutes is supplied. A `number` from 0 to 23 (midnight to 11pm) that specifies the hour.
|
|
647
|
+
* @param minutes Must be supplied if seconds is supplied. A `number` from 0 to 59 that specifies the minutes.
|
|
648
|
+
* @param seconds Must be supplied if milliseconds is supplied. A `number` from 0 to 59 that specifies the seconds.
|
|
649
|
+
* @param ms A `number` from 0 to 999 that specifies the milliseconds.
|
|
650
|
+
*
|
|
651
|
+
* @returns Instance of `Chronos` with all methods and properties.
|
|
652
|
+
*/
|
|
653
|
+
constructor(year: number, month?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number);
|
|
638
654
|
/**
|
|
639
655
|
* * Creates a new immutable `Chronos` instance.
|
|
640
656
|
*
|
|
@@ -662,7 +678,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
662
678
|
*
|
|
663
679
|
* @remarks
|
|
664
680
|
* - This method always reflects the local machine's time zone if `tzId` is parameter is omitted.
|
|
665
|
-
* - {@link https://
|
|
681
|
+
* - {@link https://chronos.nazmul-nhb.dev/docs/plugins/timezone-plugin#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
|
|
666
682
|
* - To access the time zone name of a modified or converted instance, use the {@link timeZoneName} public property instead.
|
|
667
683
|
*
|
|
668
684
|
* @param tzId Optional time zone identifier to get time zone name for that specific identifier if available.
|
|
@@ -675,7 +691,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
675
691
|
*
|
|
676
692
|
* @remarks
|
|
677
693
|
* - This method always returns the identifier of the local machine's time zone.
|
|
678
|
-
* - {@link https://
|
|
694
|
+
* - {@link https://chronos.nazmul-nhb.dev/docs/plugins/timezone-plugin#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
|
|
679
695
|
* - To obtain the identifier(s) of a modified or converted instance, use the {@link timeZoneId} public property instead.
|
|
680
696
|
*
|
|
681
697
|
* @returns The local system's IANA time zone identifier.
|
|
@@ -743,7 +759,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
743
759
|
*
|
|
744
760
|
* - 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`.
|
|
745
761
|
* - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
|
|
746
|
-
* - Please refer to {@link https://
|
|
762
|
+
* - Please refer to {@link https://chronos.nazmul-nhb.dev/docs/chronos/format#format-tokens format tokens} for details.
|
|
747
763
|
*
|
|
748
764
|
* @param useUTC - Optional boolean to format the date using UTC time.
|
|
749
765
|
* When `true`, it behaves like `formatUTC()` and outputs time based on UTC offset. Defaults to `false`.
|
|
@@ -759,7 +775,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
759
775
|
*
|
|
760
776
|
* @param format - The desired format string. Defaults to `'dd, mmm DD, YYYY HH:mm:ss'`
|
|
761
777
|
* (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
|
|
762
|
-
* - Please refer to {@link https://
|
|
778
|
+
* - Please refer to {@link https://chronos.nazmul-nhb.dev/docs/chronos/format#format-tokens format tokens} for details.
|
|
763
779
|
*
|
|
764
780
|
* @param useUTC - If `true`, formats the date in UTC (equivalent to `formatUTC()`).
|
|
765
781
|
* Defaults to `false` (local time).
|
|
@@ -776,7 +792,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
776
792
|
*
|
|
777
793
|
* - 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`.
|
|
778
794
|
* - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
|
|
779
|
-
* - Please refer to {@link https://
|
|
795
|
+
* - Please refer to {@link https://chronos.nazmul-nhb.dev/docs/chronos/format#format-tokens format tokens} for details.
|
|
780
796
|
*
|
|
781
797
|
* @returns Formatted date string in desired format (UTC time).
|
|
782
798
|
*/
|
|
@@ -937,10 +953,10 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
937
953
|
/**
|
|
938
954
|
* @instance Returns the difference between current and another date in the given unit.
|
|
939
955
|
* @param other The other date to compare.
|
|
940
|
-
* @param unit The unit in which to return the difference.
|
|
956
|
+
* @param unit The unit in which to return the difference. Defaults to `'millisecond'`.
|
|
941
957
|
* @returns Difference in number (either `integer` or `float`).
|
|
942
958
|
*/
|
|
943
|
-
diff(other: ChronosInput, unit
|
|
959
|
+
diff(other: ChronosInput, unit?: TimeUnit): number;
|
|
944
960
|
/**
|
|
945
961
|
* @instance Returns a human-readable relative calendar time like "Today at 3:00 PM"
|
|
946
962
|
* @param baseDate Optional base date to compare with.
|
|
@@ -1000,15 +1016,15 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
1000
1016
|
* - `Q3`: July to September
|
|
1001
1017
|
* - `Q4`: October to December
|
|
1002
1018
|
*
|
|
1003
|
-
* This method strictly uses the **calendar year**. For fiscal quarters, use {@link
|
|
1019
|
+
* This method strictly uses the **calendar year**. For fiscal quarters, use {@link https://chronos.nazmul-nhb.dev/docs/plugins/business-plugin#getfiscalquarter getFiscalQuarter} instead.
|
|
1004
1020
|
*
|
|
1005
1021
|
* @example
|
|
1006
|
-
* new Chronos('2025-02-14').
|
|
1007
|
-
* new Chronos('2025-08-09').
|
|
1022
|
+
* new Chronos('2025-02-14').getQuarter(); // 1
|
|
1023
|
+
* new Chronos('2025-08-09').getQuarter(); // 3
|
|
1008
1024
|
*
|
|
1009
1025
|
* @returns The calendar quarter number (1–4).
|
|
1010
1026
|
*/
|
|
1011
|
-
|
|
1027
|
+
getQuarter(): Quarter;
|
|
1012
1028
|
/**
|
|
1013
1029
|
* @instance Returns the system's current UTC offset formatted as `±HH:mm` (`+06:00` or `-07:00`).
|
|
1014
1030
|
*
|
|
@@ -1020,13 +1036,13 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
1020
1036
|
/**
|
|
1021
1037
|
* @instance Returns the timezone offset of this `Chronos` instance in `±HH:mm` format maintaining current timezone.
|
|
1022
1038
|
*
|
|
1023
|
-
*
|
|
1039
|
+
* @remarks *Unlike JavaScript's {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset `Date.prototype.getTimezoneOffset()`}, which returns the offset in minutes **behind** UTC (positive for locations west of UTC and negative for east), this method returns the more intuitive sign format used in timezone representations (e.g., `+06:00` means 6 hours **ahead** of UTC).*
|
|
1024
1040
|
*
|
|
1025
1041
|
* @returns The timezone offset string in `±HH:mm` format maintaining the current timezone regardless of system having different one.
|
|
1026
1042
|
*/
|
|
1027
1043
|
getTimeZoneOffset(): $UTCOffset;
|
|
1028
1044
|
/**
|
|
1029
|
-
* @instance Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local
|
|
1045
|
+
* @instance Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local system.
|
|
1030
1046
|
*
|
|
1031
1047
|
* - *Unlike JavaScript's {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset `Date.prototype.getTimezoneOffset()`}, this method returns a positive value if the local time is ahead of UTC, and negative if behind UTC.*
|
|
1032
1048
|
*
|
|
@@ -1036,12 +1052,11 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
1036
1052
|
*/
|
|
1037
1053
|
getUTCOffsetMinutes(): number;
|
|
1038
1054
|
/**
|
|
1039
|
-
* @instance Returns the current `Chronos` instance's
|
|
1055
|
+
* @instance Returns the current `Chronos` instance's timezone offset in minutes.
|
|
1040
1056
|
*
|
|
1041
|
-
* This reflects the parsed or stored offset used internally by `Chronos` and follows
|
|
1042
|
-
* sign convention: positive for timezones ahead of UTC, negative for behind.
|
|
1057
|
+
* @remarks This reflects the parsed or stored offset used internally by `Chronos` and follows sign convention: positive for timezones ahead of UTC, negative for behind.
|
|
1043
1058
|
*
|
|
1044
|
-
* @returns The
|
|
1059
|
+
* @returns The timezone offset in minutes maintaining the current timezone regardless of system having different one.
|
|
1045
1060
|
*/
|
|
1046
1061
|
getTimeZoneOffsetMinutes(): number;
|
|
1047
1062
|
/** @instance Returns new `Chronos` instance in UTC time */
|
|
@@ -1172,7 +1187,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
1172
1187
|
* @param options - Relative range (e.g., 7 days, 4 weeks) and output format (local with timezone or utc).
|
|
1173
1188
|
* @returns Array of ISO date strings in the specified format. Returns empty array if no matches in the time span.
|
|
1174
1189
|
*
|
|
1175
|
-
* - Please refer to {@link https://
|
|
1190
|
+
* - Please refer to {@link https://chronos.nazmul-nhb.dev/docs/chronos/static/get-dates-for-day docs} for details.
|
|
1176
1191
|
*
|
|
1177
1192
|
* @example
|
|
1178
1193
|
* Chronos.getDatesForDay('Wednesday', { span: 7, unit: 'day' });
|
|
@@ -1194,7 +1209,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
1194
1209
|
* @param options - Date range (from/to, e.g. `'2025-06-30'`, ` new Date()`, `new Chronos()` etc.) and output format (local with timezone or utc).
|
|
1195
1210
|
* @returns Array of ISO date strings in the specified format. Returns empty array if no matches in the range.
|
|
1196
1211
|
*
|
|
1197
|
-
* - Please refer to {@link https://
|
|
1212
|
+
* - Please refer to {@link https://chronos.nazmul-nhb.dev/docs/chronos/static/get-dates-for-day docs} for details.
|
|
1198
1213
|
*
|
|
1199
1214
|
* @remarks
|
|
1200
1215
|
* - When using `Chronos` instances for `from` and/or `to`, ensure both are created in the **same time zone** to avoid mismatched boundaries.
|
|
@@ -1300,7 +1315,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
1300
1315
|
* - To prevent this incorrect *linter error* in `React` projects, prefer using {@link register} method (alias `use` method).
|
|
1301
1316
|
*
|
|
1302
1317
|
* - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
|
|
1303
|
-
* - See {@link https://
|
|
1318
|
+
* - See {@link https://chronos.nazmul-nhb.dev/docs/plugins#-official-plugins full list of plugins and the methods they register}.
|
|
1304
1319
|
*/
|
|
1305
1320
|
static use(plugin: ChronosPlugin): void;
|
|
1306
1321
|
/**
|
|
@@ -1313,7 +1328,7 @@ declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
|
1313
1328
|
* - To prevent this incorrect *linter error* in `React` projects, prefer using this (`register`) method over {@link use} method.
|
|
1314
1329
|
*
|
|
1315
1330
|
* - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
|
|
1316
|
-
* - See {@link https://
|
|
1331
|
+
* - See {@link https://chronos.nazmul-nhb.dev/docs/plugins#-official-plugins full list of plugins and the methods they register}.
|
|
1317
1332
|
*/
|
|
1318
1333
|
static register(plugin: ChronosPlugin): void;
|
|
1319
1334
|
}
|
|
@@ -1411,7 +1426,7 @@ interface ChronosStatics {
|
|
|
1411
1426
|
* - To prevent this incorrect *linter error* in `React` projects, prefer using {@link register} method (alias `use` method).
|
|
1412
1427
|
*
|
|
1413
1428
|
* - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
|
|
1414
|
-
* - See {@link https://
|
|
1429
|
+
* - See {@link https://chronos.nazmul-nhb.dev/docs/plugins#-official-plugins full list of plugins and the methods they register}.
|
|
1415
1430
|
*/
|
|
1416
1431
|
use(plugin: ChronosPlugin): void;
|
|
1417
1432
|
/**
|
|
@@ -1424,7 +1439,7 @@ interface ChronosStatics {
|
|
|
1424
1439
|
* - To prevent this incorrect *linter error* in `React` projects, prefer using this (`register`) method over {@link use} method.
|
|
1425
1440
|
*
|
|
1426
1441
|
* - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
|
|
1427
|
-
* - See {@link https://
|
|
1442
|
+
* - See {@link https://chronos.nazmul-nhb.dev/docs/plugins#-official-plugins full list of plugins and the methods they register}.
|
|
1428
1443
|
*/
|
|
1429
1444
|
register(plugin: ChronosPlugin): void;
|
|
1430
1445
|
/**
|
|
@@ -1768,7 +1783,7 @@ interface FormatOptions {
|
|
|
1768
1783
|
*
|
|
1769
1784
|
* - 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`, and `ZZ`.
|
|
1770
1785
|
* - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
|
|
1771
|
-
* - Please refer to {@link https://
|
|
1786
|
+
* - Please refer to {@link https://chronos.nazmul-nhb.dev/docs/chronos/format#format-tokens format tokens} for details.
|
|
1772
1787
|
*/
|
|
1773
1788
|
format?: string;
|
|
1774
1789
|
/** - Whether to use UTC time. Defaults to `false`. */
|
|
@@ -1864,7 +1879,7 @@ interface ChronosInternals {
|
|
|
1864
1879
|
* @param offset Optional UTC offset in `UTC±HH:mm` format.
|
|
1865
1880
|
* @param tzName Optional time zone name to set.
|
|
1866
1881
|
* @param tzId Optional time zone identifier(s) to set.
|
|
1867
|
-
* @param tzTracker Optional tracker to identify the instance created by {@link https://
|
|
1882
|
+
* @param tzTracker Optional tracker to identify the instance created by {@link https://chronos.nazmul-nhb.dev/docs/plugins/timezone-plugin#timezone timeZone} method.
|
|
1868
1883
|
* @returns The `Chronos` instance with the specified origin and other properties.
|
|
1869
1884
|
*/
|
|
1870
1885
|
withOrigin<Tz extends ChronosTimeZone>(instance: Chronos, method: PluginMethods, offset?: UTCOffset, tzName?: LooseLiteral<TimeZoneName>, tzId?: TimeZoneId, tzTracker?: $TimeZoneIdentifier | TimeZone | UTCOffset): Chronos<Tz>;
|
package/dist/types.d.cts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { $ as $UnitAnyCase, $t as BanglaDateOptions, A as ChronosObject, At as TimeZoneDetails, B as WeekdayOptions, Bt as ChronosStatics, C as $Chronos, Ct as NumberingSystem, D as ChronosInput, Dt as TimeUnitValue, E as $StaticMethods, Et as TimeUnit, F as DatesInRangeOptions, Ft as TimeZoneNameNative, G as $LocalArguments, Gt as $BanglaYear, H as $DateUnit, I as PluginMethods, It as TimestampOptions, J as $TimeUnitKey, Jt as $BnMonthPadded, K as $NativeTzNameOrId, Kt as $BnDatePadded, L as RangeWithDates, Lt as UTCMinute, M as ChronosTimeZone, Mt as TimeZoneIdNative, N as ChronosWithOptions, Nt as TimeZoneIdentifier, O as ChronosInternals, Ot as TimeWithUnit, P as DateRangeOptions, Pt as TimeZoneName, Q as $UTCOffset, Qt as BanglaDateObject, R as RelativeDateRange, Rt as UTCOffset, S as ZodiacSign, St as NegativeUTCHour, T as $PluginMethods, Tt as Quarter, U as $GMTOffset, Ut as $BanglaMonth, V as WithoutOrigin, W as $ISOTimeString, Wt as $BanglaMonthDate, X as $TimeUnitVarMap, Xt as BanglaDate, Y as $TimeUnitVar, Yt as $BnYearPadded, Z as $TimeZoneIdentifier, Zt as BanglaDateFormat, _ as ZodiacArray, _n as SecondToken, _t as LocalesArguments, a as BusinessOptionsWeekends, an as BnCalendarConfig, at as DateArgs, b as ZodiacOptions, bn as TimeToken, bt as MonthName, c as DayPart, cn as DateFormatToken, ct as DateString, d as DurationOptions, dn as FormatToken, dt as FromNowUnit, en as BanglaDayName, et as ChronosStaticKey, f as MonthBoundary, fn as HourToken, ft as GreetingConfigs, g as TimeDuration, gn as SafeFormat, gt as LocaleCalendar, h as SeasonPreset, hn as MonthToken, ht as ISODateTimeString, i as BusinessOptionsBasic, in as BanglaYear, it as ClockTime, j as ChronosProperties, jt as TimeZoneId, k as ChronosMethods, kt as TimeZone, l as DayPartConfig, ln as DateToken, lt as DateTimeFormatOptions, m as SeasonOptions, mn as MinuteToken, mt as ISODateFormat, n as $BusinessHourOptions, nn as BanglaMonthName, nt as ClockMinute, o as ChronosPlugin, on as BnCalendarVariant, ot as DateFormatOptions, p as SeasonDefinition, pn as MSToken, pt as HourMinutes, q as $TZLabelKey, qt as $BnEn, r as AcademicYear, rn as BanglaSeasonName, rt as ClockSecond, s as DateBoundary, sn as DateWithSeasonToken, st as DateLike, t as $BusinessHourBaseOptions, tn as BanglaMonth, tt as ClockHour, u as DurationKey, un as DayToken, ut as FormatOptions, v as ZodiacMeta, vn as TimeFormatToken, vt as Milliseconds, w as $InstanceMethods, wt as PositiveUTCHour, x as ZodiacPreset, xn as YearToken, xt as MonthString, y as ZodiacMetaOptions, yn as TimeOnlyFormat, yt as MonthDateString, z as RelativeRangeOptions, zt as WeekDay } from "./types-
|
|
17
|
+
import { $ as $UnitAnyCase, $t as BanglaDateOptions, A as ChronosObject, At as TimeZoneDetails, B as WeekdayOptions, Bt as ChronosStatics, C as $Chronos, Ct as NumberingSystem, D as ChronosInput, Dt as TimeUnitValue, E as $StaticMethods, Et as TimeUnit, F as DatesInRangeOptions, Ft as TimeZoneNameNative, G as $LocalArguments, Gt as $BanglaYear, H as $DateUnit, I as PluginMethods, It as TimestampOptions, J as $TimeUnitKey, Jt as $BnMonthPadded, K as $NativeTzNameOrId, Kt as $BnDatePadded, L as RangeWithDates, Lt as UTCMinute, M as ChronosTimeZone, Mt as TimeZoneIdNative, N as ChronosWithOptions, Nt as TimeZoneIdentifier, O as ChronosInternals, Ot as TimeWithUnit, P as DateRangeOptions, Pt as TimeZoneName, Q as $UTCOffset, Qt as BanglaDateObject, R as RelativeDateRange, Rt as UTCOffset, S as ZodiacSign, St as NegativeUTCHour, T as $PluginMethods, Tt as Quarter, U as $GMTOffset, Ut as $BanglaMonth, V as WithoutOrigin, W as $ISOTimeString, Wt as $BanglaMonthDate, X as $TimeUnitVarMap, Xt as BanglaDate, Y as $TimeUnitVar, Yt as $BnYearPadded, Z as $TimeZoneIdentifier, Zt as BanglaDateFormat, _ as ZodiacArray, _n as SecondToken, _t as LocalesArguments, a as BusinessOptionsWeekends, an as BnCalendarConfig, at as DateArgs, b as ZodiacOptions, bn as TimeToken, bt as MonthName, c as DayPart, cn as DateFormatToken, ct as DateString, d as DurationOptions, dn as FormatToken, dt as FromNowUnit, en as BanglaDayName, et as ChronosStaticKey, f as MonthBoundary, fn as HourToken, ft as GreetingConfigs, g as TimeDuration, gn as SafeFormat, gt as LocaleCalendar, h as SeasonPreset, hn as MonthToken, ht as ISODateTimeString, i as BusinessOptionsBasic, in as BanglaYear, it as ClockTime, j as ChronosProperties, jt as TimeZoneId, k as ChronosMethods, kt as TimeZone, l as DayPartConfig, ln as DateToken, lt as DateTimeFormatOptions, m as SeasonOptions, mn as MinuteToken, mt as ISODateFormat, n as $BusinessHourOptions, nn as BanglaMonthName, nt as ClockMinute, o as ChronosPlugin, on as BnCalendarVariant, ot as DateFormatOptions, p as SeasonDefinition, pn as MSToken, pt as HourMinutes, q as $TZLabelKey, qt as $BnEn, r as AcademicYear, rn as BanglaSeasonName, rt as ClockSecond, s as DateBoundary, sn as DateWithSeasonToken, st as DateLike, t as $BusinessHourBaseOptions, tn as BanglaMonth, tt as ClockHour, u as DurationKey, un as DayToken, ut as FormatOptions, v as ZodiacMeta, vn as TimeFormatToken, vt as Milliseconds, w as $InstanceMethods, wt as PositiveUTCHour, x as ZodiacPreset, xn as YearToken, xt as MonthString, y as ZodiacMetaOptions, yn as TimeOnlyFormat, yt as MonthDateString, z as RelativeRangeOptions, zt as WeekDay } from "./types-dNpvroNQ.cjs";
|
|
18
18
|
export type { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, $BusinessHourBaseOptions, $BusinessHourOptions, $Chronos, $DateUnit, $GMTOffset, $ISOTimeString, $InstanceMethods, $LocalArguments, $NativeTzNameOrId, $PluginMethods, $StaticMethods, $TZLabelKey, $TimeUnitKey, $TimeUnitVar, $TimeUnitVarMap, $TimeZoneIdentifier, $UTCOffset, $UnitAnyCase, AcademicYear, BanglaDate, BanglaDateFormat, BanglaDateObject, BanglaDateOptions, BanglaDayName, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, BusinessOptionsBasic, BusinessOptionsWeekends, ChronosInput, ChronosInternals, ChronosMethods, ChronosObject, ChronosPlugin, ChronosProperties, ChronosStaticKey, ChronosStatics, ChronosTimeZone, ChronosWithOptions, ClockHour, ClockMinute, ClockSecond, ClockTime, DateArgs, DateBoundary, DateFormatOptions, DateFormatToken, DateLike, DateRangeOptions, DateString, DateTimeFormatOptions, DateToken, DateWithSeasonToken, DatesInRangeOptions, DayPart, DayPartConfig, DayToken, DurationKey, DurationOptions, FormatOptions, FormatToken, FromNowUnit, GreetingConfigs, HourMinutes, HourToken, ISODateFormat, ISODateTimeString, LocaleCalendar, LocalesArguments, MSToken, Milliseconds, MinuteToken, MonthBoundary, MonthDateString, MonthName, MonthString, MonthToken, NegativeUTCHour, NumberingSystem, PluginMethods, PositiveUTCHour, Quarter, RangeWithDates, RelativeDateRange, RelativeRangeOptions, SafeFormat, SeasonDefinition, SeasonOptions, SeasonPreset, SecondToken, TimeDuration, TimeFormatToken, TimeOnlyFormat, TimeToken, TimeUnit, TimeUnitValue, TimeWithUnit, TimeZone, TimeZoneDetails, TimeZoneId, TimeZoneIdNative, TimeZoneIdentifier, TimeZoneName, TimeZoneNameNative, TimestampOptions, UTCMinute, UTCOffset, WeekDay, WeekdayOptions, WithoutOrigin, YearToken, ZodiacArray, ZodiacMeta, ZodiacMetaOptions, ZodiacOptions, ZodiacPreset, ZodiacSign };
|
package/dist/types.d.mts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { $ as $UnitAnyCase, $t as BanglaDateOptions, A as ChronosObject, At as TimeZoneDetails, B as WeekdayOptions, Bt as ChronosStatics, C as $Chronos, Ct as NumberingSystem, D as ChronosInput, Dt as TimeUnitValue, E as $StaticMethods, Et as TimeUnit, F as DatesInRangeOptions, Ft as TimeZoneNameNative, G as $LocalArguments, Gt as $BanglaYear, H as $DateUnit, I as PluginMethods, It as TimestampOptions, J as $TimeUnitKey, Jt as $BnMonthPadded, K as $NativeTzNameOrId, Kt as $BnDatePadded, L as RangeWithDates, Lt as UTCMinute, M as ChronosTimeZone, Mt as TimeZoneIdNative, N as ChronosWithOptions, Nt as TimeZoneIdentifier, O as ChronosInternals, Ot as TimeWithUnit, P as DateRangeOptions, Pt as TimeZoneName, Q as $UTCOffset, Qt as BanglaDateObject, R as RelativeDateRange, Rt as UTCOffset, S as ZodiacSign, St as NegativeUTCHour, T as $PluginMethods, Tt as Quarter, U as $GMTOffset, Ut as $BanglaMonth, V as WithoutOrigin, W as $ISOTimeString, Wt as $BanglaMonthDate, X as $TimeUnitVarMap, Xt as BanglaDate, Y as $TimeUnitVar, Yt as $BnYearPadded, Z as $TimeZoneIdentifier, Zt as BanglaDateFormat, _ as ZodiacArray, _n as SecondToken, _t as LocalesArguments, a as BusinessOptionsWeekends, an as BnCalendarConfig, at as DateArgs, b as ZodiacOptions, bn as TimeToken, bt as MonthName, c as DayPart, cn as DateFormatToken, ct as DateString, d as DurationOptions, dn as FormatToken, dt as FromNowUnit, en as BanglaDayName, et as ChronosStaticKey, f as MonthBoundary, fn as HourToken, ft as GreetingConfigs, g as TimeDuration, gn as SafeFormat, gt as LocaleCalendar, h as SeasonPreset, hn as MonthToken, ht as ISODateTimeString, i as BusinessOptionsBasic, in as BanglaYear, it as ClockTime, j as ChronosProperties, jt as TimeZoneId, k as ChronosMethods, kt as TimeZone, l as DayPartConfig, ln as DateToken, lt as DateTimeFormatOptions, m as SeasonOptions, mn as MinuteToken, mt as ISODateFormat, n as $BusinessHourOptions, nn as BanglaMonthName, nt as ClockMinute, o as ChronosPlugin, on as BnCalendarVariant, ot as DateFormatOptions, p as SeasonDefinition, pn as MSToken, pt as HourMinutes, q as $TZLabelKey, qt as $BnEn, r as AcademicYear, rn as BanglaSeasonName, rt as ClockSecond, s as DateBoundary, sn as DateWithSeasonToken, st as DateLike, t as $BusinessHourBaseOptions, tn as BanglaMonth, tt as ClockHour, u as DurationKey, un as DayToken, ut as FormatOptions, v as ZodiacMeta, vn as TimeFormatToken, vt as Milliseconds, w as $InstanceMethods, wt as PositiveUTCHour, x as ZodiacPreset, xn as YearToken, xt as MonthString, y as ZodiacMetaOptions, yn as TimeOnlyFormat, yt as MonthDateString, z as RelativeRangeOptions, zt as WeekDay } from "./types-
|
|
17
|
+
import { $ as $UnitAnyCase, $t as BanglaDateOptions, A as ChronosObject, At as TimeZoneDetails, B as WeekdayOptions, Bt as ChronosStatics, C as $Chronos, Ct as NumberingSystem, D as ChronosInput, Dt as TimeUnitValue, E as $StaticMethods, Et as TimeUnit, F as DatesInRangeOptions, Ft as TimeZoneNameNative, G as $LocalArguments, Gt as $BanglaYear, H as $DateUnit, I as PluginMethods, It as TimestampOptions, J as $TimeUnitKey, Jt as $BnMonthPadded, K as $NativeTzNameOrId, Kt as $BnDatePadded, L as RangeWithDates, Lt as UTCMinute, M as ChronosTimeZone, Mt as TimeZoneIdNative, N as ChronosWithOptions, Nt as TimeZoneIdentifier, O as ChronosInternals, Ot as TimeWithUnit, P as DateRangeOptions, Pt as TimeZoneName, Q as $UTCOffset, Qt as BanglaDateObject, R as RelativeDateRange, Rt as UTCOffset, S as ZodiacSign, St as NegativeUTCHour, T as $PluginMethods, Tt as Quarter, U as $GMTOffset, Ut as $BanglaMonth, V as WithoutOrigin, W as $ISOTimeString, Wt as $BanglaMonthDate, X as $TimeUnitVarMap, Xt as BanglaDate, Y as $TimeUnitVar, Yt as $BnYearPadded, Z as $TimeZoneIdentifier, Zt as BanglaDateFormat, _ as ZodiacArray, _n as SecondToken, _t as LocalesArguments, a as BusinessOptionsWeekends, an as BnCalendarConfig, at as DateArgs, b as ZodiacOptions, bn as TimeToken, bt as MonthName, c as DayPart, cn as DateFormatToken, ct as DateString, d as DurationOptions, dn as FormatToken, dt as FromNowUnit, en as BanglaDayName, et as ChronosStaticKey, f as MonthBoundary, fn as HourToken, ft as GreetingConfigs, g as TimeDuration, gn as SafeFormat, gt as LocaleCalendar, h as SeasonPreset, hn as MonthToken, ht as ISODateTimeString, i as BusinessOptionsBasic, in as BanglaYear, it as ClockTime, j as ChronosProperties, jt as TimeZoneId, k as ChronosMethods, kt as TimeZone, l as DayPartConfig, ln as DateToken, lt as DateTimeFormatOptions, m as SeasonOptions, mn as MinuteToken, mt as ISODateFormat, n as $BusinessHourOptions, nn as BanglaMonthName, nt as ClockMinute, o as ChronosPlugin, on as BnCalendarVariant, ot as DateFormatOptions, p as SeasonDefinition, pn as MSToken, pt as HourMinutes, q as $TZLabelKey, qt as $BnEn, r as AcademicYear, rn as BanglaSeasonName, rt as ClockSecond, s as DateBoundary, sn as DateWithSeasonToken, st as DateLike, t as $BusinessHourBaseOptions, tn as BanglaMonth, tt as ClockHour, u as DurationKey, un as DayToken, ut as FormatOptions, v as ZodiacMeta, vn as TimeFormatToken, vt as Milliseconds, w as $InstanceMethods, wt as PositiveUTCHour, x as ZodiacPreset, xn as YearToken, xt as MonthString, y as ZodiacMetaOptions, yn as TimeOnlyFormat, yt as MonthDateString, z as RelativeRangeOptions, zt as WeekDay } from "./types-Be4ZMpOV.mjs";
|
|
18
18
|
export type { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, $BusinessHourBaseOptions, $BusinessHourOptions, $Chronos, $DateUnit, $GMTOffset, $ISOTimeString, $InstanceMethods, $LocalArguments, $NativeTzNameOrId, $PluginMethods, $StaticMethods, $TZLabelKey, $TimeUnitKey, $TimeUnitVar, $TimeUnitVarMap, $TimeZoneIdentifier, $UTCOffset, $UnitAnyCase, AcademicYear, BanglaDate, BanglaDateFormat, BanglaDateObject, BanglaDateOptions, BanglaDayName, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, BusinessOptionsBasic, BusinessOptionsWeekends, ChronosInput, ChronosInternals, ChronosMethods, ChronosObject, ChronosPlugin, ChronosProperties, ChronosStaticKey, ChronosStatics, ChronosTimeZone, ChronosWithOptions, ClockHour, ClockMinute, ClockSecond, ClockTime, DateArgs, DateBoundary, DateFormatOptions, DateFormatToken, DateLike, DateRangeOptions, DateString, DateTimeFormatOptions, DateToken, DateWithSeasonToken, DatesInRangeOptions, DayPart, DayPartConfig, DayToken, DurationKey, DurationOptions, FormatOptions, FormatToken, FromNowUnit, GreetingConfigs, HourMinutes, HourToken, ISODateFormat, ISODateTimeString, LocaleCalendar, LocalesArguments, MSToken, Milliseconds, MinuteToken, MonthBoundary, MonthDateString, MonthName, MonthString, MonthToken, NegativeUTCHour, NumberingSystem, PluginMethods, PositiveUTCHour, Quarter, RangeWithDates, RelativeDateRange, RelativeRangeOptions, SafeFormat, SeasonDefinition, SeasonOptions, SeasonPreset, SecondToken, TimeDuration, TimeFormatToken, TimeOnlyFormat, TimeToken, TimeUnit, TimeUnitValue, TimeWithUnit, TimeZone, TimeZoneDetails, TimeZoneId, TimeZoneIdNative, TimeZoneIdentifier, TimeZoneName, TimeZoneNameNative, TimestampOptions, UTCMinute, UTCOffset, WeekDay, WeekdayOptions, WithoutOrigin, YearToken, ZodiacArray, ZodiacMeta, ZodiacMetaOptions, ZodiacOptions, ZodiacPreset, ZodiacSign };
|
|
@@ -150,8 +150,8 @@ function getTimeZoneIds(offset) {
|
|
|
150
150
|
* - The default format is `'dd, mmm DD, YYYY HH:mm:ss'` (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
|
|
151
151
|
* - By default, local time is used; set `useUTC` to `true` to format in UTC.
|
|
152
152
|
* - The format string supports various tokens for date and time components, as well as literal text enclosed in square brackets.
|
|
153
|
-
* - See {@link https://
|
|
154
|
-
* - For more complex date/time manipulations, consider using the {@link https://
|
|
153
|
+
* - See {@link https://chronos.nazmul-nhb.dev/docs/chronos/format#format-tokens format tokens} for details on supported tokens.
|
|
154
|
+
* - For more complex date/time manipulations, consider using the {@link https://chronos.nazmul-nhb.dev/docs/chronos Chronos} class.
|
|
155
155
|
*
|
|
156
156
|
* @returns Date/time string in specified format.
|
|
157
157
|
*/
|
|
@@ -150,8 +150,8 @@ function getTimeZoneIds(offset) {
|
|
|
150
150
|
* - The default format is `'dd, mmm DD, YYYY HH:mm:ss'` (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
|
|
151
151
|
* - By default, local time is used; set `useUTC` to `true` to format in UTC.
|
|
152
152
|
* - The format string supports various tokens for date and time components, as well as literal text enclosed in square brackets.
|
|
153
|
-
* - See {@link https://
|
|
154
|
-
* - For more complex date/time manipulations, consider using the {@link https://
|
|
153
|
+
* - See {@link https://chronos.nazmul-nhb.dev/docs/chronos/format#format-tokens format tokens} for details on supported tokens.
|
|
154
|
+
* - For more complex date/time manipulations, consider using the {@link https://chronos.nazmul-nhb.dev/docs/chronos Chronos} class.
|
|
155
155
|
*
|
|
156
156
|
* @returns Date/time string in specified format.
|
|
157
157
|
*/
|
package/dist/utils.cjs
CHANGED
|
@@ -19,8 +19,8 @@ const require_basic = require('./basic-DsQqC5nZ.cjs');
|
|
|
19
19
|
const require_primitives = require('./primitives-DfO90c3G.cjs');
|
|
20
20
|
const require_utilities = require('./utilities-C_KmjIRK.cjs');
|
|
21
21
|
const require_guards = require('./guards.cjs');
|
|
22
|
-
const require_utilities$1 = require('./utilities-
|
|
23
|
-
const require_greet = require('./greet-
|
|
22
|
+
const require_utilities$1 = require('./utilities-CCnKWAsS.cjs');
|
|
23
|
+
const require_greet = require('./greet-CMkwXJ7o.cjs');
|
|
24
24
|
|
|
25
25
|
//#region src/utils/parser.ts
|
|
26
26
|
/**
|
package/dist/utils.d.cts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { At as TimeZoneDetails, Cn as Numeric, It as TimestampOptions, Mt as TimeZoneIdNative, Ot as TimeWithUnit, Rt as UTCOffset, Sn as Maybe, Z as $TimeZoneIdentifier, at as DateArgs, ft as GreetingConfigs, gn as SafeFormat, ht as ISODateTimeString, it as ClockTime, mt as ISODateFormat, ot as DateFormatOptions, pt as HourMinutes, yn as TimeOnlyFormat } from "./types-
|
|
17
|
+
import { At as TimeZoneDetails, Cn as Numeric, It as TimestampOptions, Mt as TimeZoneIdNative, Ot as TimeWithUnit, Rt as UTCOffset, Sn as Maybe, Z as $TimeZoneIdentifier, at as DateArgs, ft as GreetingConfigs, gn as SafeFormat, ht as ISODateTimeString, it as ClockTime, mt as ISODateFormat, ot as DateFormatOptions, pt as HourMinutes, yn as TimeOnlyFormat } from "./types-dNpvroNQ.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/utils/greet.d.ts
|
|
20
20
|
/**
|
|
@@ -120,8 +120,8 @@ declare function getTimeZoneIds(offset: UTCOffset): TimeZoneIdNative[];
|
|
|
120
120
|
* - The default format is `'dd, mmm DD, YYYY HH:mm:ss'` (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
|
|
121
121
|
* - By default, local time is used; set `useUTC` to `true` to format in UTC.
|
|
122
122
|
* - The format string supports various tokens for date and time components, as well as literal text enclosed in square brackets.
|
|
123
|
-
* - See {@link https://
|
|
124
|
-
* - For more complex date/time manipulations, consider using the {@link https://
|
|
123
|
+
* - See {@link https://chronos.nazmul-nhb.dev/docs/chronos/format#format-tokens format tokens} for details on supported tokens.
|
|
124
|
+
* - For more complex date/time manipulations, consider using the {@link https://chronos.nazmul-nhb.dev/docs/chronos Chronos} class.
|
|
125
125
|
*
|
|
126
126
|
* @returns Date/time string in specified format.
|
|
127
127
|
*/
|
package/dist/utils.d.mts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { At as TimeZoneDetails, Cn as Numeric, It as TimestampOptions, Mt as TimeZoneIdNative, Ot as TimeWithUnit, Rt as UTCOffset, Sn as Maybe, Z as $TimeZoneIdentifier, at as DateArgs, ft as GreetingConfigs, gn as SafeFormat, ht as ISODateTimeString, it as ClockTime, mt as ISODateFormat, ot as DateFormatOptions, pt as HourMinutes, yn as TimeOnlyFormat } from "./types-
|
|
17
|
+
import { At as TimeZoneDetails, Cn as Numeric, It as TimestampOptions, Mt as TimeZoneIdNative, Ot as TimeWithUnit, Rt as UTCOffset, Sn as Maybe, Z as $TimeZoneIdentifier, at as DateArgs, ft as GreetingConfigs, gn as SafeFormat, ht as ISODateTimeString, it as ClockTime, mt as ISODateFormat, ot as DateFormatOptions, pt as HourMinutes, yn as TimeOnlyFormat } from "./types-Be4ZMpOV.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/utils/greet.d.ts
|
|
20
20
|
/**
|
|
@@ -120,8 +120,8 @@ declare function getTimeZoneIds(offset: UTCOffset): TimeZoneIdNative[];
|
|
|
120
120
|
* - The default format is `'dd, mmm DD, YYYY HH:mm:ss'` (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
|
|
121
121
|
* - By default, local time is used; set `useUTC` to `true` to format in UTC.
|
|
122
122
|
* - The format string supports various tokens for date and time components, as well as literal text enclosed in square brackets.
|
|
123
|
-
* - See {@link https://
|
|
124
|
-
* - For more complex date/time manipulations, consider using the {@link https://
|
|
123
|
+
* - See {@link https://chronos.nazmul-nhb.dev/docs/chronos/format#format-tokens format tokens} for details on supported tokens.
|
|
124
|
+
* - For more complex date/time manipulations, consider using the {@link https://chronos.nazmul-nhb.dev/docs/chronos Chronos} class.
|
|
125
125
|
*
|
|
126
126
|
* @returns Date/time string in specified format.
|
|
127
127
|
*/
|
package/dist/utils.mjs
CHANGED
|
@@ -18,8 +18,8 @@ import { l as MS_MAP } from "./basic-DqKyujoj.mjs";
|
|
|
18
18
|
import { n as isNonEmptyString, r as isNumber } from "./primitives-BXhrgs9R.mjs";
|
|
19
19
|
import { a as isNumericString } from "./utilities-BnHD2hHf.mjs";
|
|
20
20
|
import { isTimeWithUnit } from "./guards.mjs";
|
|
21
|
-
import { a as formatDate, c as formatUTCOffset, d as getTimeZoneIds, f as getTimestamp, i as extractTimeFromUTC, l as getNativeTimeZoneId, n as extractHourMinute, o as formatDateRelative, p as getTotalMinutes, r as extractMinutesFromUTC, s as formatTimePart, t as convertMinutesToTime, u as getTimeZoneDetails } from "./utilities-
|
|
22
|
-
import { t as getGreeting } from "./greet-
|
|
21
|
+
import { a as formatDate, c as formatUTCOffset, d as getTimeZoneIds, f as getTimestamp, i as extractTimeFromUTC, l as getNativeTimeZoneId, n as extractHourMinute, o as formatDateRelative, p as getTotalMinutes, r as extractMinutesFromUTC, s as formatTimePart, t as convertMinutesToTime, u as getTimeZoneDetails } from "./utilities-C6NiChRE.mjs";
|
|
22
|
+
import { t as getGreeting } from "./greet-DNGvP7nm.mjs";
|
|
23
23
|
|
|
24
24
|
//#region src/utils/parser.ts
|
|
25
25
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chronos-date",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A lightweight, immutable, and plugin-based date-time manipulation library for JavaScript and TypeScript.",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -168,6 +168,7 @@
|
|
|
168
168
|
"lint": "biome lint --diagnostic-level=error",
|
|
169
169
|
"fix": "biome check --write --diagnostic-level=error",
|
|
170
170
|
"format": "biome format --write --diagnostic-level=error",
|
|
171
|
-
"plugin": "nhb-module -t chronos-plugin -d src/plugins"
|
|
171
|
+
"plugin": "nhb-module -t chronos-plugin -d src/plugins",
|
|
172
|
+
"create-docs": "nhb-module -t docs"
|
|
172
173
|
}
|
|
173
174
|
}
|