Mayan calendar: Difference between revisions

m
→‎{{header|Perl 6}}: a little more minor tweaking
m (Add a few more references)
m (→‎{{header|Perl 6}}: a little more minor tweaking)
Line 243:
 
sub haab ($date, $factor = 'GMT') {
my $offsetindex = (offset Date.new($date) + %correlation{$factor}<round>[2]) % 365;
my $index = ($offset + %correlation{$factor}<round>[2]) % 365;
my ($day, $month);
if $index > 360 {
Line 275 ⟶ 274:
 
sub mayan-long-count ($date, $factor = 'GMT') {
my $offsetdays = %correlation{$factor}<long> + offset Date.new($date);
reverse $offsetdays.polymod(20,18,20,20);
}
 
10,327

edits