nhb-toolbox 3.5.0 → 3.5.15

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,3 +1,4 @@
1
+ import type { TimeZone, UTCOffSet } from './types';
1
2
  export declare class Chronos {
2
3
  #private;
3
4
  /**
@@ -54,11 +55,19 @@ export declare class Chronos {
54
55
  */
55
56
  static now(): number;
56
57
  /**
57
- * * Formats the date into a custom string format.
58
+ * * Formats the date into a custom string format (local time).
59
+ *
58
60
  * @param format - The desired format (Default format is `DD-MM-YYYY` = `30-06-1995`).
59
- * @returns Formatted date string in desired format.
61
+ * @returns Formatted date string in desired format (local time).
60
62
  */
61
63
  format(format?: string): string;
64
+ /**
65
+ * * Formats the date into a custom string format (UTC time).
66
+ *
67
+ * @param format - The desired format (Default format is `DD-MM-YYYY` = `30-06-1995`).
68
+ * @returns Formatted date string in desired format (UTC time).
69
+ */
70
+ formatUTC(format?: string): string;
62
71
  /**
63
72
  * * Adds days and returns a new immutable instance.
64
73
  * @param days - Number of days to add.
@@ -88,5 +97,12 @@ export declare class Chronos {
88
97
  * @returns `true` if the year is a leap year, `false` otherwise.
89
98
  */
90
99
  isLeapYear(): boolean;
100
+ /**
101
+ * * Create a new instance of `Chronos` in the specified timezone.
102
+ *
103
+ * @param zone - Standard timezone abbreviation (e.g., 'IST', 'UTC', 'EST') or UTC Offset in `UTC-01:30` format.
104
+ * @returns A new instance of `Chronos` with time in the given timezone. Invalid input sets time-zone to `UTC`.
105
+ */
106
+ timeZone(zone: TimeZone | UTCOffSet): Chronos;
91
107
  }
92
108
  //# sourceMappingURL=Chronos.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chronos.d.ts","sourceRoot":"","sources":["../../src/date/Chronos.ts"],"names":[],"mappings":"AAGA,qBAAa,OAAO;;IAInB;;;;;;;;OAQG;gBACS,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO;IAepD,IAAI,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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,MAAM,SAA4B,GAAG,MAAM;IAKjD;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,MAAM,SAA4B,GAAG,MAAM;IAKxD;;;;OAIG;IACH,MAAM,CAAC,GAAG,IAAI,MAAM;IA4FpB;;;;;OAKG;IACH,MAAM,CAAC,MAAM,GAAE,MAAqB,GAAG,MAAM;IAI7C;;;;;OAKG;IACH,SAAS,CAAC,MAAM,GAAE,MAAqB,GAAG,MAAM;IAIhD;;;;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"}
@@ -1,4 +1,6 @@
1
- import { DAYS, MONTHS, sortedFormats } from './constants';
1
+ import { DAYS, MONTHS, sortedFormats, TIME_ZONES } from './constants';
2
+ import { isValidUTCOffSet } from './guards';
3
+ import { extractMinutesFromUTC } from './utils';
2
4
  export class Chronos {
3
5
  #date;
4
6
  // readonly preview: string;
@@ -96,19 +98,23 @@ export class Chronos {
96
98
  return Date.now();
97
99
  }
98
100
  /**
99
- * * Formats the date into a custom string format.
100
- * @param format - The desired format (Default format is `DD-MM-YYYY` = `30-06-1995`).
101
- * @returns Formatted date string in desired format.
101
+ * @private Formats the current `Chronos` date using the specified template.
102
+ *
103
+ * @param format - The desired date format.
104
+ * @param useUTC - Whether to use UTC or local time.
105
+ * @returns Formatted date string.
102
106
  */
103
- format(format = 'DD-MM-YYYY') {
104
- const year = this.#date.getFullYear();
105
- const month = this.#date.getMonth();
106
- const day = this.#date.getDay();
107
- const date = this.#date.getDate();
108
- const hours = this.#date.getHours();
109
- const minutes = this.#date.getMinutes();
110
- const seconds = this.#date.getSeconds();
111
- const milliseconds = this.#date.getMilliseconds();
107
+ #format(format, useUTC = false) {
108
+ const year = useUTC ? this.#date.getUTCFullYear() : this.#date.getFullYear();
109
+ const month = useUTC ? this.#date.getUTCMonth() : this.#date.getMonth();
110
+ const day = useUTC ? this.#date.getUTCDay() : this.#date.getDay();
111
+ const date = useUTC ? this.#date.getUTCDate() : this.#date.getDate();
112
+ const hours = useUTC ? this.#date.getUTCHours() : this.#date.getHours();
113
+ const minutes = useUTC ? this.#date.getUTCMinutes() : this.#date.getMinutes();
114
+ const seconds = useUTC ? this.#date.getUTCSeconds() : this.#date.getSeconds();
115
+ const milliseconds = useUTC ?
116
+ this.#date.getUTCMilliseconds()
117
+ : this.#date.getMilliseconds();
112
118
  const dateComponents = {
113
119
  YYYY: String(year),
114
120
  YY: String(year).slice(-2),
@@ -165,6 +171,24 @@ export class Chronos {
165
171
  }
166
172
  return result;
167
173
  }
174
+ /**
175
+ * * Formats the date into a custom string format (local time).
176
+ *
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).
179
+ */
180
+ format(format = 'DD-MM-YYYY') {
181
+ return this.#format(format, false);
182
+ }
183
+ /**
184
+ * * Formats the date into a custom string format (UTC time).
185
+ *
186
+ * @param format - The desired format (Default format is `DD-MM-YYYY` = `30-06-1995`).
187
+ * @returns Formatted date string in desired format (UTC time).
188
+ */
189
+ formatUTC(format = 'DD-MM-YYYY') {
190
+ return this.#format(format, true);
191
+ }
168
192
  /**
169
193
  * * Adds days and returns a new immutable instance.
170
194
  * @param days - Number of days to add.
@@ -213,4 +237,22 @@ export class Chronos {
213
237
  const year = this.#date.getFullYear();
214
238
  return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
215
239
  }
240
+ /**
241
+ * * Create a new instance of `Chronos` in the specified timezone.
242
+ *
243
+ * @param zone - Standard timezone abbreviation (e.g., 'IST', 'UTC', 'EST') or UTC Offset in `UTC-01:30` format.
244
+ * @returns A new instance of `Chronos` with time in the given timezone. Invalid input sets time-zone to `UTC`.
245
+ */
246
+ timeZone(zone) {
247
+ let offset;
248
+ if (isValidUTCOffSet(zone)) {
249
+ offset = extractMinutesFromUTC(zone);
250
+ }
251
+ else {
252
+ offset = TIME_ZONES[zone] ?? TIME_ZONES['UTC'];
253
+ }
254
+ const utc = this.#date.getTime() + this.#date.getTimezoneOffset() * 60 * 1000;
255
+ const adjusted = new Date(utc + offset * 60 * 1000);
256
+ return new Chronos(adjusted);
257
+ }
216
258
  }
@@ -10,4 +10,133 @@ 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
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")[];
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;
20
+ readonly MST: number;
21
+ readonly MDT: number;
22
+ readonly PST: number;
23
+ 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;
31
+ readonly CLT: number;
32
+ readonly CLST: number;
33
+ readonly GFT: number;
34
+ readonly UYT: number;
35
+ readonly CET: number;
36
+ readonly CEST: number;
37
+ readonly EET: number;
38
+ readonly EEST: number;
39
+ readonly WET: 0;
40
+ readonly WEST: number;
41
+ readonly MET: number;
42
+ readonly MEST: number;
43
+ readonly WAT: number;
44
+ readonly CAT: number;
45
+ readonly EAT: number;
46
+ readonly IST: number;
47
+ readonly PKT: number;
48
+ readonly BST: number;
49
+ readonly NPT: number;
50
+ readonly MYT: number;
51
+ readonly THA: number;
52
+ readonly ICT: number;
53
+ readonly WIB: number;
54
+ readonly WITA: number;
55
+ readonly WIT: number;
56
+ readonly SGT: number;
57
+ readonly CST_CHINA: number;
58
+ readonly JST: number;
59
+ readonly KST: number;
60
+ readonly IRKT: number;
61
+ readonly IRKT_DST: number;
62
+ readonly AEST: number;
63
+ readonly AEDT: number;
64
+ readonly ACST: number;
65
+ readonly ACDT: number;
66
+ readonly AWST: number;
67
+ readonly NZST: number;
68
+ readonly NZDT: number;
69
+ readonly CHAST: number;
70
+ 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;
84
+ readonly ROTT: number;
85
+ 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;
141
+ };
13
142
  //# 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"}
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"}
@@ -41,3 +41,144 @@ export const sortedFormats = [
41
41
  ...MILLISECOND_FORMATS,
42
42
  ...TIME_FORMATS,
43
43
  ].sort((a, b) => b.length - a.length);
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,
53
+ MST: -7 * 60,
54
+ MDT: -6 * 60,
55
+ PST: -8 * 60,
56
+ 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,
65
+ CLT: -4 * 60,
66
+ CLST: -3 * 60,
67
+ 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,
74
+ WET: 0,
75
+ WEST: 1 * 60,
76
+ MET: 1 * 60,
77
+ MEST: 2 * 60,
78
+ // Africa
79
+ WAT: 1 * 60,
80
+ CAT: 2 * 60,
81
+ EAT: 3 * 60,
82
+ // Asia
83
+ IST: 5.5 * 60, // India
84
+ PKT: 5 * 60,
85
+ BST: 6 * 60, // Bangladesh
86
+ NPT: 5.75 * 60,
87
+ MYT: 8 * 60,
88
+ THA: 7 * 60,
89
+ ICT: 7 * 60,
90
+ WIB: 7 * 60,
91
+ WITA: 8 * 60,
92
+ WIT: 9 * 60,
93
+ SGT: 8 * 60,
94
+ CST_CHINA: 8 * 60,
95
+ JST: 9 * 60,
96
+ KST: 9 * 60,
97
+ IRKT: 8 * 60,
98
+ IRKT_DST: 9 * 60,
99
+ // Australia & Oceania
100
+ AEST: 10 * 60,
101
+ AEDT: 11 * 60,
102
+ ACST: 9.5 * 60,
103
+ ACDT: 10.5 * 60,
104
+ AWST: 8 * 60,
105
+ NZST: 12 * 60,
106
+ NZDT: 13 * 60,
107
+ CHAST: 12.75 * 60,
108
+ 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,
124
+ // Antarctica (used in research stations)
125
+ ROTT: -3 * 60,
126
+ 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,
184
+ };
@@ -1,4 +1,5 @@
1
- import type { Time } from './types';
1
+ import type { Numeric } from '../types';
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.
4
5
  *
@@ -6,4 +7,20 @@ import type { Time } from './types';
6
7
  * @returns `true` if the value is a valid time string, `false` otherwise.
7
8
  */
8
9
  export declare function isValidTime(value: unknown): value is Time;
10
+ /**
11
+ * * Checks if the provided value is a valid UTCOffSet (e.g. `UTC-01:30`).
12
+ *
13
+ * @param value - The value to check.
14
+ * @returns `true` if the value is a valid utc offset, `false` otherwise.
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;
9
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,MAAM,SAAS,CAAC;AAEpC;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAWzD"}
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"}
@@ -16,3 +16,26 @@ export function isValidTime(value) {
16
16
  const minute = Number(minuteStr);
17
17
  return hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59;
18
18
  }
19
+ /**
20
+ * * Checks if the provided value is a valid UTCOffSet (e.g. `UTC-01:30`).
21
+ *
22
+ * @param value - The value to check.
23
+ * @returns `true` if the value is a valid utc offset, `false` otherwise.
24
+ */
25
+ export function isValidUTCOffSet(value) {
26
+ if (!isString(value))
27
+ return false;
28
+ return /^UTC[+-]?\d{1,2}:\d{2}$/.test(value);
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
+ }
@@ -1,4 +1,4 @@
1
- import type { DATE_FORMATS, DAY_FORMATS, HOUR_FORMATS, MILLISECOND_FORMATS, MINUTE_FORMATS, MONTH_FORMATS, SECOND_FORMATS, TIME_FORMATS, YEAR_FORMATS } from './constants';
1
+ import type { DATE_FORMATS, DAY_FORMATS, HOUR_FORMATS, MILLISECOND_FORMATS, MINUTE_FORMATS, MONTH_FORMATS, SECOND_FORMATS, TIME_FORMATS, TIME_ZONES, YEAR_FORMATS } from './constants';
2
2
  /** - Minute in numeric string from `00` to `23` */
3
3
  export type Hours = '00' | '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23';
4
4
  /** - Minute in numeric string from `00` to `59` */
@@ -47,4 +47,9 @@ export type Second = (typeof SECOND_FORMATS)[number];
47
47
  export type Millisecond = (typeof MILLISECOND_FORMATS)[number];
48
48
  export type TimeFormats = (typeof TIME_FORMATS)[number];
49
49
  export type ChronosFormat = Year | Month | Day | Date | Hour | Minute | Second | Millisecond | TimeFormats;
50
+ export type TimeZone = keyof typeof TIME_ZONES;
51
+ export type PositiveUTCHour = '+00' | '+01' | '+02' | '+03' | '+04' | '+05' | '+06' | '+07' | '+08' | '+09' | '+10' | '+11' | '+12' | '+13' | '+14';
52
+ export type NegativeUTCHour = '-01' | '-02' | '-03' | '-04' | '-05' | '-06' | '-07' | '-08' | '-09' | '-10' | '-11' | '-12';
53
+ export type UTCMinute = '00' | '15' | '30' | '45';
54
+ export type UTCOffSet = `UTC${PositiveUTCHour | NegativeUTCHour}:${UTCMinute}`;
50
55
  //# 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,YAAY,EACZ,MAAM,aAAa,CAAC;AAErB,mDAAmD;AACnD,MAAM,MAAM,KAAK,GACd,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAER,mDAAmD;AACnD,MAAM,MAAM,OAAO,GAChB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,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AAC,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,5 +1,5 @@
1
1
  import { Chronos } from './Chronos';
2
- import type { Time } from './types';
2
+ import type { Time, UTCOffSet } from './types';
3
3
  /**
4
4
  * * Extracts the hour and minute from a time string in `HH:MM` format.
5
5
  *
@@ -32,4 +32,18 @@ export declare function getCurrentDateTime(): Date;
32
32
  * @returns A new Chronos object representing the provided date.
33
33
  */
34
34
  export declare function chronos(date?: number | string | Date | Chronos): Chronos;
35
+ /**
36
+ * * Extract Time in `HH:MM` format from given UTC value.
37
+ *
38
+ * @param utc UTC value in `UTC-01:30` or `UTC+01:30` format.
39
+ * @returns The UTC value in `HH:MM` format.
40
+ */
41
+ export declare function extractTimeFromUTC(utc: UTCOffSet): Time;
42
+ /**
43
+ * * Converts a UTC value in `UTC-01:30` or `UTC+01:30` format into total minutes in number.
44
+ *
45
+ * @param time - UTC value in `UTC-01:30` or `UTC+01:30` format.
46
+ * @returns The total minutes elapsed since `00:00`.
47
+ */
48
+ export declare function extractMinutesFromUTC(utc: UTCOffSet): number;
35
49
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/date/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAI9D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAIlD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,WAE9D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/date/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAI9D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAIlD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,WAE9D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAE5D"}
@@ -41,3 +41,21 @@ export function getCurrentDateTime() {
41
41
  export function chronos(date) {
42
42
  return new Chronos(date);
43
43
  }
44
+ /**
45
+ * * Extract Time in `HH:MM` format from given UTC value.
46
+ *
47
+ * @param utc UTC value in `UTC-01:30` or `UTC+01:30` format.
48
+ * @returns The UTC value in `HH:MM` format.
49
+ */
50
+ export function extractTimeFromUTC(utc) {
51
+ return utc.replace(/^UTC[+-]?/g, '');
52
+ }
53
+ /**
54
+ * * Converts a UTC value in `UTC-01:30` or `UTC+01:30` format into total minutes in number.
55
+ *
56
+ * @param time - UTC value in `UTC-01:30` or `UTC+01:30` format.
57
+ * @returns The total minutes elapsed since `00:00`.
58
+ */
59
+ export function extractMinutesFromUTC(utc) {
60
+ return getTotalMinutes(extractTimeFromUTC(utc));
61
+ }
package/dist/index.d.ts CHANGED
@@ -14,9 +14,9 @@ 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 } 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
- export { chronos, chronos as chronosjs, chronos as chronosts, chronos as chronus, chronos as chronusjs, chronos as chronusts, extractHourMinute, getCurrentDateTime, getCurrentDateTime as getCurrentTime, getTotalMinutes, } from './date/utils';
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';
21
21
  export { sortAnArray } from './array/sort';
22
22
  export { createOptionsArray, moveArrayElement, removeDuplicatesFromArray, rotateArray, splitArray, } from './array/transform';
@@ -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;AAEpD,OAAO,EACN,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,iBAAiB,EACjB,aAAa,EACb,WAAW,E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AAI,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,9 +18,9 @@ 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 } 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
- export { chronos, chronos as chronosjs, chronos as chronosts, chronos as chronus, chronos as chronusjs, chronos as chronusts, extractHourMinute, getCurrentDateTime, getCurrentDateTime as getCurrentTime, getTotalMinutes, } from './date/utils';
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
25
25
  export { filterArrayOfObjects, flattenArray, getLastArrayElement, isInvalidOrEmptyArray, isInvalidOrEmptyArray as isValidEmptyArray, shuffleArray, } from './array/basics';
26
26
  export { sortAnArray } from './array/sort';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhb-toolbox",
3
- "version": "3.5.0",
3
+ "version": "3.5.15",
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",