@trackunit/react-date-and-time-hooks 0.0.121 → 0.0.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -421,7 +421,7 @@ const useDateAndTime = () => {
421
421
  /**
422
422
  * Returns a duration from a number
423
423
  *
424
- * @param {Duration} from
424
+ * @param {number | Intl.Duration}
425
425
  * @param {TemporalDurationType} type
426
426
  * @param {TemporalFormat["dayFormat"]} format
427
427
  * @example type: "hours", { hours: 230, minutes: 27 } = 230 hours, 27 minutes
package/index.esm.js CHANGED
@@ -419,7 +419,7 @@ const useDateAndTime = () => {
419
419
  /**
420
420
  * Returns a duration from a number
421
421
  *
422
- * @param {Duration} from
422
+ * @param {number | Intl.Duration}
423
423
  * @param {TemporalDurationType} type
424
424
  * @param {TemporalFormat["dayFormat"]} format
425
425
  * @example type: "hours", { hours: 230, minutes: 27 } = 230 hours, 27 minutes
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@trackunit/react-date-and-time-hooks",
3
- "version": "0.0.121",
3
+ "version": "0.0.123",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=20.x"
8
8
  },
9
9
  "dependencies": {
10
- "date-fns": "^2.30.0",
11
10
  "@graphql-codegen/cli": "^5.0.0",
12
11
  "@trackunit/iris-app-build-utilities": "*",
13
12
  "@graphql-typed-document-node/core": "^3.2.0",
@@ -1,5 +1,4 @@
1
1
  import { DateRange, TemporalDate, TemporalFormat, TemporalFormatStyle } from "@trackunit/date-and-time-utils";
2
- import { Duration } from "date-fns";
3
2
  type TemporalTypes = "second" | "seconds" | "minute" | "minutes" | "hour" | "hours" | "day" | "days" | "week" | "weeks" | "month" | "months" | "year" | "years";
4
3
  export type TemporalArithmeticType = Extract<TemporalTypes, "hours" | "minutes" | "days" | "weeks" | "months" | "years">;
5
4
  export type TemporalEdgeOfType = Extract<TemporalTypes, "hour" | "minute" | "day" | "week" | "month">;
@@ -25,7 +24,7 @@ export declare const useDateAndTime: () => {
25
24
  difference: (from: TemporalDate, to: TemporalDate, type: TemporalDifferenceType) => number;
26
25
  since: (from: TemporalDate, to: TemporalDate, type: TemporalSinceType) => string;
27
26
  same: (date: TemporalDate, type: TemporalSameType) => boolean;
28
- duration: (from: number | Duration, type: TemporalDurationType, format?: TemporalFormat["dayFormat"], roundAt?: TemporalTimeRounding) => string;
27
+ duration: (from: number | Intl.Duration, type: TemporalDurationType, format?: TemporalFormat["dayFormat"], roundAt?: TemporalTimeRounding) => string;
29
28
  dateIs: (date: TemporalDate, type: TemporalIsType, betweenDates?: DateRange) => boolean;
30
29
  isEqual: (from: TemporalDate, to: TemporalDate) => boolean;
31
30
  monthName: (date: TemporalDate, format: TemporalFormatStyle) => string;