File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,7 @@ function textToJsonAdapter(text) {
38
38
let value = item . pop ( ) ;
39
39
40
40
if ( isRawDate ( value ) ) {
41
- value = new Date (
42
- Date . UTC ( ...value
41
+ let date = value
43
42
. split ( '-' )
44
43
. map ( ( item , index ) => {
45
44
item = Number ( item ) ;
@@ -52,7 +51,10 @@ function textToJsonAdapter(text) {
52
51
}
53
52
54
53
return item ;
55
- } ) )
54
+ } ) ;
55
+
56
+ value = new Date (
57
+ Date . UTC ( date [ 0 ] , date [ 1 ] , date [ 2 ] )
56
58
) ;
57
59
}
58
60
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class IANAParser {
13
13
return REGISTRY_URL ;
14
14
}
15
15
16
- parser ( ) {
16
+ parse ( ) {
17
17
return parser . apply ( this , arguments ) ;
18
18
}
19
19
@@ -26,7 +26,7 @@ class IANAParser {
26
26
res
27
27
. setEncoding ( "utf8" )
28
28
. on ( 'data' , ( chunk ) => ( body += chunk ) )
29
- . on ( 'end' , ( ) => resolve ( this . parser ( body ) ) )
29
+ . on ( 'end' , ( ) => resolve ( this . parse ( body ) ) )
30
30
;
31
31
32
32
} )
You can’t perform that action at this time.
0 commit comments