File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,10 @@ export class IsoDateParts {
20
20
}
21
21
22
22
let [ hours , minutes ] = [ match [ 1 ] , match [ 2 ] ] ;
23
+ let sign = hours [ 0 ] === '-' ? - 1 : 1 ;
23
24
return {
24
25
hours : parseInt ( hours , 10 ) || 0 ,
25
- minutes : parseInt ( minutes , 10 ) || 0
26
+ minutes : ( parseInt ( minutes , 10 ) || 0 ) * sign
26
27
} ;
27
28
}
28
29
Original file line number Diff line number Diff line change @@ -25,11 +25,13 @@ export const VALID_TEST_CASES = `
25
25
2016-05-25T09+01:00
26
26
2016-05-25T09:24+01:00
27
27
2016-05-25T09:24:15+01:00
28
+ 2016-05-25T09:24:15+01:15
28
29
2016-05-25T09:24:15.123+01:00
29
30
2016-05-25T09:24:15,123+01:00
30
31
2016-05-25T09-01:00
31
32
2016-05-25T09:24-01:00
32
33
2016-05-25T09:24:15-01:00
34
+ 2016-05-25T09:24:15-01:15
33
35
2016-05-25T09:24:15.123-01:00
34
36
2016-05-25T09:24:15,123-01:00
35
37
2016-05-25T09+06:00
@@ -73,8 +75,10 @@ export const VALID_TEST_CASES = `
73
75
// Issue #1
74
76
2016-05-25T09:24:15+06
75
77
2016-05-25T09:24:15+0600
78
+ 2016-05-25T09:24:15+0615
76
79
2016-05-25T09:24:15-06
77
80
2016-05-25T09:24:15-0600
81
+ 2016-05-25T09:24:15-0615
78
82
79
83
// 6 digit years
80
84
+002000-01-01
You can’t perform that action at this time.
0 commit comments