File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ export function dateTime(scanner: Scanner): ParseResult<Date> {
608608
609609 const acc = [ ] ;
610610 // example: 1979-05-27T00:32:00Z
611- while ( / [ 0 - 9 T Z . : - ] / . test ( scanner . char ( ) ) && ! scanner . eof ( ) ) {
611+ while ( / [ 0 - 9 T Z . : + - ] / . test ( scanner . char ( ) ) && ! scanner . eof ( ) ) {
612612 acc . push ( scanner . char ( ) ) ;
613613 scanner . next ( ) ;
614614 }
Original file line number Diff line number Diff line change @@ -295,6 +295,10 @@ Deno.test({
295295 parse ( "1979-05-27T00:32:00-07:00" ) ,
296296 new Date ( "1979-05-27T07:32:00Z" ) ,
297297 ) ;
298+ assertEquals (
299+ parse ( "1979-05-27T14:32:00+07:00" ) ,
300+ new Date ( "1979-05-27T07:32:00Z" ) ,
301+ ) ;
298302 assertEquals (
299303 parse ( "1979-05-27T00:32:00.999999-07:00" ) ,
300304 new Date ( "1979-05-27T07:32:00.999Z" ) ,
@@ -785,8 +789,9 @@ Deno.test({
785789 datetime : {
786790 odt1 : new Date ( "1979-05-27T07:32:00Z" ) ,
787791 odt2 : new Date ( "1979-05-27T00:32:00-07:00" ) ,
788- odt3 : new Date ( "1979-05-27T00:32:00.999999-07:00" ) ,
789- odt4 : new Date ( "1979-05-27 07:32:00Z" ) ,
792+ odt3 : new Date ( "1979-05-27T14:32:00+07:00" ) ,
793+ odt4 : new Date ( "1979-05-27T00:32:00.999999-07:00" ) ,
794+ odt5 : new Date ( "1979-05-27 07:32:00Z" ) ,
790795 ld1 : new Date ( "1979-05-27" ) ,
791796 lt1 : "07:32:00" ,
792797 lt2 : "00:32:00.999999" ,
Original file line number Diff line number Diff line change 11[datetime ]
22odt1 = 1979-05-27T07:32:00Z # Comment
33odt2 = 1979-05-27T00:32:00-07:00 # Comment
4- odt3 = 1979-05-27T00:32:00.999999-07:00 # Comment
5- odt4 = 1979-05-27 07:32:00Z # Comment
4+ odt3 = 1979-05-27T14:32:00+07:00 # Comment
5+ odt4 = 1979-05-27T00:32:00.999999-07:00 # Comment
6+ odt5 = 1979-05-27 07:32:00Z # Comment
67ld1 = 1979-05-27 # Comment
78lt1 = 07:32:00 # Comment
89lt2 = 00:32:00.999999 # Comment
You can’t perform that action at this time.
0 commit comments