@trackunit/react-date-and-time-hooks 0.0.193 → 0.0.194

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
@@ -173,8 +173,8 @@ const useDateAndTime = () => {
173
173
  * @param {TemporalFormat} format
174
174
  * @returns {string}
175
175
  */
176
- const formatDate = react.useCallback((date, format, hourCycle) => {
177
- return dateAndTimeUtils.formatDateUtil(date, format, currentTimeZone, currentLocale, hourCycle);
176
+ const formatDate = react.useCallback((date, format) => {
177
+ return dateAndTimeUtils.formatDateUtil(date, format, currentTimeZone, currentLocale);
178
178
  }, [currentLocale, currentTimeZone]);
179
179
  /**
180
180
  * Formats a date using the custom locale and custom timezone.
package/index.esm.js CHANGED
@@ -171,8 +171,8 @@ const useDateAndTime = () => {
171
171
  * @param {TemporalFormat} format
172
172
  * @returns {string}
173
173
  */
174
- const formatDate = useCallback((date, format, hourCycle) => {
175
- return formatDateUtil(date, format, currentTimeZone, currentLocale, hourCycle);
174
+ const formatDate = useCallback((date, format) => {
175
+ return formatDateUtil(date, format, currentTimeZone, currentLocale);
176
176
  }, [currentLocale, currentTimeZone]);
177
177
  /**
178
178
  * Formats a date using the custom locale and custom timezone.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-date-and-time-hooks",
3
- "version": "0.0.193",
3
+ "version": "0.0.194",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -1,4 +1,4 @@
1
- import { DateRange, HourCycle, TemporalDate, TemporalFormat, TemporalFormatStyle } from "@trackunit/date-and-time-utils";
1
+ import { DateRange, TemporalDate, TemporalFormat, TemporalFormatStyle } from "@trackunit/date-and-time-utils";
2
2
  type TemporalTypes = "second" | "seconds" | "minute" | "minutes" | "hour" | "hours" | "day" | "days" | "week" | "weeks" | "month" | "months" | "year" | "years";
3
3
  export type TemporalArithmeticType = Extract<TemporalTypes, "hours" | "minutes" | "days" | "weeks" | "months" | "years">;
4
4
  export type TemporalEdgeOfType = Extract<TemporalTypes, "hour" | "minute" | "day" | "week" | "month">;
@@ -14,7 +14,7 @@ export type TemporalTimeRounding = Extract<TemporalTypes, "hour" | "minute" | "s
14
14
  */
15
15
  export declare const useDateAndTime: () => {
16
16
  nowDate: Date;
17
- formatDate: (date: TemporalDate, format?: TemporalFormat, hourCycle?: HourCycle) => string;
17
+ formatDate: (date: TemporalDate, format?: TemporalFormat) => string;
18
18
  formatDateWithTimezone: (date: TemporalDate, format?: TemporalFormat, timezone?: string, locale?: string) => string;
19
19
  formatRange: (range: DateRange, format?: Intl.DateTimeFormatOptions) => string;
20
20
  startOf: (date: TemporalDate, type: TemporalEdgeOfType) => Date;