On Fri Jul 24 13:01:20 2015, alex.jakime...@gmail.com wrote:
> Code:
> say Date.new("0000-01-01").truncated-to('week');
> say Date.new("0000-01-01").pred();
> say Date.new("0000-01-01") - 10000;
> 
> Result:
> -001-12-27
> -001-12-31
> -028-08-15
> 
> It seems like ISO 8601 allows negative dates, but it should be -0001-12-31.
> 
> “by convention 1 BC is labelled +0000, 2 BC is labeled -0001, and so on.”
> (from https://en.wikipedia.org/wiki/ISO_8601)
> 
> Similarly,
> Code:
> say Date.new("9900-01-01") + 100000
> 
> Result:
> 10173-10-16
> 
> it's OK,  but “An expanded year representation [±*Y*YYYY] must have an
> agreed-upon number of extra year digits beyond the four-digit minimum, and
> it must be prefixed with a + or − sign”.
> If I got that right, then it should be +10173-10-16
> 
> That being said, I think that the whole thing that is not within 0000-9999
> boundary is bound to cause errors, even if Perl6 will ever get it right.
> Most naive approaches to parse dates will split by '-' which will break
> horribly if the date starts with - sign.
> 
> And even Date.new() does not allow to pass anything but yyyy-mm-dd.

rakudo has been updated to emit 4 digit years even for the negative years, and 
is emitting a + on the 5 digit year. passing tests added to 
t/spec/S32-temporal/Date.t , closing ticket.

-- 
Will "Coke" Coleda

Reply via email to