nhb-toolbox 3.5.1 → 3.5.20

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.
@@ -1,4 +1,4 @@
1
- import type { TimeZone, UTCOffSet } from './types';
1
+ import type { FormatOptions, TimeZone, UTCOffSet } from './types';
2
2
  export declare class Chronos {
3
3
  #private;
4
4
  /**
@@ -35,19 +35,19 @@ export declare class Chronos {
35
35
  /** * Returns the time value in milliseconds since midnight, January 1, 1970 UTC. */
36
36
  get unix(): number;
37
37
  /**
38
- * @instance Returns the current date and time in a specified format.
39
- *
40
- * @param format - The desired format (Default format is `DD-MM-YYYY HH:mm:ss:mss` = `30-06-1995 15:55:58:775`).
38
+ * @instance Returns the current date and time in a specified format in local time.
39
+ * * Default format is dd, `MMM DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55:379`
40
+ * @param options - Configure format string and whether to format using utc offset.
41
41
  * @returns Formatted date string in desired format.
42
42
  */
43
- today(format?: string): string;
43
+ today(options?: FormatOptions): string;
44
44
  /**
45
- * @static Returns the current date and time in a specified format.
46
- *
47
- * @param format - The desired format (Default format is `DD-MM-YYYY HH:mm:ss:mss` = `30-06-1995 15:55:58:775`).
45
+ * @static Returns the current date and time in a specified format in local time.
46
+ * * Default format is dd, `MMM DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55:379`
47
+ * @param options - Configure format string and whether to format using utc offset.
48
48
  * @returns Formatted date string in desired format.
49
49
  */
50
- static today(format?: string): string;
50
+ static today(options?: FormatOptions): string;
51
51
  /**
52
52
  * * Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC).
53
53
  * * It basically calls `Date.now()`.
@@ -57,14 +57,15 @@ export declare class Chronos {
57
57
  /**
58
58
  * * Formats the date into a custom string format (local time).
59
59
  *
60
- * @param format - The desired format (Default format is `DD-MM-YYYY` = `30-06-1995`).
61
- * @returns Formatted date string in desired format (local time).
60
+ * @param format - The desired format (Default format is `dd, MMM DD, YYYY HH:mm:ss:mss` = `Sun, Apr 06, 2025 16:11:55:379`).
61
+ * @param useUTC - Optional `useUTC` to get the formatted time using UTC Offset, defaults to `false`.
62
+ * @returns Formatted date string in desired format (in local time unless `useUTC` passed as `true`).
62
63
  */
63
- format(format?: string): string;
64
+ format(format?: string, useUTC?: boolean): string;
64
65
  /**
65
66
  * * Formats the date into a custom string format (UTC time).
66
67
  *
67
- * @param format - The desired format (Default format is `DD-MM-YYYY` = `30-06-1995`).
68
+ * @param format - The desired format (Default format is `dd, MMM DD, YYYY HH:mm:ss:mss` = `Sun, Apr 06, 2025 16:11:55:379`).
68
69
  * @returns Formatted date string in desired format (UTC time).
69
70
  */
70
71
  formatUTC(format?: string): string;
@@ -100,7 +101,7 @@ export declare class Chronos {
100
101
  /**
101
102
  * * Create a new instance of `Chronos` in the specified timezone.
102
103
  *
103
- * @param zone - Standard timezone abbreviation (e.g., 'IST', 'UTC', 'EST') or UTC Offset in in `UTC-01:30` format.
104
+ * @param zone - Standard timezone abbreviation (e.g., 'IST', 'UTC', 'EST') or UTC Offset in `UTC-01:30` format.
104
105
  * @returns A new instance of `Chronos` with time in the given timezone. Invalid input sets time-zone to `UTC`.
105
106
  */
106
107
  timeZone(zone: TimeZone | UTCOffSet): Chronos;
@@ -1 +1 @@
1
- {"version":3,"file":"Chronos.d.ts","sourceRoot":"","sources":["../../src/date/Chronos.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGlE,qBAAa,OAAO;;IAInB;;;;;;;;OAQG;gBACS,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO;IAepD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IAED;;;;OAIG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAKn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AM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IAED;;;;OAIG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAKnD,4EAA4E;IAC5E,MAAM,IAAI,MAAM;IAIhB,6EAA6E;IAC7E,OAAO,IAAI,MAAM;IAIjB,qDAAqD;IACrD,MAAM,IAAI,IAAI;IAId,mGAAmG;IACnG,QAAQ,IAAI,MAAM;IAIlB,wDAAwD;IACxD,WAAW,IAAI,MAAM;IAIrB,oFAAoF;IACpF,YAAY,IAAI,MAAM;IAItB,mDAAmD;IACnD,IAAI,IAAI,IAAI,IAAI,CAEf;IAED,oFAAoF;IACpF,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;IAOtC;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;IAO7C;;;;OAIG;IACH,MAAM,CAAC,GAAG,IAAI,MAAM;IA2FpB;;;;;;OAMG;IACH,MAAM,CACL,MAAM,GAAE,MAAwC,EAChD,MAAM,UAAQ,GACZ,MAAM;IAIT;;;;;OAKG;IACH,SAAS,CAAC,MAAM,GAAE,MAAwC,GAAG,MAAM;IAInE;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAM9B;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAInC;;;;;;;;OAQG;IACH,cAAc,IAAI,MAAM;IAexB;;;;;OAKG;IACH,UAAU,IAAI,OAAO;IAMrB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO;CAgB7C"}
@@ -70,24 +70,26 @@ export class Chronos {
70
70
  return this.#date.getTime();
71
71
  }
72
72
  /**
73
- * @instance Returns the current date and time in a specified format.
74
- *
75
- * @param format - The desired format (Default format is `DD-MM-YYYY HH:mm:ss:mss` = `30-06-1995 15:55:58:775`).
73
+ * @instance Returns the current date and time in a specified format in local time.
74
+ * * Default format is dd, `MMM DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55:379`
75
+ * @param options - Configure format string and whether to format using utc offset.
76
76
  * @returns Formatted date string in desired format.
77
77
  */
78
- today(format = 'DD-MM-YYYY HH:mm:ss:mss') {
78
+ today(options) {
79
+ const { format = 'dd, MMM DD, YYYY HH:mm:ss', useUTC = false } = options || {};
79
80
  const today = new Date();
80
- return new Chronos(today).format(format);
81
+ return new Chronos(today).#format(format, useUTC);
81
82
  }
82
83
  /**
83
- * @static Returns the current date and time in a specified format.
84
- *
85
- * @param format - The desired format (Default format is `DD-MM-YYYY HH:mm:ss:mss` = `30-06-1995 15:55:58:775`).
84
+ * @static Returns the current date and time in a specified format in local time.
85
+ * * Default format is dd, `MMM DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55:379`
86
+ * @param options - Configure format string and whether to format using utc offset.
86
87
  * @returns Formatted date string in desired format.
87
88
  */
88
- static today(format = 'DD-MM-YYYY HH:mm:ss:mss') {
89
+ static today(options) {
90
+ const { format = 'dd, MMM DD, YYYY HH:mm:ss', useUTC = false } = options || {};
89
91
  const today = new Date();
90
- return new Chronos(today).format(format);
92
+ return new Chronos(today).#format(format, useUTC);
91
93
  }
92
94
  /**
93
95
  * * Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC).
@@ -129,7 +131,6 @@ export class Chronos {
129
131
  d: DAYS[day].slice(0, 3),
130
132
  dd: DAYS[day].slice(0, 3),
131
133
  ddd: DAYS[day],
132
- dddd: DAYS[day],
133
134
  D: String(date),
134
135
  DD: String(date).padStart(2, '0'),
135
136
  H: String(hours),
@@ -174,19 +175,20 @@ export class Chronos {
174
175
  /**
175
176
  * * Formats the date into a custom string format (local time).
176
177
  *
177
- * @param format - The desired format (Default format is `DD-MM-YYYY` = `30-06-1995`).
178
- * @returns Formatted date string in desired format (local time).
178
+ * @param format - The desired format (Default format is `dd, MMM DD, YYYY HH:mm:ss:mss` = `Sun, Apr 06, 2025 16:11:55:379`).
179
+ * @param useUTC - Optional `useUTC` to get the formatted time using UTC Offset, defaults to `false`.
180
+ * @returns Formatted date string in desired format (in local time unless `useUTC` passed as `true`).
179
181
  */
180
- format(format = 'DD-MM-YYYY') {
181
- return this.#format(format, false);
182
+ format(format = 'dd, MMM DD, YYYY HH:mm:ss:mss', useUTC = false) {
183
+ return this.#format(format, useUTC);
182
184
  }
183
185
  /**
184
186
  * * Formats the date into a custom string format (UTC time).
185
187
  *
186
- * @param format - The desired format (Default format is `DD-MM-YYYY` = `30-06-1995`).
188
+ * @param format - The desired format (Default format is `dd, MMM DD, YYYY HH:mm:ss:mss` = `Sun, Apr 06, 2025 16:11:55:379`).
187
189
  * @returns Formatted date string in desired format (UTC time).
188
190
  */
189
- formatUTC(format = 'DD-MM-YYYY') {
191
+ formatUTC(format = 'dd, MMM DD, YYYY HH:mm:ss:mss') {
190
192
  return this.#format(format, true);
191
193
  }
192
194
  /**
@@ -240,7 +242,7 @@ export class Chronos {
240
242
  /**
241
243
  * * Create a new instance of `Chronos` in the specified timezone.
242
244
  *
243
- * @param zone - Standard timezone abbreviation (e.g., 'IST', 'UTC', 'EST') or UTC Offset in in `UTC-01:30` format.
245
+ * @param zone - Standard timezone abbreviation (e.g., 'IST', 'UTC', 'EST') or UTC Offset in `UTC-01:30` format.
244
246
  * @returns A new instance of `Chronos` with time in the given timezone. Invalid input sets time-zone to `UTC`.
245
247
  */
246
248
  timeZone(zone) {
@@ -249,7 +251,7 @@ export class Chronos {
249
251
  offset = extractMinutesFromUTC(zone);
250
252
  }
251
253
  else {
252
- offset = TIME_ZONES[zone] ?? 0;
254
+ offset = TIME_ZONES[zone] ?? TIME_ZONES['UTC'];
253
255
  }
254
256
  const utc = this.#date.getTime() + this.#date.getTimezoneOffset() * 60 * 1000;
255
257
  const adjusted = new Date(utc + offset * 60 * 1000);
@@ -3,140 +3,289 @@ export declare const MONTHS: readonly ["January", "February", "March", "April",
3
3
  export declare const YEAR_FORMATS: readonly ["YYYY", "YY", "yyyy", "yy"];
4
4
  export declare const MONTH_FORMATS: readonly ["M", "MM", "MMM", "MMMM", "mmm", "mmmm"];
5
5
  export declare const DATE_FORMATS: readonly ["DD", "D"];
6
- export declare const DAY_FORMATS: readonly ["d", "dd", "ddd", "dddd"];
6
+ export declare const DAY_FORMATS: readonly ["d", "dd", "ddd"];
7
7
  export declare const HOUR_FORMATS: readonly ["H", "HH", "hh", "h"];
8
8
  export declare const MINUTE_FORMATS: readonly ["mm", "m"];
9
9
  export declare const SECOND_FORMATS: readonly ["ss", "s"];
10
10
  export declare const MILLISECOND_FORMATS: readonly ["ms", "mss"];
11
11
  export declare const TIME_FORMATS: readonly ["a", "A"];
12
- export declare const sortedFormats: ("a" | "M" | "D" | "A" | "YYYY" | "YY" | "yyyy" | "yy" | "MM" | "MMM" | "MMMM" | "mmm" | "mmmm" | "DD" | "d" | "dd" | "ddd" | "dddd" | "H" | "HH" | "hh" | "h" | "mm" | "m" | "ss" | "s" | "ms" | "mss")[];
12
+ export declare const sortedFormats: ("a" | "M" | "D" | "A" | "YYYY" | "YY" | "yyyy" | "yy" | "MM" | "MMM" | "MMMM" | "mmm" | "mmmm" | "DD" | "d" | "dd" | "ddd" | "H" | "HH" | "hh" | "h" | "mm" | "m" | "ss" | "s" | "ms" | "mss")[];
13
13
  export declare const TIME_ZONES: {
14
- readonly UTC: 0;
15
- readonly GMT: 0;
16
- readonly EST: number;
17
- readonly EDT: number;
18
- readonly CST: number;
19
- readonly CDT: number;
14
+ /** International Date Line West (Baker Island, Howland Island) */
15
+ readonly IDLW: number;
16
+ /** Baker Island Time (Uninhabited) */
17
+ readonly BIT: number;
18
+ /** Samoa Standard Time (American Samoa, Midway) */
19
+ readonly SST: number;
20
+ /** Niue Time */
21
+ readonly NUT: number;
22
+ /** Hawaii-Aleutian Standard Time (USA-Hawaii) */
23
+ readonly HST: number;
24
+ /** Cook Island Time */
25
+ readonly CKT: number;
26
+ /** Tahiti Time (French Polynesia) */
27
+ readonly TAHT: number;
28
+ /** Alaska Standard Time (USA-Alaska) */
29
+ readonly AKST: number;
30
+ /** Gambier Time (French Polynesia) */
31
+ readonly GAMT: number;
32
+ /** Paraguay Time (Summer UTC-3) */
33
+ readonly PYT: number;
34
+ /** Marquesas Islands Time (UTC−09:30) */
35
+ readonly MART: number;
36
+ /** Hawaii-Aleutian Daylight Time (USA-Hawaii, DST) */
37
+ readonly HDT: number;
38
+ /** Pacific Standard Time (USA-West Coast, Canada) */
39
+ readonly PST: number;
40
+ /** Alaska Daylight Time (USA-Alaska, DST) */
41
+ readonly AKDT: number;
42
+ /** Mountain Standard Time (USA/Canada Rockies) */
20
43
  readonly MST: number;
44
+ /** Mountain Daylight Time (USA/Canada Rockies, DST) */
21
45
  readonly MDT: number;
22
- readonly PST: number;
46
+ /** Pacific Daylight Time (USA-West Coast, Canada, DST) */
23
47
  readonly PDT: number;
24
- readonly AKST: number;
25
- readonly AKDT: number;
26
- readonly HST: number;
27
- readonly HDT: number;
28
- readonly ART: number;
29
- readonly BRST: number;
30
- readonly BRT: number;
48
+ /** Central Standard Time (USA/Canada Central) */
49
+ readonly CST: number;
50
+ /** Central Daylight Time (USA/Canada Central, DST) */
51
+ readonly CDT: number;
52
+ /** Easter Island Time (Chile) */
53
+ readonly EAST: number;
54
+ /** Eastern Standard Time (USA/Canada East Coast) */
55
+ readonly EST: number;
56
+ /** Eastern Daylight Time (USA/Canada East Coast, DST) */
57
+ readonly EDT: number;
58
+ /** Peru Time */
59
+ readonly PET: number;
60
+ /** Colombia Time */
61
+ readonly COT: number;
62
+ /** Acre Time (Brazil-West) */
63
+ readonly ACT: number;
64
+ /** Atlantic Standard Time (Canada-Maritime, Caribbean) */
65
+ readonly AST: number;
66
+ /** Bolivia Time */
67
+ readonly BOT: number;
68
+ /** Venezuelan Standard Time */
69
+ readonly VET: number;
70
+ /** Guyana Time */
71
+ readonly GYT: number;
72
+ /** Chile Standard Time */
31
73
  readonly CLT: number;
74
+ /** Atlantic Daylight Time (Canada-Maritime, DST) */
75
+ readonly ADT: number;
76
+ /** Brasília Time (Brazil-East) */
77
+ readonly BRT: number;
78
+ /** Argentina Time */
79
+ readonly ART: number;
80
+ /** Uruguay Time */
81
+ readonly UYT: number;
82
+ /** Falkland Islands Summer Time */
83
+ readonly FKST: number;
84
+ /** Saint Pierre and Miquelon Standard Time */
85
+ readonly PMST: number;
86
+ /** Chile Summer Time (DST) */
32
87
  readonly CLST: number;
88
+ /** French Guiana Time */
33
89
  readonly GFT: number;
34
- readonly UYT: number;
35
- readonly CET: number;
36
- readonly CEST: number;
37
- readonly EET: number;
38
- readonly EEST: number;
90
+ /** Newfoundland Standard Time */
91
+ readonly NST: number;
92
+ /** Newfoundland Daylight Time (DST) */
93
+ readonly NDT: number;
94
+ /** Fernando de Noronha Time (Brazil) */
95
+ readonly FNT: number;
96
+ /** South Georgia Time */
97
+ readonly 'GST-South Georgia': number;
98
+ /** Brazil Summer Time (DST) */
99
+ readonly BRST: number;
100
+ /** Azores Time (Portugal) */
101
+ readonly AZOT: number;
102
+ /** Cape Verde Time */
103
+ readonly CVT: number;
104
+ /** Greenwich Mean Time (UK, Iceland, West Africa) */
105
+ readonly GMT: 0;
106
+ /** Coordinated Universal Time */
107
+ readonly UTC: 0;
108
+ /** Western European Time (Portugal, Morocco) */
39
109
  readonly WET: 0;
40
- readonly WEST: number;
110
+ /** Eastern Greenland Summer Time */
111
+ readonly EGST: 0;
112
+ /** Central European Time (France, Germany, Italy) */
113
+ readonly CET: number;
114
+ /** West Africa Time (Nigeria, Algeria) */
115
+ readonly WAT: number;
116
+ /** Middle European Time (Historical) */
41
117
  readonly MET: number;
118
+ /** Western European Summer Time (Summer UTC+1) */
119
+ readonly WEST: number;
120
+ /** British Summer Time (UK DST) */
121
+ readonly 'BST-UK': number;
122
+ /** Central European Summer Time (DST) */
123
+ readonly CEST: number;
124
+ /** Middle European Summer Time (DST) */
42
125
  readonly MEST: number;
43
- readonly WAT: number;
126
+ /** Eastern European Time (Greece, Finland, Egypt) */
127
+ readonly EET: number;
128
+ /** Central Africa Time (Sudan, South Africa) */
44
129
  readonly CAT: number;
130
+ /** South Africa Standard Time */
131
+ readonly SAST: number;
132
+ /** Israel Standard Time */
133
+ readonly 'IST-ISRAEL': number;
134
+ /** Israel Daylight Time (DST) */
135
+ readonly 'IST-IL': number;
136
+ /** Eastern European Summer Time */
137
+ readonly EEST: number;
138
+ /** Moscow Time (Russia-West) */
139
+ readonly MSK: number;
140
+ /** Syowa Time (Antarctica) */
141
+ readonly SYOT: number;
142
+ /** Arabia Standard Time (Iraq, Saudi Arabia) */
143
+ readonly 'AST-ARAB': number;
144
+ /** East Africa Time (Kenya, Ethiopia) */
45
145
  readonly EAT: number;
46
- readonly IST: number;
146
+ /** Iran Standard Time */
147
+ readonly IRST: number;
148
+ /** Iran Daylight Time (DST) */
149
+ readonly IRDT: number;
150
+ /** Armenia Time */
151
+ readonly AMT: number;
152
+ /** Georgia Time */
153
+ readonly GET: number;
154
+ /** Azerbaijan Time */
155
+ readonly AZT: number;
156
+ /** Mauritius Time */
157
+ readonly MUT: number;
158
+ /** Seychelles Time */
159
+ readonly SCT: number;
160
+ /** Gulf Standard Time (UAE, Oman) */
161
+ readonly 'GST-GULF': number;
162
+ /** Samara Time (Russia) */
163
+ readonly SAMT: number;
164
+ /** Pakistan Standard Time */
47
165
  readonly PKT: number;
48
- readonly BST: number;
166
+ /** Tajikistan Time */
167
+ readonly TJT: number;
168
+ /** Turkmenistan Time */
169
+ readonly TMT: number;
170
+ /** Uzbekistan Time */
171
+ readonly UZT: number;
172
+ /** Aqtobe Time (Kazakhstan) */
173
+ readonly AQTT: number;
174
+ /** Yekaterinburg Time (Russia) */
175
+ readonly YEKT: number;
176
+ /** Yekaterinburg Summer Time (Russia, DST) */
177
+ readonly YEKST: number;
178
+ /** India Standard Time */
179
+ readonly 'IST-IN': number;
180
+ /** Nepal Time (UTC+05:45) */
49
181
  readonly NPT: number;
50
- readonly MYT: number;
51
- readonly THA: number;
182
+ /** Nepal Time (alternative) */
183
+ readonly 'NPT-NEPAL': number;
184
+ /** Bangladesh Time */
185
+ readonly BDT: number;
186
+ /** Bangladesh Standard Time */
187
+ readonly 'BST-BD': number;
188
+ /** Bhutan Time */
189
+ readonly BTT: number;
190
+ /** Almaty Time (Kazakhstan) */
191
+ readonly ALMT: number;
192
+ /** Omsk Time (Russia) */
193
+ readonly OMST: number;
194
+ /** Myanmar Time */
195
+ readonly MMT: number;
196
+ /** Cocos Islands Time */
197
+ readonly CCT: number;
198
+ /** Indochina Time (Thailand, Vietnam) */
52
199
  readonly ICT: number;
200
+ /** Thailand Standard Time */
201
+ readonly THA: number;
202
+ /** Krasnoyarsk Time (Russia) */
203
+ readonly KRAT: number;
204
+ /** Western Indonesia Time (Jakarta) */
53
205
  readonly WIB: number;
54
- readonly WITA: number;
55
- readonly WIT: number;
206
+ /** Hong Kong Time */
207
+ readonly HKT: number;
208
+ /** China Standard Time */
209
+ readonly 'CST-CHINA': number;
210
+ /** Singapore Time */
56
211
  readonly SGT: number;
57
- readonly CST_CHINA: number;
212
+ /** Malaysia Time */
213
+ readonly MYT: number;
214
+ /** Philippines Time */
215
+ readonly PHT: number;
216
+ /** Irkutsk Time (Russia) */
217
+ readonly IRKT: number;
218
+ /** Irkutsk Daylight Time (Russia, DST) */
219
+ readonly 'IRKT-DST': number;
220
+ /** Irkutsk Time (Russia, alternative) */
221
+ readonly 'IRKT-RU': number;
222
+ /** Australian Western Standard Time */
223
+ readonly AWST: number;
224
+ /** Australian Central Western Standard Time (Eucla, UTC+08:45) */
225
+ readonly ACWST: number;
226
+ /** Western Indonesia Time (Bali) */
227
+ readonly WITA: number;
228
+ /** Japan Standard Time */
58
229
  readonly JST: number;
230
+ /** Korea Standard Time */
59
231
  readonly KST: number;
60
- readonly IRKT: number;
61
- readonly IRKT_DST: number;
62
- readonly AEST: number;
63
- readonly AEDT: number;
232
+ /** Palau Time */
233
+ readonly PWT: number;
234
+ /** Yakutsk Time (Russia) */
235
+ readonly YAKT: number;
236
+ /** Eastern Indonesia Time (Jayapura) */
237
+ readonly WIT: number;
238
+ /** Australian Central Standard Time */
64
239
  readonly ACST: number;
240
+ /** Australian Central Daylight Time (DST) */
65
241
  readonly ACDT: number;
66
- readonly AWST: number;
242
+ /** Australian Eastern Standard Time */
243
+ readonly AEST: number;
244
+ /** Australian Eastern Daylight Time (DST) */
245
+ readonly AEDT: number;
246
+ /** Vladivostok Time (Russia) */
247
+ readonly VLAT: number;
248
+ /** Lord Howe Standard Time (UTC+10:30) */
249
+ readonly LHST: number;
250
+ /** Lord Howe Daylight Time (DST +30min) */
251
+ readonly LHDT: number;
252
+ /** Sakhalin Time (Russia) */
253
+ readonly SAKT: number;
254
+ /** Magadan Time (Russia) */
255
+ readonly MAGT: number;
256
+ /** Norfolk Time (Australia) */
257
+ readonly NFT: number;
258
+ /** Chamorro Standard Time (Guam, Northern Mariana Islands) */
259
+ readonly CHST: number;
260
+ /** New Zealand Standard Time */
67
261
  readonly NZST: number;
262
+ /** New Zealand Daylight Time (DST) */
68
263
  readonly NZDT: number;
264
+ /** Fiji Time */
265
+ readonly FJT: number;
266
+ /** Tuvalu Time */
267
+ readonly TVT: number;
268
+ /** Chatham Standard Time (New Zealand) */
69
269
  readonly CHAST: number;
270
+ /** Chatham Daylight Time (New Zealand, DST) */
70
271
  readonly CHADT: number;
71
- readonly MSK: number;
72
- readonly SAMT: number;
73
- readonly YEKST: number;
74
- readonly OMST: number;
75
- readonly KRAT: number;
76
- readonly IRKT_RU: number;
77
- readonly YAKT: number;
78
- readonly VLAT: number;
79
- readonly MAGT: number;
80
- readonly PETT: number;
81
- readonly IRST: number;
82
- readonly IRDT: number;
83
- readonly GST: number;
272
+ /** Chatham Standard Time (alternative) */
273
+ readonly 'CHAST-NZ': number;
274
+ /** Phoenix Island Time (Kiribati) */
275
+ readonly PHOT: number;
276
+ /** Tokelau Time */
277
+ readonly TKT: number;
278
+ /** Tonga Time */
279
+ readonly TOT: number;
280
+ /** New Zealand Antarctica Time */
281
+ readonly NZAT: number;
282
+ /** Line Islands Time (Kiribati) */
283
+ readonly LINT: number;
284
+ /** Rothera Time (Antarctica) */
84
285
  readonly ROTT: number;
286
+ /** Mawson Time (Antarctica) */
85
287
  readonly MAWT: number;
86
- readonly NZAT: number;
87
- readonly AST: number;
88
- readonly ADT: number;
89
- readonly NST: number;
90
- readonly NDT: number;
91
- readonly SST: number;
92
- readonly CHST: number;
93
- readonly MART: number;
94
- readonly CHAST_NZ: number;
95
- readonly LHST: number;
96
- readonly LHDT: number;
97
- readonly ACWST: number;
98
- readonly NPT_NEPAL: number;
99
- readonly UTC_MINUS_12: number;
100
- readonly UTC_MINUS_11: number;
101
- readonly UTC_MINUS_10: number;
102
- readonly UTC_MINUS_9: number;
103
- readonly UTC_MINUS_8: number;
104
- readonly UTC_MINUS_7: number;
105
- readonly UTC_MINUS_6: number;
106
- readonly UTC_MINUS_5: number;
107
- readonly UTC_MINUS_4: number;
108
- readonly UTC_MINUS_3: number;
109
- readonly UTC_MINUS_2: number;
110
- readonly UTC_MINUS_1: number;
111
- readonly UTC_PLUS_0: 0;
112
- readonly UTC_PLUS_1: number;
113
- readonly UTC_PLUS_2: number;
114
- readonly UTC_PLUS_3: number;
115
- readonly UTC_PLUS_3_30: number;
116
- readonly UTC_PLUS_4: number;
117
- readonly UTC_PLUS_4_30: number;
118
- readonly UTC_PLUS_5: number;
119
- readonly UTC_PLUS_5_30: number;
120
- readonly UTC_PLUS_5_45: number;
121
- readonly UTC_PLUS_6: number;
122
- readonly UTC_PLUS_6_30: number;
123
- readonly UTC_PLUS_7: number;
124
- readonly UTC_PLUS_8: number;
125
- readonly UTC_PLUS_8_45: number;
126
- readonly UTC_PLUS_9: number;
127
- readonly UTC_PLUS_9_30: number;
128
- readonly UTC_PLUS_10: number;
129
- readonly UTC_PLUS_10_30: number;
130
- readonly UTC_PLUS_11: number;
131
- readonly UTC_PLUS_12: number;
132
- readonly UTC_PLUS_12_45: number;
133
- readonly UTC_PLUS_13: number;
134
- readonly UTC_PLUS_14: number;
135
- readonly BST_UK: 60;
136
- readonly BST_BD: 360;
137
- readonly IST_IN: 330;
138
- readonly IST_IL: 120;
139
- readonly CST_US: -360;
140
- readonly CST_CN: 480;
288
+ /** Petropavlovsk-Kamchatsky Time (Russia) */
289
+ readonly PETT: number;
141
290
  };
142
291
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/date/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,yFAQP,CAAC;AAEX,eAAO,MAAM,MAAM,qIAaT,CAAC;AAEX,eAAO,MAAM,YAAY,uCAAwC,CAAC;AAClE,eAAO,MAAM,aAAa,oDAAqD,CAAC;AAChF,eAAO,MAAM,YAAY,sBAAuB,CAAC;AACjD,eAAO,MAAM,WAAW,qCAAsC,CAAC;AAC/D,eAAO,MAAM,YAAY,iCAAkC,CAAC;AAC5D,eAAO,MAAM,cAAc,sBAAuB,CAAC;AACnD,eAAO,MAAM,cAAc,sBAAuB,CAAC;AACnD,eAAO,MAAM,mBAAmB,wBAAyB,CAAC;AAC1D,eAAO,MAAM,YAAY,qBAAsB,CAAC;AAEhD,eAAO,MAAM,aAAa,4MAUW,CAAC;AAEtC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyJb,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/date/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,yFAQP,CAAC;AAEX,eAAO,MAAM,MAA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,8DAA8D;;IAE9D,gCAAgC;;IAEhC,sCAAsC;;IAEtC,gBAAgB;;IAEhB,kBAAkB;;IAElB,0CAA0C;;IAE1C,+CAA+C;;IAE/C,0CAA0C;;IAE1C,qCAAqC;;IAErC,mBAAmB;;IAEnB,iBAAiB;;IAEjB,kCAAkC;;IAElC,mCAAmC;;IAInC,gCAAgC;;IAEhC,+BAA+B;;IAE/B,6CAA6C;;CAEpC,CAAC"}
@@ -24,7 +24,7 @@ export const MONTHS = [
24
24
  export const YEAR_FORMATS = ['YYYY', 'YY', 'yyyy', 'yy'];
25
25
  export const MONTH_FORMATS = ['M', 'MM', 'MMM', 'MMMM', 'mmm', 'mmmm'];
26
26
  export const DATE_FORMATS = ['DD', 'D'];
27
- export const DAY_FORMATS = ['d', 'dd', 'ddd', 'dddd'];
27
+ export const DAY_FORMATS = ['d', 'dd', 'ddd'];
28
28
  export const HOUR_FORMATS = ['H', 'HH', 'hh', 'h'];
29
29
  export const MINUTE_FORMATS = ['mm', 'm'];
30
30
  export const SECOND_FORMATS = ['ss', 's'];
@@ -42,143 +42,286 @@ export const sortedFormats = [
42
42
  ...TIME_FORMATS,
43
43
  ].sort((a, b) => b.length - a.length);
44
44
  export const TIME_ZONES = {
45
- // Universal
46
- UTC: 0,
47
- GMT: 0,
48
- // North America
49
- EST: -5 * 60,
50
- EDT: -4 * 60,
51
- CST: -6 * 60,
52
- CDT: -5 * 60,
45
+ // UTC -12:00 to -01:00 (Mostly Pacific Islands, Americas)
46
+ /** International Date Line West (Baker Island, Howland Island) */
47
+ IDLW: -12 * 60,
48
+ /** Baker Island Time (Uninhabited) */
49
+ BIT: -12 * 60,
50
+ /** Samoa Standard Time (American Samoa, Midway) */
51
+ SST: -11 * 60,
52
+ /** Niue Time */
53
+ NUT: -11 * 60,
54
+ /** Hawaii-Aleutian Standard Time (USA-Hawaii) */
55
+ HST: -10 * 60,
56
+ /** Cook Island Time */
57
+ CKT: -10 * 60,
58
+ /** Tahiti Time (French Polynesia) */
59
+ TAHT: -10 * 60,
60
+ /** Alaska Standard Time (USA-Alaska) */
61
+ AKST: -9 * 60,
62
+ /** Gambier Time (French Polynesia) */
63
+ GAMT: -9 * 60,
64
+ /** Paraguay Time (Summer UTC-3) */
65
+ PYT: -9 * 60,
66
+ /** Marquesas Islands Time (UTC−09:30) */
67
+ MART: -9.5 * 60,
68
+ /** Hawaii-Aleutian Daylight Time (USA-Hawaii, DST) */
69
+ HDT: -9 * 60,
70
+ /** Pacific Standard Time (USA-West Coast, Canada) */
71
+ PST: -8 * 60,
72
+ /** Alaska Daylight Time (USA-Alaska, DST) */
73
+ AKDT: -8 * 60,
74
+ /** Mountain Standard Time (USA/Canada Rockies) */
53
75
  MST: -7 * 60,
76
+ /** Mountain Daylight Time (USA/Canada Rockies, DST) */
54
77
  MDT: -6 * 60,
55
- PST: -8 * 60,
78
+ /** Pacific Daylight Time (USA-West Coast, Canada, DST) */
56
79
  PDT: -7 * 60,
57
- AKST: -9 * 60,
58
- AKDT: -8 * 60,
59
- HST: -10 * 60,
60
- HDT: -9 * 60,
61
- // South America
62
- ART: -3 * 60,
63
- BRST: -2 * 60,
64
- BRT: -3 * 60,
80
+ /** Central Standard Time (USA/Canada Central) */
81
+ CST: -6 * 60,
82
+ /** Central Daylight Time (USA/Canada Central, DST) */
83
+ CDT: -5 * 60,
84
+ /** Easter Island Time (Chile) */
85
+ EAST: -6 * 60,
86
+ /** Eastern Standard Time (USA/Canada East Coast) */
87
+ EST: -5 * 60,
88
+ /** Eastern Daylight Time (USA/Canada East Coast, DST) */
89
+ EDT: -4 * 60,
90
+ /** Peru Time */
91
+ PET: -5 * 60,
92
+ /** Colombia Time */
93
+ COT: -5 * 60,
94
+ /** Acre Time (Brazil-West) */
95
+ ACT: -5 * 60,
96
+ /** Atlantic Standard Time (Canada-Maritime, Caribbean) */
97
+ AST: -4 * 60,
98
+ /** Bolivia Time */
99
+ BOT: -4 * 60,
100
+ /** Venezuelan Standard Time */
101
+ VET: -4 * 60,
102
+ /** Guyana Time */
103
+ GYT: -4 * 60,
104
+ /** Chile Standard Time */
65
105
  CLT: -4 * 60,
106
+ /** Atlantic Daylight Time (Canada-Maritime, DST) */
107
+ ADT: -3 * 60,
108
+ /** Brasília Time (Brazil-East) */
109
+ BRT: -3 * 60,
110
+ /** Argentina Time */
111
+ ART: -3 * 60,
112
+ /** Uruguay Time */
113
+ UYT: -3 * 60,
114
+ /** Falkland Islands Summer Time */
115
+ FKST: -3 * 60,
116
+ /** Saint Pierre and Miquelon Standard Time */
117
+ PMST: -3 * 60,
118
+ /** Chile Summer Time (DST) */
66
119
  CLST: -3 * 60,
120
+ /** French Guiana Time */
67
121
  GFT: -3 * 60,
68
- UYT: -3 * 60,
69
- // Europe
70
- CET: 1 * 60,
71
- CEST: 2 * 60,
72
- EET: 2 * 60,
73
- EEST: 3 * 60,
122
+ /** Newfoundland Standard Time */
123
+ NST: -3.5 * 60,
124
+ /** Newfoundland Daylight Time (DST) */
125
+ NDT: -2.5 * 60,
126
+ /** Fernando de Noronha Time (Brazil) */
127
+ FNT: -2 * 60,
128
+ /** South Georgia Time */
129
+ 'GST-South Georgia': -2 * 60,
130
+ /** Brazil Summer Time (DST) */
131
+ BRST: -2 * 60,
132
+ /** Azores Time (Portugal) */
133
+ AZOT: -1 * 60,
134
+ /** Cape Verde Time */
135
+ CVT: -1 * 60,
136
+ // UTC ±00:00 (Europe, Africa, Greenland)
137
+ /** Greenwich Mean Time (UK, Iceland, West Africa) */
138
+ GMT: 0,
139
+ /** Coordinated Universal Time */
140
+ UTC: 0,
141
+ /** Western European Time (Portugal, Morocco) */
74
142
  WET: 0,
75
- WEST: 1 * 60,
143
+ /** Eastern Greenland Summer Time */
144
+ EGST: 0,
145
+ /** Central European Time (France, Germany, Italy) */
146
+ CET: 1 * 60,
147
+ /** West Africa Time (Nigeria, Algeria) */
148
+ WAT: 1 * 60,
149
+ /** Middle European Time (Historical) */
76
150
  MET: 1 * 60,
151
+ /** Western European Summer Time (Summer UTC+1) */
152
+ WEST: 1 * 60,
153
+ /** British Summer Time (UK DST) */
154
+ 'BST-UK': 1 * 60,
155
+ /** Central European Summer Time (DST) */
156
+ CEST: 2 * 60,
157
+ /** Middle European Summer Time (DST) */
77
158
  MEST: 2 * 60,
78
- // Africa
79
- WAT: 1 * 60,
159
+ // UTC +02:00 to +05:00 (Europe, Africa, Middle East, Russia)
160
+ /** Eastern European Time (Greece, Finland, Egypt) */
161
+ EET: 2 * 60,
162
+ /** Central Africa Time (Sudan, South Africa) */
80
163
  CAT: 2 * 60,
164
+ /** South Africa Standard Time */
165
+ SAST: 2 * 60,
166
+ /** Israel Standard Time */
167
+ 'IST-ISRAEL': 2 * 60,
168
+ /** Israel Daylight Time (DST) */
169
+ 'IST-IL': 2 * 60,
170
+ /** Eastern European Summer Time */
171
+ EEST: 3 * 60,
172
+ /** Moscow Time (Russia-West) */
173
+ MSK: 3 * 60,
174
+ /** Syowa Time (Antarctica) */
175
+ SYOT: 3 * 60,
176
+ /** Arabia Standard Time (Iraq, Saudi Arabia) */
177
+ 'AST-ARAB': 3 * 60,
178
+ /** East Africa Time (Kenya, Ethiopia) */
81
179
  EAT: 3 * 60,
82
- // Asia
83
- IST: 5.5 * 60, // India
180
+ /** Iran Standard Time */
181
+ IRST: 3.5 * 60,
182
+ /** Iran Daylight Time (DST) */
183
+ IRDT: 4.5 * 60,
184
+ /** Armenia Time */
185
+ AMT: 4 * 60,
186
+ /** Georgia Time */
187
+ GET: 4 * 60,
188
+ /** Azerbaijan Time */
189
+ AZT: 4 * 60,
190
+ /** Mauritius Time */
191
+ MUT: 4 * 60,
192
+ /** Seychelles Time */
193
+ SCT: 4 * 60,
194
+ /** Gulf Standard Time (UAE, Oman) */
195
+ 'GST-GULF': 4 * 60,
196
+ /** Samara Time (Russia) */
197
+ SAMT: 4 * 60,
198
+ /** Pakistan Standard Time */
84
199
  PKT: 5 * 60,
85
- BST: 6 * 60, // Bangladesh
200
+ /** Tajikistan Time */
201
+ TJT: 5 * 60,
202
+ /** Turkmenistan Time */
203
+ TMT: 5 * 60,
204
+ /** Uzbekistan Time */
205
+ UZT: 5 * 60,
206
+ /** Aqtobe Time (Kazakhstan) */
207
+ AQTT: 5 * 60,
208
+ /** Yekaterinburg Time (Russia) */
209
+ YEKT: 5 * 60,
210
+ /** Yekaterinburg Summer Time (Russia, DST) */
211
+ YEKST: 5 * 60,
212
+ /** India Standard Time */
213
+ 'IST-IN': 5.5 * 60,
214
+ // UTC +05:30 to +09:00 (South Asia, Russia, Southeast Asia)
215
+ /** Nepal Time (UTC+05:45) */
86
216
  NPT: 5.75 * 60,
87
- MYT: 8 * 60,
88
- THA: 7 * 60,
217
+ /** Nepal Time (alternative) */
218
+ 'NPT-NEPAL': 5.75 * 60,
219
+ /** Bangladesh Time */
220
+ BDT: 6 * 60,
221
+ /** Bangladesh Standard Time */
222
+ 'BST-BD': 6 * 60,
223
+ /** Bhutan Time */
224
+ BTT: 6 * 60,
225
+ /** Almaty Time (Kazakhstan) */
226
+ ALMT: 6 * 60,
227
+ /** Omsk Time (Russia) */
228
+ OMST: 6 * 60,
229
+ /** Myanmar Time */
230
+ MMT: 6.5 * 60,
231
+ /** Cocos Islands Time */
232
+ CCT: 6.5 * 60,
233
+ /** Indochina Time (Thailand, Vietnam) */
89
234
  ICT: 7 * 60,
235
+ /** Thailand Standard Time */
236
+ THA: 7 * 60,
237
+ /** Krasnoyarsk Time (Russia) */
238
+ KRAT: 7 * 60,
239
+ /** Western Indonesia Time (Jakarta) */
90
240
  WIB: 7 * 60,
91
- WITA: 8 * 60,
92
- WIT: 9 * 60,
241
+ /** Hong Kong Time */
242
+ HKT: 8 * 60,
243
+ /** China Standard Time */
244
+ 'CST-CHINA': 8 * 60,
245
+ /** Singapore Time */
93
246
  SGT: 8 * 60,
94
- CST_CHINA: 8 * 60,
247
+ /** Malaysia Time */
248
+ MYT: 8 * 60,
249
+ /** Philippines Time */
250
+ PHT: 8 * 60,
251
+ /** Irkutsk Time (Russia) */
252
+ IRKT: 8 * 60,
253
+ /** Irkutsk Daylight Time (Russia, DST) */
254
+ 'IRKT-DST': 9 * 60,
255
+ /** Irkutsk Time (Russia, alternative) */
256
+ 'IRKT-RU': 8 * 60,
257
+ /** Australian Western Standard Time */
258
+ AWST: 8 * 60,
259
+ /** Australian Central Western Standard Time (Eucla, UTC+08:45) */
260
+ ACWST: 8.75 * 60,
261
+ /** Western Indonesia Time (Bali) */
262
+ WITA: 8 * 60,
263
+ /** Japan Standard Time */
95
264
  JST: 9 * 60,
265
+ /** Korea Standard Time */
96
266
  KST: 9 * 60,
97
- IRKT: 8 * 60,
98
- IRKT_DST: 9 * 60,
99
- // Australia & Oceania
100
- AEST: 10 * 60,
101
- AEDT: 11 * 60,
267
+ /** Palau Time */
268
+ PWT: 9 * 60,
269
+ /** Yakutsk Time (Russia) */
270
+ YAKT: 9 * 60,
271
+ /** Eastern Indonesia Time (Jayapura) */
272
+ WIT: 9 * 60,
273
+ // UTC +09:30 to +14:00 (Australia, Pacific Islands, Russia)
274
+ /** Australian Central Standard Time */
102
275
  ACST: 9.5 * 60,
276
+ /** Australian Central Daylight Time (DST) */
103
277
  ACDT: 10.5 * 60,
104
- AWST: 8 * 60,
278
+ /** Australian Eastern Standard Time */
279
+ AEST: 10 * 60,
280
+ /** Australian Eastern Daylight Time (DST) */
281
+ AEDT: 11 * 60,
282
+ /** Vladivostok Time (Russia) */
283
+ VLAT: 10 * 60,
284
+ /** Lord Howe Standard Time (UTC+10:30) */
285
+ LHST: 10.5 * 60,
286
+ /** Lord Howe Daylight Time (DST +30min) */
287
+ LHDT: 11 * 60,
288
+ /** Sakhalin Time (Russia) */
289
+ SAKT: 11 * 60,
290
+ /** Magadan Time (Russia) */
291
+ MAGT: 11 * 60,
292
+ /** Norfolk Time (Australia) */
293
+ NFT: 11 * 60,
294
+ /** Chamorro Standard Time (Guam, Northern Mariana Islands) */
295
+ CHST: 10 * 60,
296
+ /** New Zealand Standard Time */
105
297
  NZST: 12 * 60,
298
+ /** New Zealand Daylight Time (DST) */
106
299
  NZDT: 13 * 60,
300
+ /** Fiji Time */
301
+ FJT: 12 * 60,
302
+ /** Tuvalu Time */
303
+ TVT: 12 * 60,
304
+ /** Chatham Standard Time (New Zealand) */
107
305
  CHAST: 12.75 * 60,
306
+ /** Chatham Daylight Time (New Zealand, DST) */
108
307
  CHADT: 13.75 * 60,
109
- // Russia
110
- MSK: 3 * 60,
111
- SAMT: 4 * 60,
112
- YEKST: 5 * 60,
113
- OMST: 6 * 60,
114
- KRAT: 7 * 60,
115
- IRKT_RU: 8 * 60,
116
- YAKT: 9 * 60,
117
- VLAT: 10 * 60,
118
- MAGT: 11 * 60,
119
- PETT: 12 * 60,
120
- // Middle East
121
- IRST: 3.5 * 60,
122
- IRDT: 4.5 * 60,
123
- GST: 4 * 60,
308
+ /** Chatham Standard Time (alternative) */
309
+ 'CHAST-NZ': 12.75 * 60,
310
+ /** Phoenix Island Time (Kiribati) */
311
+ PHOT: 13 * 60,
312
+ /** Tokelau Time */
313
+ TKT: 13 * 60,
314
+ /** Tonga Time */
315
+ TOT: 13 * 60,
316
+ /** New Zealand Antarctica Time */
317
+ NZAT: 13 * 60,
318
+ /** Line Islands Time (Kiribati) */
319
+ LINT: 14 * 60,
124
320
  // Antarctica (used in research stations)
321
+ /** Rothera Time (Antarctica) */
125
322
  ROTT: -3 * 60,
323
+ /** Mawson Time (Antarctica) */
126
324
  MAWT: 5 * 60,
127
- NZAT: 13 * 60,
128
- // Misc
129
- AST: -4 * 60,
130
- ADT: -3 * 60,
131
- NST: -3.5 * 60,
132
- NDT: -2.5 * 60,
133
- SST: -11 * 60,
134
- CHST: 10 * 60,
135
- // Rare fractional or unique time zones
136
- MART: -9.5 * 60, // Marquesas Islands Time (UTC−09:30)
137
- CHAST_NZ: 12.75 * 60, // Chatham Standard Time (NZ, UTC+12:45)
138
- LHST: 10.5 * 60, // Lord Howe Standard Time (UTC+10:30)
139
- LHDT: 11 * 60, // Lord Howe Daylight Time (DST +30min)
140
- ACWST: 8.75 * 60, // Australian Central Western Standard Time (Eucla, UTC+08:45)
141
- NPT_NEPAL: 5.75 * 60, // Nepal Time (UTC+05:45)
142
- UTC_MINUS_12: -12 * 60,
143
- UTC_MINUS_11: -11 * 60,
144
- UTC_MINUS_10: -10 * 60,
145
- UTC_MINUS_9: -9 * 60,
146
- UTC_MINUS_8: -8 * 60,
147
- UTC_MINUS_7: -7 * 60,
148
- UTC_MINUS_6: -6 * 60,
149
- UTC_MINUS_5: -5 * 60,
150
- UTC_MINUS_4: -4 * 60,
151
- UTC_MINUS_3: -3 * 60,
152
- UTC_MINUS_2: -2 * 60,
153
- UTC_MINUS_1: -1 * 60,
154
- UTC_PLUS_0: 0,
155
- UTC_PLUS_1: 1 * 60,
156
- UTC_PLUS_2: 2 * 60,
157
- UTC_PLUS_3: 3 * 60,
158
- UTC_PLUS_3_30: 3.5 * 60,
159
- UTC_PLUS_4: 4 * 60,
160
- UTC_PLUS_4_30: 4.5 * 60,
161
- UTC_PLUS_5: 5 * 60,
162
- UTC_PLUS_5_30: 5.5 * 60,
163
- UTC_PLUS_5_45: 5.75 * 60,
164
- UTC_PLUS_6: 6 * 60,
165
- UTC_PLUS_6_30: 6.5 * 60,
166
- UTC_PLUS_7: 7 * 60,
167
- UTC_PLUS_8: 8 * 60,
168
- UTC_PLUS_8_45: 8.75 * 60,
169
- UTC_PLUS_9: 9 * 60,
170
- UTC_PLUS_9_30: 9.5 * 60,
171
- UTC_PLUS_10: 10 * 60,
172
- UTC_PLUS_10_30: 10.5 * 60,
173
- UTC_PLUS_11: 11 * 60,
174
- UTC_PLUS_12: 12 * 60,
175
- UTC_PLUS_12_45: 12.75 * 60,
176
- UTC_PLUS_13: 13 * 60,
177
- UTC_PLUS_14: 14 * 60,
178
- BST_UK: 60, // British Summer Time (UK DST)
179
- BST_BD: 360, // Bangladesh Standard Time
180
- IST_IN: 330, // India
181
- IST_IL: 120, // Israel
182
- CST_US: -360,
183
- CST_CN: 480,
325
+ /** Petropavlovsk-Kamchatsky Time (Russia) */
326
+ PETT: 12 * 60,
184
327
  };
@@ -1,3 +1,4 @@
1
+ import type { Numeric } from '../types';
1
2
  import type { Time, UTCOffSet } from './types';
2
3
  /**
3
4
  * * Checks if the provided value is a valid time string in "HH:MM" format.
@@ -13,4 +14,13 @@ export declare function isValidTime(value: unknown): value is Time;
13
14
  * @returns `true` if the value is a valid utc offset, `false` otherwise.
14
15
  */
15
16
  export declare function isValidUTCOffSet(value: unknown): value is UTCOffSet;
17
+ /**
18
+ * * Checks if the year is a leap year.
19
+ *
20
+ * - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
21
+ * - For example, 2000 and 2400 are leap years, but 1900 and 2100 are not.
22
+ * @param year The year to check.
23
+ * @returns `true` if the year is a leap year, `false` otherwise.
24
+ */
25
+ export declare function isLeapYear(year: Numeric): boolean;
16
26
  //# sourceMappingURL=guards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../src/date/guards.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAWzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAInE"}
1
+ {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../src/date/guards.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAWzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAInE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAKjD"}
@@ -27,3 +27,15 @@ export function isValidUTCOffSet(value) {
27
27
  return false;
28
28
  return /^UTC[+-]?\d{1,2}:\d{2}$/.test(value);
29
29
  }
30
+ /**
31
+ * * Checks if the year is a leap year.
32
+ *
33
+ * - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
34
+ * - For example, 2000 and 2400 are leap years, but 1900 and 2100 are not.
35
+ * @param year The year to check.
36
+ * @returns `true` if the year is a leap year, `false` otherwise.
37
+ */
38
+ export function isLeapYear(year) {
39
+ return ((Number(year) % 4 === 0 && Number(year) % 100 !== 0) ||
40
+ Number(year) % 400 === 0);
41
+ }
@@ -52,4 +52,11 @@ export type PositiveUTCHour = '+00' | '+01' | '+02' | '+03' | '+04' | '+05' | '+
52
52
  export type NegativeUTCHour = '-01' | '-02' | '-03' | '-04' | '-05' | '-06' | '-07' | '-08' | '-09' | '-10' | '-11' | '-12';
53
53
  export type UTCMinute = '00' | '15' | '30' | '45';
54
54
  export type UTCOffSet = `UTC${PositiveUTCHour | NegativeUTCHour}:${UTCMinute}`;
55
+ /** * Format options */
56
+ export interface FormatOptions {
57
+ /** - The desired format (Default format is dd, `MMM DD, YYYY HH:mm:ss` = `Sun, Apr 06, 2025 16:11:55:379`). */
58
+ format?: string;
59
+ /** - Whether to use UTC time. Defaults to `false`. */
60
+ useUTC?: boolean;
61
+ }
55
62
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/date/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,MAAM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CAAC,CAAC;AACjD,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AACrD,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AACrD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,MAAM,aAAa,GACtB,IAAI,GACJ,KAAK,GACL,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,MAAM,GACN,WAAW,GACX,WAAW,CAAC;AAEf,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,UAAU,CAAC;AAE/C,MAAM,MAAM,eAAe,GACxB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AAET,MAAM,MAAM,eAAe,GACxB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AAET,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD,MAAM,MAAM,SAAS,GAAG,MAAM,eAAe,GAAG,eAAe,IAAI,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/date/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,YAAY,E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1
2
  import type { AsyncFunction, GenericFn } from '../types';
2
3
  /**
3
4
  * * Type guard to check if a value is an array.
@@ -23,18 +24,6 @@ export declare function isObject(value: unknown): value is Record<string, unknow
23
24
  * @returns `true` if the value is an object with valid keys, otherwise `false`.
24
25
  */
25
26
  export declare function isNotEmptyObject(value: unknown): value is Record<string, unknown>;
26
- /**
27
- * * Type guard to check if a value is a function.
28
- * @param value - The value to check.
29
- * @returns `true` if the value is a function, otherwise `false`.
30
- */
31
- export declare function isFunction(value: unknown): value is GenericFn;
32
- /**
33
- * * Type guard to check if a value is a Date object.
34
- * @param value - The value to check.
35
- * @returns `true` if the value is a Date object, otherwise `false`.
36
- */
37
- export declare function isDate(value: unknown): value is Date;
38
27
  /**
39
28
  * * Type guard to check if a value is an object with specific keys.
40
29
  * @param value - The value to check.
@@ -47,7 +36,19 @@ export declare function isObjectWithKeys<T extends Record<string, unknown>>(valu
47
36
  * @param value - The value to check.
48
37
  * @returns `true` if the value is an empty object, otherwise `false`.
49
38
  */
50
- export declare function isEmptyObject(value: unknown): value is Record<string, unknown>;
39
+ export declare function isEmptyObject<T extends GenericObject>(value: T): boolean;
40
+ /**
41
+ * * Type guard to check if a value is a function.
42
+ * @param value - The value to check.
43
+ * @returns `true` if the value is a function, otherwise `false`.
44
+ */
45
+ export declare function isFunction(value: unknown): value is GenericFn;
46
+ /**
47
+ * * Type guard to check if a value is a Date object.
48
+ * @param value - The value to check.
49
+ * @returns `true` if the value is a Date object, otherwise `false`.
50
+ */
51
+ export declare function isDate(value: unknown): value is Date;
51
52
  /**
52
53
  * * Type guard to check if a value is an array of a specific type.
53
54
  * @param value - The value to check.
@@ -1 +1 @@
1
- {"version":3,"file":"non-primitives.d.ts","sourceRoot":"","sources":["../../src/guards/non-primitives.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGzD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KA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,KAAK,IAAI,MAAM,CAExD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAStD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,GAAG,EAAE,IAAI,aAAa,CAAC,CAAC,CAAC,CAEzE"}
@@ -31,22 +31,6 @@ export function isObject(value) {
31
31
  export function isNotEmptyObject(value) {
32
32
  return isObject(value) && Object.keys(value).length > 0;
33
33
  }
34
- /**
35
- * * Type guard to check if a value is a function.
36
- * @param value - The value to check.
37
- * @returns `true` if the value is a function, otherwise `false`.
38
- */
39
- export function isFunction(value) {
40
- return typeof value === 'function';
41
- }
42
- /**
43
- * * Type guard to check if a value is a Date object.
44
- * @param value - The value to check.
45
- * @returns `true` if the value is a Date object, otherwise `false`.
46
- */
47
- export function isDate(value) {
48
- return value instanceof Date;
49
- }
50
34
  /**
51
35
  * * Type guard to check if a value is an object with specific keys.
52
36
  * @param value - The value to check.
@@ -64,6 +48,22 @@ export function isObjectWithKeys(value, keys) {
64
48
  export function isEmptyObject(value) {
65
49
  return isObject(value) && Object.keys(value).length === 0;
66
50
  }
51
+ /**
52
+ * * Type guard to check if a value is a function.
53
+ * @param value - The value to check.
54
+ * @returns `true` if the value is a function, otherwise `false`.
55
+ */
56
+ export function isFunction(value) {
57
+ return typeof value === 'function';
58
+ }
59
+ /**
60
+ * * Type guard to check if a value is a Date object.
61
+ * @param value - The value to check.
62
+ * @returns `true` if the value is a Date object, otherwise `false`.
63
+ */
64
+ export function isDate(value) {
65
+ return value instanceof Date;
66
+ }
67
67
  /**
68
68
  * * Type guard to check if a value is an array of a specific type.
69
69
  * @param value - The value to check.
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ export { generateRandomColorInHexRGB, generateRandomHSLColor, } from './colors/r
14
14
  export { convertColorCode, convertHex8ToHsla, convertHex8ToRgba, convertHexToHsl, convertHexToRgb, convertHslaToHex8, convertHslaToRgba, convertHslToHex, convertHslToRgb, convertRgbaToHex8, convertRgbaToHsla, convertRgbToHex, convertRgbToHsl, convertRgbToRgba, } from './colors/convert';
15
15
  export { Color, Color as Colour } from './colors/Color';
16
16
  export { getGreeting as generateGreeting, getGreeting, getGreeting as greet, } from './date/greet';
17
- export { isValidTime, isValidTime as isValidTimeString, isValidUTCOffSet as isValidUTC, isValidUTCOffSet, } from './date/guards';
17
+ export { isValidTime, isValidTime as isValidTimeString, isValidUTCOffSet as isValidUTC, isValidUTCOffSet, isLeapYear, } from './date/guards';
18
18
  export { Chronos, Chronos as Chronus } from './date/Chronos';
19
19
  export { chronos, chronos as chronosjs, chronos as chronosts, chronos as chronus, chronos as chronusjs, chronos as chronusts, extractHourMinute, extractMinutesFromUTC, extractTimeFromUTC, extractTimeFromUTC as extractTimeStringFromUTC, getTotalMinutes as extractTotalMinutesFromTime, getCurrentDateTime, getCurrentDateTime as getCurrentTime, extractMinutesFromUTC as getMinutesFromUTC, extractTimeFromUTC as getTimeStringFromUTC, getTotalMinutes, getTotalMinutes as getTotalMinutesFromTime, extractMinutesFromUTC as getTotalMinutesFromUTC, } from './date/utils';
20
20
  export { filterArrayOfObjects, flattenArray, getLastArrayElement, isInvalidOrEmptyArray, isInvalidOrEmptyArray as isValidEmptyArray, shuffleArray, } from './array/basics';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,cAAc,GACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AA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O,EACN,kBAAkB,IAAI,iBAAiB,EACvC,OAAO,EACP,aAAa,EACb,YAAY,IAAI,iBAAiB,EACjC,QAAQ,EACR,MAAM,EACN,aAAa,EACb,aAAa,IAAI,kBAAkB,EACnC,OAAO,EACP,UAAU,EACV,MAAM,EACN,MAAM,IAAI,YAAY,EACtB,KAAK,EACL,gBAAgB,EAChB,QAAQ,EACR,aAAa,IAAI,aAAa,EAC9B,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,QAAQ,IAAI,mBAAmB,EAC/B,kBAAkB,EAClB,KAAK,EACL,YAAY,EACZ,MAAM,IAAI,WAAW,EACrB,KAAK,IAAI,UAAU,EACnB,gBAAgB,IAAI,aAAa,EACjC,KAAK,IAAI,UAAU,GACnB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,aAAa,EACb,aAAa,IAAI,iBAAiB,EAClC,WAAW,EACX,MAAM,EACN,aAAa,IAAI,SAAS,EAC1B,aAAa,IAAI,iBAAiB,EAClC,eAAe,EACf,aAAa,EACb,KAAK,EACL,MAAM,EACN,OAAO,IAAI,YAAY,EACvB,KAAK,IAAI,UAAU,GACnB,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ export { convertColorCode, convertHex8ToHsla, convertHex8ToRgba, convertHexToHsl
18
18
  export { Color, Color as Colour } from './colors/Color';
19
19
  // ! Date & Time Utilities
20
20
  export { getGreeting as generateGreeting, getGreeting, getGreeting as greet, } from './date/greet';
21
- export { isValidTime, isValidTime as isValidTimeString, isValidUTCOffSet as isValidUTC, isValidUTCOffSet, } from './date/guards';
21
+ export { isValidTime, isValidTime as isValidTimeString, isValidUTCOffSet as isValidUTC, isValidUTCOffSet, isLeapYear, } from './date/guards';
22
22
  export { Chronos, Chronos as Chronus } from './date/Chronos';
23
23
  export { chronos, chronos as chronosjs, chronos as chronosts, chronos as chronus, chronos as chronusjs, chronos as chronusts, extractHourMinute, extractMinutesFromUTC, extractTimeFromUTC, extractTimeFromUTC as extractTimeStringFromUTC, getTotalMinutes as extractTotalMinutesFromTime, getCurrentDateTime, getCurrentDateTime as getCurrentTime, extractMinutesFromUTC as getMinutesFromUTC, extractTimeFromUTC as getTimeStringFromUTC, getTotalMinutes, getTotalMinutes as getTotalMinutesFromTime, extractMinutesFromUTC as getTotalMinutesFromUTC, } from './date/utils';
24
24
  // ! Array Utilities
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhb-toolbox",
3
- "version": "3.5.1",
3
+ "version": "3.5.20",
4
4
  "description": "A versatile collection of smart, efficient, and reusable utility functions for everyday development needs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",