# New Ticket Created by  David Warring 
# Please include the string:  [perl #121909]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=121909 >


Hi There,
Date calculations are currently broken on the parrot backend and have been for 
about a week, e.g: 

    $ ./perl6-p -e'my $d = Date.new(:year(2012), :day(1), :month(12)); say ++$d'
    4013-23982-04 # should be 2012-12-02

I've tracked this down to the usage of the bit-shift operator in method 
ymd-from-daycount in src/core/Temporal.pm, e.g. $day = $day - (36524 * $t + ($t 
+> 2));

This bug only occurs under specific circumstances. For example:

my int $t = 10; # needs to be a variable of type int
is (2 * $t) + ($t +> 2), 22; # result is 22 on moar, 4 on parrot


Reply via email to