@trackunit/react-date-and-time-hooks 2.17.27 → 2.17.30
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 +14 -0
- package/index.esm.js +14 -0
- package/package.json +6 -6
- package/migrations/entry.js.map +0 -1
package/index.cjs.js
CHANGED
|
@@ -467,6 +467,14 @@ const useDateAndTime = () => {
|
|
|
467
467
|
const dayName = react.useCallback((date, format) => {
|
|
468
468
|
return dateAndTimeUtils.dayNameUtil(date, format, currentLocale);
|
|
469
469
|
}, [currentLocale]);
|
|
470
|
+
/**
|
|
471
|
+
* Returns the names of the days of the week, Sunday to Saturday.
|
|
472
|
+
* The index matches `Date.prototype.getDay()` (0 = Sunday), not the locale's first day of the week.
|
|
473
|
+
* For a Temporal `dayOfWeek` (1 = Monday ... 7 = Sunday), use `days()[dayOfWeek % 7]`.
|
|
474
|
+
*
|
|
475
|
+
* @param {TemporalFormatStyle} [format]
|
|
476
|
+
* @returns {Array<string>}
|
|
477
|
+
*/
|
|
470
478
|
const days = react.useCallback((format) => {
|
|
471
479
|
return dateAndTimeUtils.daysUtil(format, currentLocale);
|
|
472
480
|
}, [currentLocale]);
|
|
@@ -480,6 +488,12 @@ const useDateAndTime = () => {
|
|
|
480
488
|
const monthName = react.useCallback((date, format) => {
|
|
481
489
|
return dateAndTimeUtils.monthNameUtil(date, format, currentLocale);
|
|
482
490
|
}, [currentLocale]);
|
|
491
|
+
/**
|
|
492
|
+
* Returns the names of the Gregorian months, January to December, regardless of the locale's default calendar.
|
|
493
|
+
*
|
|
494
|
+
* @param {TemporalFormatStyle} [format]
|
|
495
|
+
* @returns {Array<string>}
|
|
496
|
+
*/
|
|
483
497
|
const months = react.useCallback((format) => {
|
|
484
498
|
return dateAndTimeUtils.monthsUtil(format, currentLocale);
|
|
485
499
|
}, [currentLocale]);
|
package/index.esm.js
CHANGED
|
@@ -465,6 +465,14 @@ const useDateAndTime = () => {
|
|
|
465
465
|
const dayName = useCallback((date, format) => {
|
|
466
466
|
return dayNameUtil(date, format, currentLocale);
|
|
467
467
|
}, [currentLocale]);
|
|
468
|
+
/**
|
|
469
|
+
* Returns the names of the days of the week, Sunday to Saturday.
|
|
470
|
+
* The index matches `Date.prototype.getDay()` (0 = Sunday), not the locale's first day of the week.
|
|
471
|
+
* For a Temporal `dayOfWeek` (1 = Monday ... 7 = Sunday), use `days()[dayOfWeek % 7]`.
|
|
472
|
+
*
|
|
473
|
+
* @param {TemporalFormatStyle} [format]
|
|
474
|
+
* @returns {Array<string>}
|
|
475
|
+
*/
|
|
468
476
|
const days = useCallback((format) => {
|
|
469
477
|
return daysUtil(format, currentLocale);
|
|
470
478
|
}, [currentLocale]);
|
|
@@ -478,6 +486,12 @@ const useDateAndTime = () => {
|
|
|
478
486
|
const monthName = useCallback((date, format) => {
|
|
479
487
|
return monthNameUtil(date, format, currentLocale);
|
|
480
488
|
}, [currentLocale]);
|
|
489
|
+
/**
|
|
490
|
+
* Returns the names of the Gregorian months, January to December, regardless of the locale's default calendar.
|
|
491
|
+
*
|
|
492
|
+
* @param {TemporalFormatStyle} [format]
|
|
493
|
+
* @returns {Array<string>}
|
|
494
|
+
*/
|
|
481
495
|
const months = useCallback((format) => {
|
|
482
496
|
return monthsUtil(format, currentLocale);
|
|
483
497
|
}, [currentLocale]);
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-date-and-time-hooks",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.30",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/date-and-time-utils": "1.20.
|
|
11
|
-
"@trackunit/iris-app-runtime-core-api": "1.27.
|
|
12
|
-
"@trackunit/shared-utils": "1.22.
|
|
13
|
-
"@trackunit/react-core-hooks": "1.31.
|
|
10
|
+
"@trackunit/date-and-time-utils": "1.20.35",
|
|
11
|
+
"@trackunit/iris-app-runtime-core-api": "1.27.25",
|
|
12
|
+
"@trackunit/shared-utils": "1.22.34",
|
|
13
|
+
"@trackunit/react-core-hooks": "1.31.26"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@trackunit/react-core-contexts-test": "1.28.
|
|
16
|
+
"@trackunit/react-core-contexts-test": "1.28.25"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": "^19.0.0"
|
package/migrations/entry.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/react/date-and-time-hooks/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
|