We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3475fa commit 5e64065Copy full SHA for 5e64065
parse.js
@@ -45,7 +45,7 @@ export class IsoDateParts {
45
if(!dateTimeMatch) {
46
throw new Error(`Unsupported date format: ${str}`);
47
}
48
- if(dateTimeMatch[4]?.match(this.IS_FRACTIONAL_REGEX) || dateTimeMatch[5]?.match(this.IS_FRACTIONAL_REGEX)) {
+ if(dateTimeMatch.slice(4,6).some(part => !!part?.match(this.IS_FRACTIONAL_REGEX))) {
49
throw new Error(`Unsupported date format (fractional hours or minutes): ${str}`);
50
51
0 commit comments