date-vir 7.4.1 → 7.4.3
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/dist/date-operations/combine-dates.js +3 -3
- package/dist/date-operations/date-position.d.ts +22 -22
- package/dist/date-operations/date-position.js +17 -17
- package/dist/duration-shape.d.ts +1 -5
- package/dist/duration-shape.js +3 -3
- package/dist/formatting/string-format-types.d.ts +1 -1
- package/dist/formatting/string-format-types.js +6 -6
- package/dist/full-date/create-full-date.js +1 -1
- package/dist/full-date/full-date-shape.d.ts +23 -972
- package/dist/full-date/full-date-shape.js +9 -9
- package/package.json +11 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dayOfMonthBounds, hourBounds, millisecondsBounds, minuteBounds, monthNumberBounds, secondBounds, } from '@date-vir/duration';
|
|
2
|
-
import {
|
|
2
|
+
import { defineShape, enumShape, intersectShape, rangeShape } from 'object-shape-tester';
|
|
3
3
|
import { Timezone, utcTimezone } from '../timezone/timezones.js';
|
|
4
4
|
/**
|
|
5
5
|
* Time part of {@link FullDate} represented in a shape definition.
|
|
@@ -8,13 +8,13 @@ import { Timezone, utcTimezone } from '../timezone/timezones.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export const timePartShape = defineShape({
|
|
10
10
|
/** Hour of the day in 24 time: 0-23 */
|
|
11
|
-
hour:
|
|
11
|
+
hour: rangeShape({ ...hourBounds, default: hourBounds.min }),
|
|
12
12
|
/** Minute of the hour: 0-59 */
|
|
13
|
-
minute:
|
|
13
|
+
minute: rangeShape({ ...minuteBounds, default: minuteBounds.min }),
|
|
14
14
|
/** Second of the minute: 0-59 */
|
|
15
|
-
second:
|
|
15
|
+
second: rangeShape({ ...secondBounds, default: secondBounds.min }),
|
|
16
16
|
/** Millisecond of the second: 0-999 */
|
|
17
|
-
millisecond:
|
|
17
|
+
millisecond: rangeShape({ ...millisecondsBounds, default: millisecondsBounds.min }),
|
|
18
18
|
/** The timezone that this date/time is meant for / originated from. */
|
|
19
19
|
timezone: enumShape(Timezone, utcTimezone),
|
|
20
20
|
});
|
|
@@ -31,15 +31,15 @@ export const datePartShape = defineShape({
|
|
|
31
31
|
*/
|
|
32
32
|
year: 2023,
|
|
33
33
|
/** A month of the year: 1-12 */
|
|
34
|
-
month:
|
|
34
|
+
month: rangeShape({ ...monthNumberBounds, default: monthNumberBounds.min }),
|
|
35
35
|
/** A day of the month: 1-31 depending on the month */
|
|
36
|
-
day:
|
|
36
|
+
day: rangeShape({ ...dayOfMonthBounds, default: dayOfMonthBounds.min }),
|
|
37
37
|
/** The timezone that this date/time is meant for / originated from. */
|
|
38
|
-
timezone: utcTimezone,
|
|
38
|
+
timezone: enumShape(Timezone, utcTimezone),
|
|
39
39
|
});
|
|
40
40
|
/**
|
|
41
41
|
* The complete {@link FullDate} represented in a shape definition.
|
|
42
42
|
*
|
|
43
43
|
* @category Shape
|
|
44
44
|
*/
|
|
45
|
-
export const fullDateShape = defineShape(
|
|
45
|
+
export const fullDateShape = defineShape(intersectShape(datePartShape, timePartShape));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "date-vir",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.3",
|
|
4
4
|
"description": "Easy and explicit dates and times.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"date",
|
|
@@ -34,26 +34,26 @@
|
|
|
34
34
|
"test:docs": "virmator docs check"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@augment-vir/assert": "^31.
|
|
38
|
-
"@augment-vir/common": "^31.
|
|
39
|
-
"@date-vir/duration": "^7.4.
|
|
37
|
+
"@augment-vir/assert": "^31.40.0",
|
|
38
|
+
"@augment-vir/common": "^31.40.0",
|
|
39
|
+
"@date-vir/duration": "^7.4.3",
|
|
40
40
|
"@types/luxon": "^3.7.1",
|
|
41
|
-
"luxon": "^3.7.
|
|
42
|
-
"object-shape-tester": "^
|
|
43
|
-
"type-fest": "^
|
|
41
|
+
"luxon": "^3.7.2",
|
|
42
|
+
"object-shape-tester": "^6.9.2",
|
|
43
|
+
"type-fest": "^5.0.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@augment-vir/test": "^31.
|
|
46
|
+
"@augment-vir/test": "^31.40.0",
|
|
47
47
|
"@web/dev-server-esbuild": "^1.0.4",
|
|
48
48
|
"@web/test-runner": "^0.20.2",
|
|
49
49
|
"@web/test-runner-commands": "^0.9.0",
|
|
50
50
|
"@web/test-runner-playwright": "^0.11.1",
|
|
51
51
|
"@web/test-runner-visual-regression": "^0.10.0",
|
|
52
|
-
"element-vir": "^26.
|
|
52
|
+
"element-vir": "^26.10.0",
|
|
53
53
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
54
54
|
"markdown-code-example-inserter": "^3.0.3",
|
|
55
|
-
"typedoc": "^0.28.
|
|
56
|
-
"typescript": "^5.9.
|
|
55
|
+
"typedoc": "^0.28.13",
|
|
56
|
+
"typescript": "^5.9.3"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=22"
|