@@ -82,6 +82,9 @@ describe('dates', function() {
8282 [ '2014-03-04 08:15:00.00z' , new Date ( 2014 , 2 , 4 , 8 , 15 ) ] ,
8383 [ '2014-03-04 08:15:34+1200' , new Date ( 2014 , 2 , 4 , 8 , 15 , 34 ) ] ,
8484 [ '2014-03-04 08:15:34.567-05:45' , new Date ( 2014 , 2 , 4 , 8 , 15 , 34 , 567 ) ] ,
85+
86+ // iso8601 short time offset
87+ [ '2014-03-04T08:15:34-05' , new Date ( 2014 , 2 , 4 , 8 , 15 , 34 ) ] ,
8588 ] . forEach ( function ( v ) {
8689 // just for sub-millisecond precision tests, use timezoneoffset
8790 // from the previous date object
@@ -157,7 +160,7 @@ describe('dates', function() {
157160 '2015-01-01 12:60' , '2015-01-01 12:-1' , '2015-01-01 12:001' , '2015-01-01 12:1' , // bad minute
158161 '2015-01-01 12:00:60' , '2015-01-01 12:00:-1' , '2015-01-01 12:00:001' , '2015-01-01 12:00:1' , // bad second
159162 '2015-01-01T' , '2015-01-01TT12:34' , // bad ISO separators
160- '2015-01-01Z' , '2015-01-01T12Z' , '2015-01-01T12:34Z05:00' , '2015-01-01 12:34+500' , '2015-01-01 12:34-5:00' // bad TZ info
163+ '2015-01-01Z' , '2015-01-01T12Z' , '2015-01-01T12:34Z05:00' , '2015-01-01 12:34+500' , '2015-01-01 12:34-5:00' , '2015-01-01 12:34+5' // bad TZ info
161164 ] . forEach ( function ( v ) {
162165 expect ( Lib . dateTime2ms ( v ) ) . toBeUndefined ( v ) ;
163166 } ) ;
0 commit comments