Skip to content

Commit e7baf23

Browse files
committed
Add test for subsecond ISO 8601 timestamp
1 parent 2a7596f commit e7baf23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

S32-temporal/DateTime.t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 239;
4+
plan 241;
55

66
my $orwell = DateTime.new(year => 1984);
77

@@ -222,6 +222,10 @@ is ds('2012-12-22T07:02:00+00'), '2012-12-22T07:02:00Z', '+00 with no minutes';
222222
is ds('2012-12-22T07:02:00-00'), '2012-12-22T07:02:00Z', '-00 with no minutes';
223223
is ds('2012-12-22T07:02:00+00:00'), '2012-12-22T07:02:00Z', 'colonated +00';
224224
is ds('2012-12-22T07:02:00-00:00'), '2012-12-22T07:02:00Z', 'colonated -00';
225+
226+
is ds('2015-12-11T20:41:10.5Z'), '2015-12-11T20:41:10.500000Z', 'More seconds precision';
227+
is ds('2015-12-11T20:41:10.562000+00:00'), '2015-12-11T20:41:10.562000Z', 'More seconds precision';
228+
225229
dies-ok { ds('2012-12-22T07:02:00+00:') }, '+00 with trailing colon';
226230
dies-ok { ds('2012-12-22T07:02:00+0') }, 'single digit hour +0';
227231
dies-ok { ds('2012-12-22T07:02:00+0:') }, '+0 with trailing colon';

0 commit comments

Comments
 (0)