@@ -332,11 +332,11 @@ impl fmt::Show for Duration {
332
332
if self . nanos == 0 {
333
333
try!( write ! ( f, "T{}S" , self . secs) ) ;
334
334
} else if self . nanos % 1_000_000 == 0 {
335
- try!( write ! ( f, "T{}, {:03}S" , self . secs, self . nanos / 1_000_000 ) ) ;
335
+ try!( write ! ( f, "T{}. {:03}S" , self . secs, self . nanos / 1_000_000 ) ) ;
336
336
} else if self . nanos % 1_000 == 0 {
337
- try!( write ! ( f, "T{}, {:06}S" , self . secs, self . nanos / 1_000 ) ) ;
337
+ try!( write ! ( f, "T{}. {:06}S" , self . secs, self . nanos / 1_000 ) ) ;
338
338
} else {
339
- try!( write ! ( f, "T{}, {:09}S" , self . secs, self . nanos) ) ;
339
+ try!( write ! ( f, "T{}. {:09}S" , self . secs, self . nanos) ) ;
340
340
}
341
341
}
342
342
Ok ( ( ) )
@@ -406,15 +406,15 @@ mod tests {
406
406
assert_eq ! ( Duration :: days( 42 ) . to_string( ) , "P42D" . to_string( ) ) ;
407
407
assert_eq ! ( Duration :: days( -42 ) . to_string( ) , "P-42D" . to_string( ) ) ;
408
408
assert_eq ! ( Duration :: seconds( 42 ) . to_string( ) , "PT42S" . to_string( ) ) ;
409
- assert_eq ! ( Duration :: milliseconds( 42 ) . to_string( ) , "PT0, 042S" . to_string( ) ) ;
410
- assert_eq ! ( Duration :: microseconds( 42 ) . to_string( ) , "PT0, 000042S" . to_string( ) ) ;
411
- assert_eq ! ( Duration :: nanoseconds( 42 ) . to_string( ) , "PT0, 000000042S" . to_string( ) ) ;
409
+ assert_eq ! ( Duration :: milliseconds( 42 ) . to_string( ) , "PT0. 042S" . to_string( ) ) ;
410
+ assert_eq ! ( Duration :: microseconds( 42 ) . to_string( ) , "PT0. 000042S" . to_string( ) ) ;
411
+ assert_eq ! ( Duration :: nanoseconds( 42 ) . to_string( ) , "PT0. 000000042S" . to_string( ) ) ;
412
412
assert_eq ! ( ( Duration :: days( 7 ) + Duration :: milliseconds( 6543 ) ) . to_string( ) ,
413
- "P7DT6, 543S" . to_string( ) ) ;
413
+ "P7DT6. 543S" . to_string( ) ) ;
414
414
415
415
// the format specifier should have no effect on `Duration`
416
416
assert_eq ! ( format!( "{:30}" , Duration :: days( 1 ) + Duration :: milliseconds( 2345 ) ) ,
417
- "P1DT2, 345S" . to_string( ) ) ;
417
+ "P1DT2. 345S" . to_string( ) ) ;
418
418
}
419
419
}
420
420
0 commit comments