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 91
91
} ,
92
92
parse : function ( iso8601 ) {
93
93
var s = $ . trim ( iso8601 ) ;
94
- s = s . replace ( / \. \d \d \d + / , "" ) ; // remove milliseconds
94
+ s = s . replace ( / \. \d + / , "" ) ; // remove milliseconds
95
95
s = s . replace ( / - / , "/" ) . replace ( / - / , "/" ) ;
96
96
s = s . replace ( / T / , " " ) . replace ( / Z / , " UTC" ) ;
97
97
s = s . replace ( / ( [ \+ \- ] \d \d ) \: ? ( \d \d ) / , " $1$2" ) ; // -04:00 -> -0400
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ <h2>Parsing</h2>
95
95
< li > < abbr id ="testParsing7 " class ="todate " title ="1978-12-18 17:17:00 "> </ abbr > [from blank TZ]</ li >
96
96
< li > < abbr id ="testParsing8 " class ="todate " title ="1978-12-18 17:17:00.021Z "> </ abbr > [from Z with milliseonds]</ li >
97
97
< li > < abbr id ="testParsing9 " class ="todate " title ="1978-12-18 17:17:00.021432Z "> </ abbr > [from Z with microseonds]</ li >
98
+ < li > < abbr id ="testParsing10 " class ="todate " title ="1978-12-18 17:17:00.0Z "> </ abbr > [from Z with milliseonds]</ li >
98
99
</ ul >
99
100
100
101
< h2 > Wording</ h2 >
@@ -354,6 +355,10 @@ <h2>Settings</h2>
354
355
ok ( ( $ ( "#testParsing9" ) . html ( ) . match ( correctMatch ) ) , "Correctly parsed" ) ;
355
356
} ) ;
356
357
358
+ test ( "From Z with microseconds" , function ( ) {
359
+ ok ( ( $ ( "#testParsing10" ) . html ( ) . match ( correctMatch ) ) , "Correctly parsed" ) ;
360
+ } ) ;
361
+
357
362
module ( "Wording" ) ;
358
363
359
364
test ( "-120 min" , function ( ) {
You can’t perform that action at this time.
0 commit comments