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 {
10
10
static TIMEZONE_REGEX = / ^ ( [ + - ] \d { 2 } ) (?: : ? ( \d { 2 } ) ) ? $ / ;
11
11
static IS_FRACTIONAL_REGEX = / ^ \d + [ \. \, ] \d + $ / ;
12
12
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
-
17
13
static getTimezoneOffset ( offset = "" ) {
18
14
if ( offset === "Z" ) {
19
15
return this . DEFAULT_TIMEZONE_OFFSET ;
@@ -46,10 +42,6 @@ export class IsoDateParts {
46
42
}
47
43
48
44
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
-
53
45
let dateMatch = str . match ( this . FULL_DATE_REGEX ) ;
54
46
if ( dateMatch ) {
55
47
return this . getByDateTime ( dateMatch ) ;
You can’t perform that action at this time.
0 commit comments