mhz-helpers 1.1.21 → 1.1.22

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.
@@ -2,7 +2,7 @@ export declare function addZero(value: number): string;
2
2
  export declare function formatDuration(duration?: number, lang?: string): string;
3
3
  export declare function formatDate(dateRaw?: string | Date | null, lang?: string): string;
4
4
  export declare function formatDateTime(dateRaw?: string | Date | null, lang?: string): string;
5
- export declare function subtractDates(dateBig?: string | Date | null, dateSmall?: string | Date | null, isRawResult?: boolean): string | number;
5
+ export declare function subtractDates(dateFuture?: string | Date | null, datePast?: string | Date | null, lang?: string, isRawResult?: boolean): string | number;
6
6
  export interface IDatesGap {
7
7
  dateFrom: Date;
8
8
  dateTo: Date;
package/dist/index.js CHANGED
@@ -2709,10 +2709,10 @@ function ua(t, e) {
2709
2709
  minute: "numeric"
2710
2710
  }).format(new Date(t)) : "-";
2711
2711
  }
2712
- function ca(t, e, n) {
2712
+ function ca(t, e, n, r) {
2713
2713
  if (!t || !e) return "-";
2714
- const r = new Date(t), s = new Date(e), i = Math.floor((r - s) / 1e3);
2715
- return n ? i : Fi(i);
2714
+ const s = new Date(t), i = new Date(e), o = Math.floor((s - i) / 1e3);
2715
+ return r ? o : Fi(o, n);
2716
2716
  }
2717
2717
  function la(t) {
2718
2718
  const n = /* @__PURE__ */ new Date(), r = new Date(n.getTime() - t * 864e5), s = new Date(r.getTime() - 1), i = new Date(s.getTime() - t * 864e5);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mhz-helpers",
3
3
  "description": "Mhz helpers and composables",
4
- "version": "1.1.21",
4
+ "version": "1.1.22",
5
5
  "author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
6
6
  "license": "MIT",
7
7
  "type": "module",