File tree 3 files changed +11
-5
lines changed
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> {
608
608
609
609
const acc = [ ] ;
610
610
// 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 ( ) ) {
612
612
acc . push ( scanner . char ( ) ) ;
613
613
scanner . next ( ) ;
614
614
}
Original file line number Diff line number Diff line change @@ -295,6 +295,10 @@ Deno.test({
295
295
parse ( "1979-05-27T00:32:00-07:00" ) ,
296
296
new Date ( "1979-05-27T07:32:00Z" ) ,
297
297
) ;
298
+ assertEquals (
299
+ parse ( "1979-05-27T14:32:00+07:00" ) ,
300
+ new Date ( "1979-05-27T07:32:00Z" ) ,
301
+ ) ;
298
302
assertEquals (
299
303
parse ( "1979-05-27T00:32:00.999999-07:00" ) ,
300
304
new Date ( "1979-05-27T07:32:00.999Z" ) ,
@@ -785,8 +789,9 @@ Deno.test({
785
789
datetime : {
786
790
odt1 : new Date ( "1979-05-27T07:32:00Z" ) ,
787
791
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" ) ,
790
795
ld1 : new Date ( "1979-05-27" ) ,
791
796
lt1 : "07:32:00" ,
792
797
lt2 : "00:32:00.999999" ,
Original file line number Diff line number Diff line change 1
1
[datetime ]
2
2
odt1 = 1979-05-27T07:32:00Z # Comment
3
3
odt2 = 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
6
7
ld1 = 1979-05-27 # Comment
7
8
lt1 = 07:32:00 # Comment
8
9
lt2 = 00:32:00.999999 # Comment
You can’t perform that action at this time.
0 commit comments