@internationalized/date 3.2.1-nightly.3971 → 3.2.1-nightly.3977
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/import.mjs +2 -2
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -2
- package/dist/module.js.map +1 -1
- package/package.json +2 -2
- package/src/string.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internationalized/date",
|
|
3
|
-
"version": "3.2.1-nightly.
|
|
3
|
+
"version": "3.2.1-nightly.3977+e892f4b5a",
|
|
4
4
|
"description": "Internationalized calendar, date, and time manipulation utilities",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "e892f4b5a2a94044c09eb8a9c232268b31344e87"
|
|
31
31
|
}
|
package/src/string.ts
CHANGED
|
@@ -20,8 +20,8 @@ import {Mutable} from './utils';
|
|
|
20
20
|
const TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
|
|
21
21
|
const DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
22
22
|
const DATE_TIME_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
|
|
23
|
-
const ZONED_DATE_TIME_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(
|
|
24
|
-
const ABSOLUTE_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(
|
|
23
|
+
const ZONED_DATE_TIME_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?)?\[(.*?)\]$/;
|
|
24
|
+
const ABSOLUTE_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
|
|
25
25
|
const DATE_TIME_DURATION_RE =
|
|
26
26
|
/^((?<negative>-)|\+)?P((?<years>\d*)Y)?((?<months>\d*)M)?((?<weeks>\d*)W)?((?<days>\d*)D)?((?<time>T)((?<hours>\d*[.,]?\d{1,9})H)?((?<minutes>\d*[.,]?\d{1,9})M)?((?<seconds>\d*[.,]?\d{1,9})S)?)?$/;
|
|
27
27
|
const requiredDurationTimeGroups = ['hours', 'minutes', 'seconds'];
|
|
@@ -238,7 +238,7 @@ export function parseDuration(value: string): Required<DateTimeDuration> {
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
const durationStringIncludesTime = match.groups?.time;
|
|
241
|
-
|
|
241
|
+
|
|
242
242
|
if (durationStringIncludesTime) {
|
|
243
243
|
const hasRequiredDurationTimeGroups = requiredDurationTimeGroups.some(group => match.groups?.[group]);
|
|
244
244
|
if (!hasRequiredDurationTimeGroups) {
|