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 {
2020 }
2121
2222 let [ hours , minutes ] = [ match [ 1 ] , match [ 2 ] ] ;
23+ let sign = hours [ 0 ] === '-' ? - 1 : 1 ;
2324 return {
2425 hours : parseInt ( hours , 10 ) || 0 ,
25- minutes : parseInt ( minutes , 10 ) || 0
26+ minutes : ( parseInt ( minutes , 10 ) || 0 ) * sign
2627 } ;
2728 }
2829
Original file line number Diff line number Diff line change @@ -25,11 +25,13 @@ export const VALID_TEST_CASES = `
25252016-05-25T09+01:00
26262016-05-25T09:24+01:00
27272016-05-25T09:24:15+01:00
28+ 2016-05-25T09:24:15+01:15
28292016-05-25T09:24:15.123+01:00
29302016-05-25T09:24:15,123+01:00
30312016-05-25T09-01:00
31322016-05-25T09:24-01:00
32332016-05-25T09:24:15-01:00
34+ 2016-05-25T09:24:15-01:15
33352016-05-25T09:24:15.123-01:00
34362016-05-25T09:24:15,123-01:00
35372016-05-25T09+06:00
@@ -73,8 +75,10 @@ export const VALID_TEST_CASES = `
7375// Issue #1
74762016-05-25T09:24:15+06
75772016-05-25T09:24:15+0600
78+ 2016-05-25T09:24:15+0615
76792016-05-25T09:24:15-06
77802016-05-25T09:24:15-0600
81+ 2016-05-25T09:24:15-0615
7882
7983// 6 digit years
8084+002000-01-01
You can’t perform that action at this time.
0 commit comments