Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add tests for RT #125681
  • Loading branch information
coke committed Aug 26, 2015
1 parent 15a2728 commit de7de27
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S32-temporal/Date.t
Expand Up @@ -3,7 +3,7 @@ use Test;

# L<S32::Temporal/C<Date>>

plan 73;
plan 75;

# construction
{
Expand Down Expand Up @@ -134,3 +134,9 @@ ok d('2011-01-14') ~~ d('2011-01-14'), 'Can smartmatch Date objects';
is d('2015-01-20').earlier(weeks => 3), d('2014-12-30'), 'subtracting 3 weeks, overflowing to years';
lives-ok { Date.new('2010-01-31').later(month => 1) }, '.later does not try to create an impossible date';
}

# RT #125681
{
is Date.new("0000-01-01").truncated-to("week"), "-0001-12-27", "negative dates ISO-8601 rendering";
is Date.new("9900-01-01") + 100000, "+10173-10-16", "very large years, ISO-8601 rendering";
}

0 comments on commit de7de27

Please sign in to comment.