chronos-date 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{convert-mMaI4YP0.mjs → convert-BY-uEIvg.mjs} +3 -3
- package/dist/{convert-DbgntRVW.cjs → convert-z8FAUOuh.cjs} +3 -3
- package/dist/{greet-D07t2_e6.mjs → greet-D89spydp.mjs} +1 -1
- package/dist/{greet-hjVsd2dt.cjs → greet-ok0_Wai_.cjs} +1 -1
- package/dist/guards.cjs +3 -3
- package/dist/guards.d.cts +1 -1
- package/dist/guards.d.mts +1 -1
- package/dist/guards.mjs +3 -3
- package/dist/{helpers-CQzi908i.cjs → helpers-D8yAKOsC.cjs} +3 -3
- package/dist/{helpers-DEf4sevD.mjs → helpers-eVQCueAC.mjs} +3 -3
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +22 -22
- package/dist/{non-primitives-DBtomDty.mjs → non-primitives-B38XfU4A.mjs} +1 -1
- package/dist/{non-primitives-D9zxCwX8.cjs → non-primitives-Dj558axv.cjs} +1 -1
- package/dist/plugins/banglaPlugin.cjs +4 -4
- package/dist/plugins/banglaPlugin.d.cts +2 -2
- package/dist/plugins/banglaPlugin.d.mts +2 -2
- package/dist/plugins/banglaPlugin.mjs +4 -4
- package/dist/plugins/businessPlugin.cjs +2 -2
- package/dist/plugins/businessPlugin.d.cts +10 -10
- package/dist/plugins/businessPlugin.d.mts +10 -10
- package/dist/plugins/businessPlugin.mjs +2 -2
- package/dist/plugins/dateRangePlugin.cjs +2 -2
- package/dist/plugins/dateRangePlugin.d.cts +2 -2
- package/dist/plugins/dateRangePlugin.d.mts +2 -2
- package/dist/plugins/dateRangePlugin.mjs +2 -2
- package/dist/plugins/dayPartPlugin.cjs +1 -1
- package/dist/plugins/dayPartPlugin.d.cts +2 -2
- package/dist/plugins/dayPartPlugin.d.mts +2 -2
- package/dist/plugins/dayPartPlugin.mjs +1 -1
- package/dist/plugins/durationPlugin.d.cts +2 -2
- package/dist/plugins/durationPlugin.d.mts +2 -2
- package/dist/plugins/fromNowPlugin.cjs +1 -1
- package/dist/plugins/fromNowPlugin.d.cts +2 -2
- package/dist/plugins/fromNowPlugin.d.mts +2 -2
- package/dist/plugins/fromNowPlugin.mjs +1 -1
- package/dist/plugins/greetingPlugin.cjs +1 -1
- package/dist/plugins/greetingPlugin.d.cts +2 -2
- package/dist/plugins/greetingPlugin.d.mts +2 -2
- package/dist/plugins/greetingPlugin.mjs +1 -1
- package/dist/plugins/palindromePlugin.cjs +2 -2
- package/dist/plugins/palindromePlugin.d.cts +2 -2
- package/dist/plugins/palindromePlugin.d.mts +2 -2
- package/dist/plugins/palindromePlugin.mjs +2 -2
- package/dist/plugins/relativeTimePlugin.d.cts +2 -2
- package/dist/plugins/relativeTimePlugin.d.mts +2 -2
- package/dist/plugins/roundPlugin.cjs +1 -1
- package/dist/plugins/roundPlugin.d.cts +3 -3
- package/dist/plugins/roundPlugin.d.mts +3 -3
- package/dist/plugins/roundPlugin.mjs +1 -1
- package/dist/plugins/seasonPlugin.d.cts +2 -2
- package/dist/plugins/seasonPlugin.d.mts +2 -2
- package/dist/plugins/timeZonePlugin.cjs +6 -6
- package/dist/plugins/timeZonePlugin.d.cts +6 -6
- package/dist/plugins/timeZonePlugin.d.mts +6 -6
- package/dist/plugins/timeZonePlugin.mjs +6 -6
- package/dist/plugins/zodiacPlugin.cjs +1 -1
- package/dist/plugins/zodiacPlugin.d.cts +2 -2
- package/dist/plugins/zodiacPlugin.d.mts +2 -2
- package/dist/plugins/zodiacPlugin.mjs +1 -1
- package/dist/{primitives-dXzXlzJw.mjs → primitives-DpMa2dS2.mjs} +1 -1
- package/dist/{primitives-CtuSNmV7.cjs → primitives-DutXlR0D.cjs} +1 -1
- package/dist/{types-Bs_rfkka.d.mts → types-BwnEgU6z.d.mts} +74 -59
- package/dist/{types-CaVuY1_4.d.cts → types-CaZLuhLz.d.cts} +74 -59
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/dist/{utilities-BKtVo78T.mjs → utilities-BfGFB7aw.mjs} +4 -4
- package/dist/{utilities-D47SN9EZ.cjs → utilities-CZTvwfjY.cjs} +4 -4
- package/dist/{utilities-BGX8dviZ.mjs → utilities-C_cYlUNI.mjs} +4 -4
- package/dist/{utilities-CpF3uys3.cjs → utilities-CkQA3Fkh.cjs} +4 -4
- package/dist/utils.cjs +4 -4
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.mjs +4 -4
- package/package.json +4 -4
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { A as MILLISECOND_FORMATS, B as ZODIAC_PRESETS, C as DATE_PARTS, D as INTERNALS, E as HOUR_FORMATS, F as TIME_FORMATS, I as TIME_UNIT_VARIANTS, M as MONTHS, N as MONTH_FORMATS, O as LOCALE_CALENDARS, P as SECOND_FORMATS, R as WESTERN_ZODIAC_SIGNS, S as DATE_FORMATS, T as DAY_FORMATS, _ as TIME_ZONE_LABELS, b as BN_MONTH_TABLES, g as TIME_ZONE_IDS, h as TIME_ZONES_NATIVE, j as MINUTE_FORMATS, k as LOCALE_NUMBERING_SYSTEMS, m as TIME_ZONES, u as SEASON_PRESETS, v as BN_DAYS, w as DAYS, x as BN_SEASONS, y as BN_MONTHS, z as YEAR_FORMATS } from "./seasons-CpUn45n6.cjs";
|
|
18
18
|
|
|
19
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
19
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/dts/utils/types.d.ts
|
|
20
20
|
/**
|
|
21
21
|
* * Broadens a literal union (typically `string` or `number`) to also accept any other value of the base type, without losing IntelliSense autocomplete for the provided literals.
|
|
22
22
|
*
|
|
@@ -136,7 +136,7 @@ type $JoinRepeat<S extends string, A extends unknown[]> = A extends [unknown, ..
|
|
|
136
136
|
*/
|
|
137
137
|
type Repeat<S extends string, N extends number> = $JoinRepeat<S, $BuildTuple<N>>;
|
|
138
138
|
//#endregion
|
|
139
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
139
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/dts/number/constants.d.ts
|
|
140
140
|
/** List of all supported BCP 47 locales */
|
|
141
141
|
declare const LOCALE_CODES: readonly ["af-ZA", "am-ET", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-OM", "ar-QA", "ar-SA", "ar-SD", "ar-SY", "ar-TN", "ar-YE", "az-AZ", "be-BY", "bg-BG", "bn-BD", "bn-IN", "bs-BA", "ca-ES", "cs-CZ", "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "el-GR", "en-AU", "en-CA", "en-GB", "en-IE", "en-IN", "en-NZ", "en-PH", "en-SG", "en-US", "en-ZA", "es-AR", "es-BO", "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA", "es-PE", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fil-PH", "fr-BE", "fr-CA", "fr-CH", "fr-FR", "ga-IE", "gl-ES", "gu-IN", "he-IL", "hi-IN", "hr-HR", "hu-HU", "hy-AM", "id-ID", "is-IS", "it-CH", "it-IT", "ja-JP", "ka-GE", "kk-KZ", "km-KH", "kn-IN", "ko-KR", "ky-KG", "lt-LT", "lv-LV", "mk-MK", "ml-IN", "mn-MN", "mr-IN", "ms-MY", "mt-MT", "nb-NO", "ne-NP", "nl-BE", "nl-NL", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sq-AL", "sr-Latn", "sv-SE", "sw-KE", "ta-IN", "te-IN", "th-TH", "tr-TR", "uk-UA", "ur-PK", "uz-UZ", "vi-VN", "zh-CN", "zh-HK", "zh-TW"];
|
|
142
142
|
/** Mapping of CurrencyCodes to `LocaleCodes` */
|
|
@@ -312,7 +312,7 @@ declare const BN_DIGITS: Readonly<{
|
|
|
312
312
|
readonly '\u09EF': 9;
|
|
313
313
|
}>;
|
|
314
314
|
//#endregion
|
|
315
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
315
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/dts/number/types.d.ts
|
|
316
316
|
/** Enumerate & Enumerate Internal: builds a union of all numbers from 0 to N - 1 */
|
|
317
317
|
type $EnumerateInternal<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : $EnumerateInternal<N, [...Acc, Acc['length']]>;
|
|
318
318
|
/**
|
|
@@ -352,7 +352,7 @@ type BanglaDigit = keyof typeof BN_DIGITS;
|
|
|
352
352
|
/** Bangla digits from `১-৯` */
|
|
353
353
|
type $BnOnes = Exclude<BanglaDigit, '০'>;
|
|
354
354
|
//#endregion
|
|
355
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
355
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/dts/types/index.d.ts
|
|
356
356
|
/** Represents a value that may or may not be present. */
|
|
357
357
|
type Maybe<T> = T | undefined;
|
|
358
358
|
/** Union of `number` and numeric string */
|
|
@@ -403,7 +403,13 @@ type TimeOnlyFormat = LooseLiteral<TimeFormatToken>;
|
|
|
403
403
|
type StrictFormat = LooseLiteral<DateTimeISO | DateFormatToken | TimeFormatToken | `${DateFormatToken}${TokenConnector}${TimeFormatToken}`>;
|
|
404
404
|
//#endregion
|
|
405
405
|
//#region src/types/bangla-date.d.ts
|
|
406
|
+
/**
|
|
407
|
+
* Type representing the two possible locales for Bangla date: Bangla or English.
|
|
408
|
+
* - `'bn'` for Bangla (default)
|
|
409
|
+
* - `'en'` for English
|
|
410
|
+
*/
|
|
406
411
|
type $BnEn = 'bn' | 'en';
|
|
412
|
+
/** Type representing ০ padded Bangla digits from '০০' to '০৯'. */
|
|
407
413
|
type $BnOnesPadded = `০${$BnOnes}`;
|
|
408
414
|
/** Bangla month from `১-১২` */
|
|
409
415
|
type BanglaMonth = $BnOnes | $BnOnesPadded | '১০' | '১১' | '১২';
|
|
@@ -532,7 +538,7 @@ declare const chronos: ChronosStatics;
|
|
|
532
538
|
*
|
|
533
539
|
* @returns Instance of `Chronos` with all methods and properties.
|
|
534
540
|
*/
|
|
535
|
-
declare class Chronos {
|
|
541
|
+
declare class Chronos<Tz extends ChronosTimeZone = 'System'> {
|
|
536
542
|
#private;
|
|
537
543
|
/** Use `readonly and/or private` methods outside `Chronos`. Purpose: Plugin creation. */
|
|
538
544
|
protected static [INTERNALS]: ChronosInternals;
|
|
@@ -708,7 +714,7 @@ declare class Chronos {
|
|
|
708
714
|
/** @instance Enables arithmetic and comparison operations (e.g., `+new Chronos()`). Calls {@link getTimeStamp} method. */
|
|
709
715
|
valueOf(): number;
|
|
710
716
|
/** @instance Clones and returns exactly same `Chronos` instance. */
|
|
711
|
-
clone(): Chronos
|
|
717
|
+
clone(): Chronos<Tz>;
|
|
712
718
|
/** @instance Gets the native `Date` instance of the current `Chronos`. */
|
|
713
719
|
toDate(): Date;
|
|
714
720
|
/** @instance Returns a string representation of a date. */
|
|
@@ -780,43 +786,43 @@ declare class Chronos {
|
|
|
780
786
|
* @param seconds - Number of seconds to add.
|
|
781
787
|
* @returns A new `Chronos` instance with the updated date.
|
|
782
788
|
*/
|
|
783
|
-
addSeconds(seconds: number): Chronos
|
|
789
|
+
addSeconds(seconds: number): Chronos<Tz>;
|
|
784
790
|
/**
|
|
785
791
|
* @instance Adds minutes and returns a new immutable instance.
|
|
786
792
|
* @param minutes - Number of minutes to add.
|
|
787
793
|
* @returns A new `Chronos` instance with the updated date.
|
|
788
794
|
*/
|
|
789
|
-
addMinutes(minutes: number): Chronos
|
|
795
|
+
addMinutes(minutes: number): Chronos<Tz>;
|
|
790
796
|
/**
|
|
791
797
|
* @instance Adds hours and returns a new immutable instance.
|
|
792
798
|
* @param hours - Number of hours to add.
|
|
793
799
|
* @returns A new `Chronos` instance with the updated date.
|
|
794
800
|
*/
|
|
795
|
-
addHours(hours: number): Chronos
|
|
801
|
+
addHours(hours: number): Chronos<Tz>;
|
|
796
802
|
/**
|
|
797
803
|
* @instance Adds days and returns a new immutable instance.
|
|
798
804
|
* @param days - Number of days to add.
|
|
799
805
|
* @returns A new `Chronos` instance with the updated date.
|
|
800
806
|
*/
|
|
801
|
-
addDays(days: number): Chronos
|
|
807
|
+
addDays(days: number): Chronos<Tz>;
|
|
802
808
|
/**
|
|
803
809
|
* @instance Adds weeks and returns a new immutable instance.
|
|
804
810
|
* @param weeks - Number of weeks to add.
|
|
805
811
|
* @returns A new `Chronos` instance with the updated date.
|
|
806
812
|
*/
|
|
807
|
-
addWeeks(weeks: number): Chronos
|
|
813
|
+
addWeeks(weeks: number): Chronos<Tz>;
|
|
808
814
|
/**
|
|
809
815
|
* @instance Adds months and returns a new immutable instance.
|
|
810
816
|
* @param months - Number of months to add.
|
|
811
817
|
* @returns A new `Chronos` instance with the updated date.
|
|
812
818
|
*/
|
|
813
|
-
addMonths(months: number): Chronos
|
|
819
|
+
addMonths(months: number): Chronos<Tz>;
|
|
814
820
|
/**
|
|
815
821
|
* @instance Adds years and returns a new immutable instance.
|
|
816
822
|
* @param years - Number of years to add.
|
|
817
823
|
* @returns A new `Chronos` instance with the updated date.
|
|
818
824
|
*/
|
|
819
|
-
addYears(years: number): Chronos
|
|
825
|
+
addYears(years: number): Chronos<Tz>;
|
|
820
826
|
/**
|
|
821
827
|
* @instance Checks if the current year is a leap year.
|
|
822
828
|
* - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
|
|
@@ -834,38 +840,38 @@ declare class Chronos {
|
|
|
834
840
|
/**
|
|
835
841
|
* @instance Checks if another date is the same as this one in a specific unit.
|
|
836
842
|
* @param other The other date to compare.
|
|
837
|
-
* @param unit The unit to compare.
|
|
838
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday).
|
|
843
|
+
* @param unit The unit to compare. Default is `'millisecond'`.
|
|
844
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
|
|
839
845
|
*/
|
|
840
|
-
isSame(other: ChronosInput, unit
|
|
846
|
+
isSame(other: ChronosInput, unit?: TimeUnit, weekStartsOn?: Enumerate<7>): boolean;
|
|
841
847
|
/**
|
|
842
848
|
* @instance Checks if this date is before another date in a specific unit.
|
|
843
849
|
* @param other The other date to compare.
|
|
844
|
-
* @param unit The unit to compare.
|
|
845
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday).
|
|
850
|
+
* @param unit The unit to compare. Default is ``millisecond``.
|
|
851
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
|
|
846
852
|
*/
|
|
847
|
-
isBefore(other: ChronosInput, unit
|
|
853
|
+
isBefore(other: ChronosInput, unit?: TimeUnit, weekStartsOn?: Enumerate<7>): boolean;
|
|
848
854
|
/**
|
|
849
855
|
* @instance Checks if this date is after another date in a specific unit.
|
|
850
856
|
* @param other The other date to compare.
|
|
851
|
-
* @param unit The unit to compare.
|
|
852
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday).
|
|
857
|
+
* @param unit The unit to compare. Default is `'millisecond'`.
|
|
858
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
|
|
853
859
|
*/
|
|
854
|
-
isAfter(other: ChronosInput, unit
|
|
860
|
+
isAfter(other: ChronosInput, unit?: TimeUnit, weekStartsOn?: Enumerate<7>): boolean;
|
|
855
861
|
/**
|
|
856
862
|
* @instance Checks if this date is the same or before another date in a specific unit.
|
|
857
863
|
* @param other The other date to compare.
|
|
858
|
-
* @param unit The unit to compare.
|
|
859
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday).
|
|
864
|
+
* @param unit The unit to compare. Default is `'millisecond'`.
|
|
865
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
|
|
860
866
|
*/
|
|
861
|
-
isSameOrBefore(other: ChronosInput, unit
|
|
867
|
+
isSameOrBefore(other: ChronosInput, unit?: TimeUnit, weekStartsOn?: Enumerate<7>): boolean;
|
|
862
868
|
/**
|
|
863
869
|
* @instance Checks if this date is the same or after another date in a specific unit.
|
|
864
870
|
* @param other The other date to compare.
|
|
865
|
-
* @param unit The unit to compare.
|
|
866
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday).
|
|
871
|
+
* @param unit The unit to compare. Default is `'millisecond'`.
|
|
872
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
|
|
867
873
|
*/
|
|
868
|
-
isSameOrAfter(other: ChronosInput, unit
|
|
874
|
+
isSameOrAfter(other: ChronosInput, unit?: TimeUnit, weekStartsOn?: Enumerate<7>): boolean;
|
|
869
875
|
/**
|
|
870
876
|
* @instance Checks if the current date is between the given start and end dates.
|
|
871
877
|
*
|
|
@@ -890,33 +896,33 @@ declare class Chronos {
|
|
|
890
896
|
/** @instance Checks if current day is the last day of the current month. */
|
|
891
897
|
isLastDayOfMonth(): boolean;
|
|
892
898
|
/** @instance Returns a new `Chronos` instance set to the first day of the current month. */
|
|
893
|
-
firstDayOfMonth(): Chronos
|
|
899
|
+
firstDayOfMonth(): Chronos<Tz>;
|
|
894
900
|
/** @instance Returns a new `Chronos` instance set to the last day of the current month. */
|
|
895
|
-
lastDayOfMonth(): Chronos
|
|
901
|
+
lastDayOfMonth(): Chronos<Tz>;
|
|
896
902
|
/**
|
|
897
903
|
* @instance Returns a new `Chronos` instance at the start of a given unit.
|
|
898
904
|
* @param unit The unit to reset (e.g., year, month, day).
|
|
899
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday).
|
|
905
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
|
|
900
906
|
*/
|
|
901
|
-
startOf(unit: TimeUnit, weekStartsOn?: Enumerate<7>): Chronos
|
|
907
|
+
startOf(unit: TimeUnit, weekStartsOn?: Enumerate<7>): Chronos<Tz>;
|
|
902
908
|
/**
|
|
903
909
|
* @instance Returns a new `Chronos` instance at the end of a given unit.
|
|
904
910
|
* @param unit The unit to adjust (e.g., year, month, day).
|
|
905
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday).
|
|
911
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
|
|
906
912
|
*/
|
|
907
|
-
endOf(unit: TimeUnit, weekStartsOn?: Enumerate<7>): Chronos
|
|
913
|
+
endOf(unit: TimeUnit, weekStartsOn?: Enumerate<7>): Chronos<Tz>;
|
|
908
914
|
/**
|
|
909
915
|
* @instance Returns a new `Chronos` instance with the specified unit added.
|
|
910
916
|
* @param number The number of time unit to add (can be negative).
|
|
911
917
|
* @param unit The time unit to add.
|
|
912
918
|
*/
|
|
913
|
-
add(number: number, unit: TimeUnit): Chronos
|
|
919
|
+
add(number: number, unit: TimeUnit): Chronos<Tz>;
|
|
914
920
|
/**
|
|
915
921
|
* @instance Returns a new `Chronos` instance with the specified unit subtracted.
|
|
916
922
|
* @param number The number of time unit to subtract (can be negative).
|
|
917
923
|
* @param unit The time unit to add.
|
|
918
924
|
*/
|
|
919
|
-
subtract(number: number, unit: TimeUnit): Chronos
|
|
925
|
+
subtract(number: number, unit: TimeUnit): Chronos<Tz>;
|
|
920
926
|
/**
|
|
921
927
|
* @instance Gets the value of a specific time unit from the date.
|
|
922
928
|
* @param unit The unit to retrieve. Type of return value is determined by `unit`.
|
|
@@ -927,7 +933,7 @@ declare class Chronos {
|
|
|
927
933
|
* @param unit The unit to modify. Type of `value` is determined by `unit`.
|
|
928
934
|
* @param value The value to set for the unit. Type of `value` is determined by `unit`.
|
|
929
935
|
*/
|
|
930
|
-
set<Unit extends TimeUnit>(unit: Unit, value: TimeUnitValue<Unit>): Chronos
|
|
936
|
+
set<Unit extends TimeUnit>(unit: Unit, value: TimeUnitValue<Unit>): Chronos<Tz>;
|
|
931
937
|
/**
|
|
932
938
|
* @instance Returns the difference between current and another date in the given unit.
|
|
933
939
|
* @param other The other date to compare.
|
|
@@ -949,7 +955,7 @@ declare class Chronos {
|
|
|
949
955
|
* @param week The ISO week number (1–53) to set the date to.
|
|
950
956
|
* @returns A new `Chronos` instance set to the start (Monday) of the specified week.
|
|
951
957
|
*/
|
|
952
|
-
setWeek(week: NumberRange<1, 53>): Chronos
|
|
958
|
+
setWeek(week: NumberRange<1, 53>): Chronos<Tz>;
|
|
953
959
|
/**
|
|
954
960
|
* @instance Calculates the ISO 8601 week number of the year.
|
|
955
961
|
*
|
|
@@ -960,7 +966,7 @@ declare class Chronos {
|
|
|
960
966
|
getWeek(): NumberRange<1, 53>;
|
|
961
967
|
/**
|
|
962
968
|
* @instance Calculates the week number of the year based on custom week start.
|
|
963
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday).
|
|
969
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`. Applicable when {@link unit} is `'week'`.
|
|
964
970
|
* @returns Week number (1-53).
|
|
965
971
|
*/
|
|
966
972
|
getWeekOfYear(weekStartsOn?: Enumerate<7>): NumberRange<1, 53>;
|
|
@@ -1039,9 +1045,9 @@ declare class Chronos {
|
|
|
1039
1045
|
*/
|
|
1040
1046
|
getTimeZoneOffsetMinutes(): number;
|
|
1041
1047
|
/** @instance Returns new `Chronos` instance in UTC time */
|
|
1042
|
-
toUTC(): Chronos
|
|
1048
|
+
toUTC(): Chronos<'UTC'>;
|
|
1043
1049
|
/** @instance Returns new `Chronos` instance in local time */
|
|
1044
|
-
toLocal(): Chronos
|
|
1050
|
+
toLocal(): Chronos<'System'>;
|
|
1045
1051
|
/**
|
|
1046
1052
|
* @instance Returns the name of the current day or optional day index.
|
|
1047
1053
|
* @param index Optional day index (`0–6`, where `0` is `Sunday`) to override current day.
|
|
@@ -1137,7 +1143,7 @@ declare class Chronos {
|
|
|
1137
1143
|
* If omitted, the current system date/time is used.
|
|
1138
1144
|
* @returns A new `Chronos` instance representing the UTC equivalent of the input.
|
|
1139
1145
|
*/
|
|
1140
|
-
static utc(dateLike?: ChronosInput): Chronos
|
|
1146
|
+
static utc(dateLike?: ChronosInput): Chronos<'UTC'>;
|
|
1141
1147
|
/**
|
|
1142
1148
|
* @static Formats a time-only string into a formatted time string.
|
|
1143
1149
|
*
|
|
@@ -1180,7 +1186,7 @@ declare class Chronos {
|
|
|
1180
1186
|
* });
|
|
1181
1187
|
* //=> [ '2025-05-28T15:17:10.812Z', '2025-06-04T15:17:10.812Z' ]
|
|
1182
1188
|
*/
|
|
1183
|
-
static getDatesForDay(day: WeekDay, options?: RelativeRangeOptions):
|
|
1189
|
+
static getDatesForDay(day: WeekDay, options?: RelativeRangeOptions): ISODateTimeString<'utc' | 'local'>[];
|
|
1184
1190
|
/**
|
|
1185
1191
|
* @static Returns ISO date strings for each occurrence of a weekday between two fixed dates.
|
|
1186
1192
|
*
|
|
@@ -1202,7 +1208,7 @@ declare class Chronos {
|
|
|
1202
1208
|
* });
|
|
1203
1209
|
* //=> [ '2025-01-06T...', '2025-01-13T...', ... ]
|
|
1204
1210
|
*/
|
|
1205
|
-
static getDatesForDay(day: WeekDay, options?: DateRangeOptions):
|
|
1211
|
+
static getDatesForDay(day: WeekDay, options?: DateRangeOptions): ISODateTimeString<'utc' | 'local'>[];
|
|
1206
1212
|
/**
|
|
1207
1213
|
* @static Returns the earliest `Chronos` instance based on the underlying universal {@link timestamp}.
|
|
1208
1214
|
*
|
|
@@ -1215,7 +1221,7 @@ declare class Chronos {
|
|
|
1215
1221
|
* @param dates A list of Chronos-compatible inputs (`string`, `number`, `Date` or `Chronos`).
|
|
1216
1222
|
* @returns A new `Chronos` instance representing the earliest moment.
|
|
1217
1223
|
*/
|
|
1218
|
-
static min(...dates: ChronosInput[]): Chronos
|
|
1224
|
+
static min(...dates: ChronosInput[]): Chronos<ChronosTimeZone>;
|
|
1219
1225
|
/**
|
|
1220
1226
|
* @static Returns the latest `Chronos` instance based on the underlying universal {@link timestamp}.
|
|
1221
1227
|
*
|
|
@@ -1228,7 +1234,7 @@ declare class Chronos {
|
|
|
1228
1234
|
* @param dates A list of Chronos-compatible inputs (`string`, `number`, `Date` or `Chronos`).
|
|
1229
1235
|
* @returns A new `Chronos` instance representing the latest moment.
|
|
1230
1236
|
*/
|
|
1231
|
-
static max(...dates: ChronosInput[]): Chronos
|
|
1237
|
+
static max(...dates: ChronosInput[]): Chronos<ChronosTimeZone>;
|
|
1232
1238
|
/**
|
|
1233
1239
|
* @static Checks if the year in the date string or year (from 0 - 9999) is a leap year.
|
|
1234
1240
|
* - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
|
|
@@ -1267,7 +1273,7 @@ declare class Chronos {
|
|
|
1267
1273
|
* @param value - The value to test.
|
|
1268
1274
|
* @returns `true` if the value is an instance of `Chronos`, otherwise `false`.
|
|
1269
1275
|
*/
|
|
1270
|
-
static isValidChronos(value: unknown): value is Chronos
|
|
1276
|
+
static isValidChronos(value: unknown): value is Chronos<ChronosTimeZone>;
|
|
1271
1277
|
/**
|
|
1272
1278
|
* @static Checks if the given value has the necessary properties to be reconstructed into a `Chronos` instance.
|
|
1273
1279
|
* - Can be used for validating objects that may represent serialized `Chronos` data.
|
|
@@ -1284,7 +1290,7 @@ declare class Chronos {
|
|
|
1284
1290
|
* @returns A new `Chronos` instance created from the provided properties.
|
|
1285
1291
|
* @throws `TypeError` if the input value does not have the necessary properties for reconstruction.
|
|
1286
1292
|
*/
|
|
1287
|
-
static reconstruct(value: ChronosProperties): Chronos
|
|
1293
|
+
static reconstruct(value: ChronosProperties): Chronos<ChronosTimeZone>;
|
|
1288
1294
|
/**
|
|
1289
1295
|
* @static Injects a plugin into the `Chronos` system.
|
|
1290
1296
|
* @param plugin The plugin to inject.
|
|
@@ -1502,7 +1508,7 @@ interface ChronosStatics {
|
|
|
1502
1508
|
* If omitted, the current system date/time is used.
|
|
1503
1509
|
* @returns A new Chronos instance representing the UTC equivalent of the input.
|
|
1504
1510
|
*/
|
|
1505
|
-
utc(dateLike?: ChronosInput): Chronos
|
|
1511
|
+
utc(dateLike?: ChronosInput): Chronos<'UTC'>;
|
|
1506
1512
|
/**
|
|
1507
1513
|
* * Formats a time-only string into a formatted time string.
|
|
1508
1514
|
*
|
|
@@ -1541,7 +1547,7 @@ interface ChronosStatics {
|
|
|
1541
1547
|
* });
|
|
1542
1548
|
* //=> [ '2025-05-28T15:17:10.812Z', '2025-06-04T15:17:10.812Z' ]
|
|
1543
1549
|
*/
|
|
1544
|
-
getDatesForDay(day: WeekDay, options?: RelativeRangeOptions):
|
|
1550
|
+
getDatesForDay(day: WeekDay, options?: RelativeRangeOptions): ISODateTimeString<'utc' | 'local'>[];
|
|
1545
1551
|
/**
|
|
1546
1552
|
* * Returns ISO date strings for each occurrence of a weekday between two fixed dates.
|
|
1547
1553
|
*
|
|
@@ -1557,7 +1563,7 @@ interface ChronosStatics {
|
|
|
1557
1563
|
* });
|
|
1558
1564
|
* //=> [ '2025-01-06T...', '2025-01-13T...', ... ]
|
|
1559
1565
|
*/
|
|
1560
|
-
getDatesForDay(day: WeekDay, options?: DateRangeOptions):
|
|
1566
|
+
getDatesForDay(day: WeekDay, options?: DateRangeOptions): ISODateTimeString<'utc' | 'local'>[];
|
|
1561
1567
|
/**
|
|
1562
1568
|
* * Returns ISO date strings for each occurrence of a weekday.
|
|
1563
1569
|
*
|
|
@@ -1565,17 +1571,17 @@ interface ChronosStatics {
|
|
|
1565
1571
|
* @param options - Relative range (e.g., 7 days, 4 weeks) or Absolute date range and output format.
|
|
1566
1572
|
* @returns Array of ISO date strings in the specified format.
|
|
1567
1573
|
*/
|
|
1568
|
-
getDatesForDay(day: WeekDay, options?: WeekdayOptions):
|
|
1574
|
+
getDatesForDay(day: WeekDay, options?: WeekdayOptions): ISODateTimeString<'utc' | 'local'>[];
|
|
1569
1575
|
/**
|
|
1570
1576
|
* * Returns earliest Chronos
|
|
1571
1577
|
* @param dates Date inputs.
|
|
1572
1578
|
*/
|
|
1573
|
-
min(...dates: ChronosInput[]): Chronos
|
|
1579
|
+
min(...dates: ChronosInput[]): Chronos<ChronosTimeZone>;
|
|
1574
1580
|
/**
|
|
1575
1581
|
* * Returns latest Chronos
|
|
1576
1582
|
* @param dates Date inputs.
|
|
1577
1583
|
*/
|
|
1578
|
-
max(...dates: ChronosInput[]): Chronos
|
|
1584
|
+
max(...dates: ChronosInput[]): Chronos<ChronosTimeZone>;
|
|
1579
1585
|
/**
|
|
1580
1586
|
* * Checks if the year in the date string or year (from 0 - 9999) is a leap year.
|
|
1581
1587
|
* - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
|
|
@@ -1614,7 +1620,7 @@ interface ChronosStatics {
|
|
|
1614
1620
|
* @param value - The value to test.
|
|
1615
1621
|
* @returns `true` if the value is an instance of `Chronos`, otherwise `false`.
|
|
1616
1622
|
*/
|
|
1617
|
-
isValidChronos(value: unknown): value is Chronos
|
|
1623
|
+
isValidChronos(value: unknown): value is Chronos<ChronosTimeZone>;
|
|
1618
1624
|
/**
|
|
1619
1625
|
* * Checks if the given value has the necessary properties to be reconstructed into a `Chronos` instance.
|
|
1620
1626
|
* - Can be used for validating objects that may represent serialized `Chronos` data.
|
|
@@ -1631,7 +1637,7 @@ interface ChronosStatics {
|
|
|
1631
1637
|
* @returns A new `Chronos` instance created from the provided properties.
|
|
1632
1638
|
* @throws `TypeError` if the input value does not have the necessary properties for reconstruction.
|
|
1633
1639
|
*/
|
|
1634
|
-
reconstruct(value: ChronosProperties): Chronos
|
|
1640
|
+
reconstruct(value: ChronosProperties): Chronos<ChronosTimeZone>;
|
|
1635
1641
|
}
|
|
1636
1642
|
//#endregion
|
|
1637
1643
|
//#region src/types/date-time.d.ts
|
|
@@ -1824,6 +1830,15 @@ type LocaleCalendar = (typeof LOCALE_CALENDARS)[number];
|
|
|
1824
1830
|
type NumberingSystem = (typeof LOCALE_NUMBERING_SYSTEMS)[number];
|
|
1825
1831
|
//#endregion
|
|
1826
1832
|
//#region src/types/chronos-specific.d.ts
|
|
1833
|
+
/**
|
|
1834
|
+
* * Timezone identifier type for `Chronos`
|
|
1835
|
+
*
|
|
1836
|
+
* - {@link $TimeZoneIdentifier} — e.g., `"Asia/Dhaka"`.
|
|
1837
|
+
* - {@link TimeZone} — e.g., `[ 'Asia/Calcutta', 'Asia/Colombo' ]`, used when multiple timezones share the same UTC offset such as `"UTC+05:30"`.
|
|
1838
|
+
* - {@link UTCOffset} — e.g., `"UTC+06:45"` or `"UTC+02:15"`, returned when no named timezone corresponds to a given offset.
|
|
1839
|
+
* - `'System'` — The current system timezone.
|
|
1840
|
+
*/
|
|
1841
|
+
type ChronosTimeZone = TimeZoneIdentifier | TimeZone | UTCOffset | 'System';
|
|
1827
1842
|
/**
|
|
1828
1843
|
* * Options for `Chronos` _static_ method `with()`
|
|
1829
1844
|
*
|
|
@@ -1852,7 +1867,7 @@ interface ChronosInternals {
|
|
|
1852
1867
|
* @param tzTracker Optional tracker to identify the instance created by {@link https://toolbox.nazmul-nhb.dev/docs/classes/chronos/conversion#timezone timeZone} method.
|
|
1853
1868
|
* @returns The `Chronos` instance with the specified origin and other properties.
|
|
1854
1869
|
*/
|
|
1855
|
-
withOrigin(instance: Chronos, method: PluginMethods, offset?: UTCOffset, tzName?: LooseLiteral<TimeZoneName>, tzId?: TimeZoneId, tzTracker?: $TimeZoneIdentifier | TimeZone | UTCOffset): Chronos
|
|
1870
|
+
withOrigin<Tz extends ChronosTimeZone>(instance: Chronos, method: PluginMethods, offset?: UTCOffset, tzName?: LooseLiteral<TimeZoneName>, tzId?: TimeZoneId, tzTracker?: $TimeZoneIdentifier | TimeZone | UTCOffset): Chronos<Tz>;
|
|
1856
1871
|
/**
|
|
1857
1872
|
* * Access to `#toNewDate` private method
|
|
1858
1873
|
* * Creates a new `Date` object from a `Chronos` input
|
|
@@ -1874,7 +1889,7 @@ interface ChronosInternals {
|
|
|
1874
1889
|
*/
|
|
1875
1890
|
offset(instance: Chronos): UTCOffset;
|
|
1876
1891
|
/** * Ensures the input is a `Chronos` instance, creating one if necessary. */
|
|
1877
|
-
cast(date: ChronosInput): Chronos
|
|
1892
|
+
cast<Tz extends ChronosTimeZone>(date: ChronosInput): Chronos<Tz>;
|
|
1878
1893
|
}
|
|
1879
1894
|
/** @internal Helper type to assign instance origin when creating new `Chronos` instance. */
|
|
1880
1895
|
type WithoutOrigin = Omit<Chronos, '#ORIGIN' | 'origin'>;
|
|
@@ -2134,4 +2149,4 @@ interface DurationOptions {
|
|
|
2134
2149
|
showZero?: boolean;
|
|
2135
2150
|
}
|
|
2136
2151
|
//#endregion
|
|
2137
|
-
export {
|
|
2152
|
+
export { $UnitAnyCase as $, BanglaDateOptions as $t, ChronosObject as A, TimeZoneDetails as At, WeekdayOptions as B, ChronosStatics as Bt, $Chronos as C, Numeric as Cn, NumberingSystem as Ct, ChronosInput as D, RangeTuple as Dn, TimeUnitValue as Dt, $StaticMethods as E, LooseLiteral as En, TimeUnit as Et, DatesInRangeOptions as F, TimeZoneNameNative as Ft, $LocalArguments as G, $BanglaYear as Gt, $DateUnit as H, chronos as Ht, PluginMethods as I, TimestampOptions as It, $TimeUnitKey as J, $BnMonthPadded as Jt, $NativeTzNameOrId as K, $BnDatePadded as Kt, RangeWithDates as L, UTCMinute as Lt, ChronosTimeZone as M, TimeZoneIdNative as Mt, ChronosWithOptions as N, TimeZoneIdentifier as Nt, ChronosInternals as O, TimeWithUnit as Ot, DateRangeOptions as P, TimeZoneName as Pt, $UTCOffset as Q, BanglaDateObject as Qt, RelativeDateRange as R, UTCOffset as Rt, ZodiacSign as S, Maybe as Sn, NegativeUTCHour as St, $PluginMethods as T, NumberRange as Tn, Quarter as Tt, $GMTOffset as U, $BanglaMonth as Ut, WithoutOrigin as V, Chronos as Vt, $ISOTimeString as W, $BanglaMonthDate as Wt, $TimeUnitVarMap as X, BanglaDate as Xt, $TimeUnitVar as Y, $BnYearPadded as Yt, $TimeZoneIdentifier as Z, BanglaDateFormat as Zt, ZodiacArray as _, StrictFormat as _n, LocalesArguments as _t, BusinessOptionsWeekends as a, BnCalendarConfig as an, DateArgs as at, ZodiacOptions as b, TimeToken as bn, MonthName as bt, DayPart as c, DateFormatToken as cn, DateString as ct, DurationOptions as d, FormatToken as dn, FromNowUnit as dt, BanglaDayName as en, ChronosStaticKey as et, MonthBoundary as f, HourToken as fn, GreetingConfigs as ft, TimeDuration as g, SecondToken as gn, LocaleCalendar as gt, SeasonPreset as h, MonthToken as hn, ISODateTimeString as ht, BusinessOptionsBasic as i, BanglaYear as in, ClockTime as it, ChronosProperties as j, TimeZoneId as jt, ChronosMethods as k, TimeZone as kt, DayPartConfig as l, DateToken as ln, DateTimeFormatOptions as lt, SeasonOptions as m, MinuteToken as mn, ISODateFormat as mt, $BusinessHourOptions as n, BanglaMonthName as nn, ClockMinute as nt, ChronosPlugin as o, BnCalendarVariant as on, DateFormatOptions as ot, SeasonDefinition as p, MSToken as pn, HourMinutes as pt, $TZLabelKey as q, $BnEn as qt, AcademicYear as r, BanglaSeasonName as rn, ClockSecond as rt, DateBoundary as s, DateWithSeasonToken as sn, DateLike as st, $BusinessHourBaseOptions as t, BanglaMonth as tn, ClockHour as tt, DurationKey as u, DayToken as un, FormatOptions as ut, ZodiacMeta as v, TimeFormatToken as vn, Milliseconds as vt, $InstanceMethods as w, Enumerate as wn, PositiveUTCHour as wt, ZodiacPreset as x, YearToken as xn, MonthString as xt, ZodiacMetaOptions as y, TimeOnlyFormat as yn, MonthDateString as yt, RelativeRangeOptions as z, WeekDay as zt };
|
package/dist/types.d.cts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { $ as
|
|
18
|
-
export { $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, 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, SeasonDefinition, SeasonOptions, SeasonPreset, SecondToken, StrictFormat, 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 };
|
|
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 StrictFormat, _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 SecondToken, 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-CaZLuhLz.cjs";
|
|
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, SeasonDefinition, SeasonOptions, SeasonPreset, SecondToken, StrictFormat, 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
|
|
18
|
-
export { $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, 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, SeasonDefinition, SeasonOptions, SeasonPreset, SecondToken, StrictFormat, 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 };
|
|
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 StrictFormat, _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 SecondToken, 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-BwnEgU6z.mjs";
|
|
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, SeasonDefinition, SeasonOptions, SeasonPreset, SecondToken, StrictFormat, 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 };
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { i as isString, r as isNumber } from "./primitives-
|
|
17
|
+
import { i as isString, r as isNumber } from "./primitives-DpMa2dS2.mjs";
|
|
18
18
|
|
|
19
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
19
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/guards/specials.js
|
|
20
20
|
function isNumericString(value) {
|
|
21
21
|
return isString(value) && value?.trim() !== "" && Number.isFinite(Number(value));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
25
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/number/constants.js
|
|
26
26
|
const BN_DIGITS = /* @__PURE__ */ Object.freeze({
|
|
27
27
|
"০": 0,
|
|
28
28
|
"১": 1,
|
|
@@ -37,7 +37,7 @@ const BN_DIGITS = /* @__PURE__ */ Object.freeze({
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
40
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/number/utilities.js
|
|
41
41
|
const roundToNearest = (value, interval = 5) => {
|
|
42
42
|
return Math.round(Number(value) / interval) * interval;
|
|
43
43
|
};
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
const require_timezone = require('./timezone-BNnHFgki.cjs');
|
|
18
|
-
const require_primitives = require('./primitives-
|
|
19
|
-
const require_non_primitives = require('./non-primitives-
|
|
20
|
-
const require_utilities = require('./utilities-
|
|
18
|
+
const require_primitives = require('./primitives-DutXlR0D.cjs');
|
|
19
|
+
const require_non_primitives = require('./non-primitives-Dj558axv.cjs');
|
|
20
|
+
const require_utilities = require('./utilities-CkQA3Fkh.cjs');
|
|
21
21
|
const require_guards = require('./guards.cjs');
|
|
22
|
-
const require_helpers = require('./helpers-
|
|
22
|
+
const require_helpers = require('./helpers-D8yAKOsC.cjs');
|
|
23
23
|
|
|
24
24
|
//#region src/utils/utilities.ts
|
|
25
25
|
/**
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { n as NATIVE_TZ_IDS } from "./timezone-Db2CeL32.mjs";
|
|
18
|
-
import { a as isUndefined } from "./primitives-
|
|
19
|
-
import { r as isObject } from "./non-primitives-
|
|
20
|
-
import { n as normalizeNumber } from "./utilities-
|
|
18
|
+
import { a as isUndefined } from "./primitives-DpMa2dS2.mjs";
|
|
19
|
+
import { r as isObject } from "./non-primitives-B38XfU4A.mjs";
|
|
20
|
+
import { n as normalizeNumber } from "./utilities-BfGFB7aw.mjs";
|
|
21
21
|
import { isValidUTCOffset } from "./guards.mjs";
|
|
22
|
-
import { n as _dateArgsToDate, p as _resolveNativeTzName, r as _formatDate, s as _gmtToUtcOffset, u as _normalizeOffset } from "./helpers-
|
|
22
|
+
import { n as _dateArgsToDate, p as _resolveNativeTzName, r as _formatDate, s as _gmtToUtcOffset, u as _normalizeOffset } from "./helpers-eVQCueAC.mjs";
|
|
23
23
|
|
|
24
24
|
//#region src/utils/utilities.ts
|
|
25
25
|
/**
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const require_primitives = require('./primitives-
|
|
17
|
+
const require_primitives = require('./primitives-DutXlR0D.cjs');
|
|
18
18
|
|
|
19
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
19
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/guards/specials.js
|
|
20
20
|
function isNumericString(value) {
|
|
21
21
|
return require_primitives.isString(value) && value?.trim() !== "" && Number.isFinite(Number(value));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
25
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/number/constants.js
|
|
26
26
|
const BN_DIGITS = /* @__PURE__ */ Object.freeze({
|
|
27
27
|
"০": 0,
|
|
28
28
|
"১": 1,
|
|
@@ -37,7 +37,7 @@ const BN_DIGITS = /* @__PURE__ */ Object.freeze({
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.
|
|
40
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.10/node_modules/nhb-toolbox/dist/esm/number/utilities.js
|
|
41
41
|
const roundToNearest = (value, interval = 5) => {
|
|
42
42
|
return Math.round(Number(value) / interval) * interval;
|
|
43
43
|
};
|
package/dist/utils.cjs
CHANGED
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
18
18
|
const require_basic = require('./basic-DsQqC5nZ.cjs');
|
|
19
|
-
const require_primitives = require('./primitives-
|
|
20
|
-
const require_utilities = require('./utilities-
|
|
19
|
+
const require_primitives = require('./primitives-DutXlR0D.cjs');
|
|
20
|
+
const require_utilities = require('./utilities-CkQA3Fkh.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-CZTvwfjY.cjs');
|
|
23
|
+
const require_greet = require('./greet-ok0_Wai_.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 {
|
|
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, _n as StrictFormat, at as DateArgs, ft as GreetingConfigs, ht as ISODateTimeString, it as ClockTime, mt as ISODateFormat, ot as DateFormatOptions, pt as HourMinutes, yn as TimeOnlyFormat } from "./types-CaZLuhLz.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/utils/greet.d.ts
|
|
20
20
|
/**
|