nhb-toolbox 3.5.25 → 3.6.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.
@@ -1,4 +1,4 @@
1
- import type { FormatOptions, TimeZone, UTCOffSet } from './types';
1
+ import type { FormatOptions, TimeUnit, TimeZone, UTCOffSet } from './types';
2
2
  export declare class Chronos {
3
3
  #private;
4
4
  /**
@@ -81,16 +81,6 @@ export declare class Chronos {
81
81
  * @returns A new `Chronos` instance with the updated date.
82
82
  */
83
83
  subtractDays(days: number): Chronos;
84
- /**
85
- * * Determines if the given date is today, tomorrow, yesterday or any relative day.
86
- * @param date - The date to compare (Date object).
87
- * @returns
88
- * - `-1` if the date is yesterday.
89
- * - `0` if the date is today.
90
- * - `1` if the date is tomorrow.
91
- * - Other positive or negative numbers for other relative days (e.g., `-2` for two days ago, `2` for two days ahead).
92
- */
93
- getRelativeDay(): number;
94
84
  /**
95
85
  * * Checks if the year is a leap year.
96
86
  * - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
@@ -105,5 +95,68 @@ export declare class Chronos {
105
95
  * @returns A new instance of `Chronos` with time in the given timezone. Invalid input sets time-zone to `UTC`.
106
96
  */
107
97
  timeZone(zone: TimeZone | UTCOffSet): Chronos;
98
+ /** - Checks if the current date is today. */
99
+ isToday(): boolean;
100
+ /** - Checks if the current date is tomorrow. */
101
+ isTomorrow(): boolean;
102
+ /** - Checks if the current date is yesterday. */
103
+ isYesterday(): boolean;
104
+ /**
105
+ * * Returns full time difference from now (or specified time) in years, months, days, hours, minutes, and seconds.
106
+ * @param time An optional time value (`number`, `string`, `Date`, or `Chronos` object).
107
+ * @returns The difference as string, e.g., `2 years 1 month 9 days 18 hours 56 minutes 9 seconds ago`.
108
+ */
109
+ fromNow(time?: string | number | Date | Chronos): string;
110
+ /**
111
+ * * Returns the number of full years between the input date and now.
112
+ * @param time Optional time to compare with the date/time.
113
+ * @returns The difference in number.
114
+ */
115
+ getRelativeYear(time?: string | number | Date | Chronos): number;
116
+ /**
117
+ * * Returns the number of full months between the input date and now.
118
+ * @param time Optional time to compare with the date/time.
119
+ * @returns The difference in number.
120
+ */
121
+ getRelativeMonth(time?: string | number | Date | Chronos): number;
122
+ /**
123
+ * * Determines if the given date is today, tomorrow, yesterday or any relative day.
124
+ * @param date - The date to compare (Date object).
125
+ * @param time Optional time to compare with the date/time.
126
+ * @returns
127
+ * - `-1` if the date is yesterday.
128
+ * - `0` if the date is today.
129
+ * - `1` if the date is tomorrow.
130
+ * - Other positive or negative numbers for other relative days (e.g., `-2` for two days ago, `2` for two days ahead).
131
+ */
132
+ getRelativeDay(time?: string | number | Date | Chronos): number;
133
+ /**
134
+ * * Returns the number of full hours between the input date and now.
135
+ * @param time Optional time to compare with the date/time.
136
+ * @returns The difference in number.
137
+ */
138
+ getRelativeHour(time?: string | number | Date | Chronos): number;
139
+ /**
140
+ * * Returns the number of full minutes between the input date and now.
141
+ * @param time Optional time to compare with the date/time.
142
+ * @returns The difference in number.
143
+ */
144
+ getRelativeMinute(time?: string | number | Date | Chronos): number;
145
+ /**
146
+ * * Returns the number of full seconds between the input date and now.
147
+ * @param time Optional time to compare with the date/time.
148
+ * @returns The difference in number.
149
+ */
150
+ getRelativeSecond(time?: string | number | Date | Chronos): number;
151
+ /** * Returns the number of milliseconds between the input date and now. */
152
+ getRelativeMilliSecond(time?: string | number | Date | Chronos): number;
153
+ /**
154
+ * * Compares the stored date with now, returning the difference in the specified unit.
155
+ *
156
+ * @param unit The time unit to compare by. Defaults to 'minute'.
157
+ * @param time Optional time to compare with the date/time.
158
+ * @returns The difference in number.
159
+ */
160
+ compare(unit?: TimeUnit, time?: string | number | Date | Chronos): number;
108
161
  }
109
162
  //# sourceMappingURL=Chronos.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chronos.d.ts","sourceRoot":"","sources":["../../src/date/Chronos.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEX,aAAa,EACb,QAAQ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,GAAE,QAAmB,EACzB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,GACrC,MAAM;CAoBT"}
@@ -14,13 +14,7 @@ export class Chronos {
14
14
  * - If a Chronos object is provided, it will be converted to a Date object.
15
15
  */
16
16
  constructor(value) {
17
- const date = value instanceof Chronos ?
18
- value.toDate()
19
- : new Date(value ?? Date.now());
20
- // Check if the date is invalid
21
- if (isNaN(date.getTime())) {
22
- throw new Error('Provided date is invalid!');
23
- }
17
+ const date = this.#toNewDate(value);
24
18
  this.#date = date;
25
19
  // this.preview = this.toISOString();
26
20
  }
@@ -99,6 +93,16 @@ export class Chronos {
99
93
  static now() {
100
94
  return Date.now();
101
95
  }
96
+ #toNewDate(value) {
97
+ const date = value instanceof Chronos ?
98
+ value.toDate()
99
+ : new Date(value ?? Date.now());
100
+ // Check if the date is invalid
101
+ if (isNaN(date.getTime())) {
102
+ throw new Error('Provided date is invalid!');
103
+ }
104
+ return date;
105
+ }
102
106
  /**
103
107
  * @private Formats the current `Chronos` date using the specified template.
104
108
  *
@@ -209,26 +213,6 @@ export class Chronos {
209
213
  subtractDays(days) {
210
214
  return this.addDays(-days);
211
215
  }
212
- /**
213
- * * Determines if the given date is today, tomorrow, yesterday or any relative day.
214
- * @param date - The date to compare (Date object).
215
- * @returns
216
- * - `-1` if the date is yesterday.
217
- * - `0` if the date is today.
218
- * - `1` if the date is tomorrow.
219
- * - Other positive or negative numbers for other relative days (e.g., `-2` for two days ago, `2` for two days ahead).
220
- */
221
- getRelativeDay() {
222
- const today = new Date();
223
- // Set the time of today to 00:00:00 for comparison purposes
224
- today.setHours(0, 0, 0, 0);
225
- // Normalize the input date to 00:00:00
226
- const inputDate = new Date(this.#date);
227
- inputDate.setHours(0, 0, 0, 0);
228
- const diffTime = inputDate.getTime() - today.getTime();
229
- const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
230
- return diffDays;
231
- }
232
216
  /**
233
217
  * * Checks if the year is a leap year.
234
218
  * - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
@@ -257,4 +241,180 @@ export class Chronos {
257
241
  const adjusted = new Date(utc + offset * 60 * 1000);
258
242
  return new Chronos(adjusted);
259
243
  }
244
+ /** - Checks if the current date is today. */
245
+ isToday() {
246
+ return this.getRelativeDay() === 0;
247
+ }
248
+ /** - Checks if the current date is tomorrow. */
249
+ isTomorrow() {
250
+ return this.getRelativeDay() === 1;
251
+ }
252
+ /** - Checks if the current date is yesterday. */
253
+ isYesterday() {
254
+ return this.getRelativeDay() === -1;
255
+ }
256
+ /**
257
+ * * Returns full time difference from now (or specified time) in years, months, days, hours, minutes, and seconds.
258
+ * @param time An optional time value (`number`, `string`, `Date`, or `Chronos` object).
259
+ * @returns The difference as string, e.g., `2 years 1 month 9 days 18 hours 56 minutes 9 seconds ago`.
260
+ */
261
+ fromNow(time) {
262
+ const now = this.#toNewDate(time);
263
+ const target = this.#date;
264
+ const isFuture = target > now;
265
+ const from = isFuture ? now : target;
266
+ const to = isFuture ? target : now;
267
+ let years = to.getFullYear() - from.getFullYear();
268
+ let months = to.getMonth() - from.getMonth();
269
+ let days = to.getDate() - from.getDate();
270
+ let hours = to.getHours() - from.getHours();
271
+ let minutes = to.getMinutes() - from.getMinutes();
272
+ let seconds = to.getSeconds() - from.getSeconds();
273
+ // Adjust negative values
274
+ if (seconds < 0) {
275
+ seconds += 60;
276
+ minutes--;
277
+ }
278
+ if (minutes < 0) {
279
+ minutes += 60;
280
+ hours--;
281
+ }
282
+ if (hours < 0) {
283
+ hours += 24;
284
+ days--;
285
+ }
286
+ if (days < 0) {
287
+ const prevMonth = new Date(to.getFullYear(), to.getMonth(), 0);
288
+ days += prevMonth.getDate();
289
+ months--;
290
+ }
291
+ if (months < 0) {
292
+ months += 12;
293
+ years--;
294
+ }
295
+ const parts = [];
296
+ if (years > 0)
297
+ parts.push(`${years} year${years > 1 ? 's' : ''}`);
298
+ if (months > 0)
299
+ parts.push(`${months} month${months > 1 ? 's' : ''}`);
300
+ if (days > 0)
301
+ parts.push(`${days} day${days > 1 ? 's' : ''}`);
302
+ if (hours > 0)
303
+ parts.push(`${hours} hour${hours > 1 ? 's' : ''}`);
304
+ if (minutes > 0)
305
+ parts.push(`${minutes} minute${minutes > 1 ? 's' : ''}`);
306
+ if (seconds > 0 || parts.length === 0)
307
+ parts.push(`${seconds} second${seconds !== 1 ? 's' : ''}`);
308
+ return `${isFuture ? 'in ' : ''}${parts.join(' ')}${isFuture ? '' : ' ago'}`;
309
+ }
310
+ /**
311
+ * * Returns the number of full years between the input date and now.
312
+ * @param time Optional time to compare with the date/time.
313
+ * @returns The difference in number.
314
+ */
315
+ getRelativeYear(time) {
316
+ const now = this.#toNewDate(time);
317
+ let years = this.#date.getFullYear() - now.getFullYear();
318
+ const noYearMonthDay = now.getMonth() < this.#date.getMonth() ||
319
+ (now.getMonth() === this.#date.getMonth() &&
320
+ now.getDate() < this.#date.getDate());
321
+ if (noYearMonthDay) {
322
+ years--;
323
+ }
324
+ return years;
325
+ }
326
+ /**
327
+ * * Returns the number of full months between the input date and now.
328
+ * @param time Optional time to compare with the date/time.
329
+ * @returns The difference in number.
330
+ */
331
+ getRelativeMonth(time) {
332
+ const now = this.#toNewDate(time);
333
+ let months = (this.#date.getFullYear() - now.getFullYear()) * 12 +
334
+ (this.#date.getMonth() - now.getMonth());
335
+ const hasNotHadMonthDay = now.getDate() < this.#date.getDate();
336
+ if (hasNotHadMonthDay) {
337
+ months--;
338
+ }
339
+ return months;
340
+ }
341
+ /**
342
+ * * Determines if the given date is today, tomorrow, yesterday or any relative day.
343
+ * @param date - The date to compare (Date object).
344
+ * @param time Optional time to compare with the date/time.
345
+ * @returns
346
+ * - `-1` if the date is yesterday.
347
+ * - `0` if the date is today.
348
+ * - `1` if the date is tomorrow.
349
+ * - Other positive or negative numbers for other relative days (e.g., `-2` for two days ago, `2` for two days ahead).
350
+ */
351
+ getRelativeDay(time) {
352
+ const today = this.#toNewDate(time);
353
+ // Set the time of today to 00:00:00 for comparison purposes
354
+ today.setHours(0, 0, 0, 0);
355
+ // Normalize the input date to 00:00:00
356
+ const inputDate = new Date(this.#date);
357
+ inputDate.setHours(0, 0, 0, 0);
358
+ const diffTime = inputDate.getTime() - today.getTime();
359
+ const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
360
+ return diffDays;
361
+ }
362
+ /**
363
+ * * Returns the number of full hours between the input date and now.
364
+ * @param time Optional time to compare with the date/time.
365
+ * @returns The difference in number.
366
+ */
367
+ getRelativeHour(time) {
368
+ const diff = this.#date.getTime() - this.#toNewDate(time).getTime();
369
+ return Math.floor(diff / (1000 * 60 * 60));
370
+ }
371
+ /**
372
+ * * Returns the number of full minutes between the input date and now.
373
+ * @param time Optional time to compare with the date/time.
374
+ * @returns The difference in number.
375
+ */
376
+ getRelativeMinute(time) {
377
+ const diff = this.#date.getTime() - this.#toNewDate(time).getTime();
378
+ return Math.floor(diff / (1000 * 60));
379
+ }
380
+ /**
381
+ * * Returns the number of full seconds between the input date and now.
382
+ * @param time Optional time to compare with the date/time.
383
+ * @returns The difference in number.
384
+ */
385
+ getRelativeSecond(time) {
386
+ const diff = this.#date.getTime() - this.#toNewDate(time).getTime();
387
+ return Math.floor(diff / 1000);
388
+ }
389
+ /** * Returns the number of milliseconds between the input date and now. */
390
+ getRelativeMilliSecond(time) {
391
+ return this.#date.getTime() - this.#toNewDate(time).getTime();
392
+ }
393
+ /**
394
+ * * Compares the stored date with now, returning the difference in the specified unit.
395
+ *
396
+ * @param unit The time unit to compare by. Defaults to 'minute'.
397
+ * @param time Optional time to compare with the date/time.
398
+ * @returns The difference in number.
399
+ */
400
+ compare(unit = 'minute', time) {
401
+ switch (unit) {
402
+ case 'year':
403
+ return this.getRelativeYear(time);
404
+ case 'month':
405
+ return this.getRelativeMonth(time);
406
+ case 'day':
407
+ return this.getRelativeDay(time);
408
+ case 'hour':
409
+ return this.getRelativeHour(time);
410
+ case 'minute':
411
+ return this.getRelativeMinute(time);
412
+ case 'second':
413
+ return this.getRelativeSecond(time);
414
+ case 'millisecond':
415
+ return this.getRelativeMilliSecond(time);
416
+ default:
417
+ throw new Error(`Unsupported time unit: ${unit}`);
418
+ }
419
+ }
260
420
  }
@@ -36,7 +36,7 @@ export interface GreetingConfigs {
36
36
  /** Default greeting message if no period matches. */
37
37
  defaultMessage?: string;
38
38
  }
39
- export type FormatType = 'year' | 'month' | 'day' | 'date' | 'hour' | 'minute' | 'second' | 'millisecond';
39
+ export type TimeUnit = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond';
40
40
  export type Year = (typeof YEAR_FORMATS)[number];
41
41
  export type Month = (typeof MONTH_FORMATS)[number];
42
42
  export type Day = (typeof DAY_FORMATS)[number];
@@ -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,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,IAA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AAe,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,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;AAE/E,uBAAuB;AACvB,MAAM,WAAW,aAAa;IAC7B,+GAA+G;IAC/G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB"}
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,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;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tB,IAAI,GACJ,KAAK,GACL,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,MAAM,GACN,WAAW,GACX,WAAW,CAAC;AAKf,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,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;AAE/E,uBAAuB;AACvB,MAAM,WAAW,aAAa;IAC7B,+GAA+G;IAC/G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhb-toolbox",
3
- "version": "3.5.25",
3
+ "version": "3.6.1",
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",