File tree Expand file tree Collapse file tree 1 file changed +0
-8
lines changed Expand file tree Collapse file tree 1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,6 @@ export class IsoDateParts {
1010 static TIMEZONE_REGEX = / ^ ( [ + - ] \d { 2 } ) (?: : ? ( \d { 2 } ) ) ? $ / ;
1111 static IS_FRACTIONAL_REGEX = / ^ \d + [ \. \, ] \d + $ / ;
1212
13- // Unsupported formats https://en.wikipedia.org/wiki/ISO_week_date
14- static DATE_WEEK_REGEX = / ^ ( \d { 4 } ) - W \d { 2 } - ? \d { 0 , 1 } / ;
15- static YEARDAY_REGEX = / ^ ( \d { 4 } ) - ? \d { 3 } $ / ;
16-
1713 static getTimezoneOffset ( offset = "" ) {
1814 if ( offset === "Z" ) {
1915 return this . DEFAULT_TIMEZONE_OFFSET ;
@@ -46,10 +42,6 @@ export class IsoDateParts {
4642 }
4743
4844 static getParts ( str ) {
49- if ( str . match ( this . DATE_WEEK_REGEX ) || str . match ( this . YEARDAY_REGEX ) ) {
50- throw new Error ( `Unsupported date format (unsupported syntax): ${ str } ` ) ;
51- }
52-
5345 let dateMatch = str . match ( this . FULL_DATE_REGEX ) ;
5446 if ( dateMatch ) {
5547 return this . getByDateTime ( dateMatch ) ;
You can’t perform that action at this time.
0 commit comments