MayaAztec
NAME
Date::Calendar::MayaAztec - conversions from/to the Maya calendar and conversions to the Aztec calendar
SYNOPSIS
use Date::Calendar::Maya;
use Date::Calendar::Aztec;
my Date $d-greg .= new(2020, 6, 20);
my Date::Calendar::Aztec $d-aztec .= new-from-date($d-greg);
my Date::Calendar::Maya $d-maya .= new-from-date($d-greg);
say "{.tzolkin} {.haab} {.long-count}" with $d-maya;
# --> 12 Etznab 1 Tzec 13.0.7.10.18
$d-maya.locale = 'en';
say "{.tzolkin} {.haab}" with $d-maya;
# --> 12 Flint 1 Skull
say "{.tonalpohualli} {.xiuhpohualli}" with $d-aztec;
# --> 12 Tecpatl 20 Teotleco
$d-aztec.locale = 'en';
say "{.tonalpohualli} {.xiuhpohualli}" with $d-aztec;
# --> 12 Flint 20 God arrives
Conversion while paying attention to sun rise and sun set:
use Date::Calendar::Strftime;
use Date::Calendar::Gregorian;
use Date::Calendar::Aztec;
use Date::Calendar::Maya;
my Date::Calendar::Gregorian $d-gr;
my Date::Calendar::Aztec $d-az;
my Date::Calendar::Maya $d-ma;
$d-gr .= new('2024-11-13', daypart => before-sunrise());
$d-az .= new-from-date($d-gr);
$d-ma .= new-from-date($d-gr);
say $d-az.strftime("%V %A %e %B"), $d-ma.strftime(" / %F %V %A %e %B");
# --> "7 Coatl 1 Tlacaxipehualiztli / 13.0.12.1.5 7 Chicchan 7 Ceh"
$d-gr .= new('2024-11-13', daypart => daylight());
$d-az .= new-from-date($d-gr);
$d-ma .= new-from-date($d-gr);
say $d-az.strftime("%V %A %e %B"), $d-ma.strftime(" / %F %V %A %e %B");
# --> "7 Coatl 2 Tlacaxipehualiztli / 13.0.12.1.5 7 Chicchan 8 Ceh"
$d-gr .= new('2024-11-13', daypart => after-sunset());
$d-az .= new-from-date($d-gr);
$d-ma .= new-from-date($d-gr);
say $d-az.strftime("%V %A %e %B"), $d-ma.strftime(" / %F %V %A %e %B");
# --> "8 Miquiztli 2 Tlacaxipehualiztli / 13.0.12.1.5 8 Cimi Ceh"
DESCRIPTION
Date::Calendar::MayaAztec is a distribution with two main classes, Date::Calendar::Maya implementing the Maya calendars (long count, Haab and Tzolkin) and Date::Calendar::Aztec implementing the Aztec calendars (tonalpohualli and xiuhpohualli).
See the full documentation in each class, Date::Calendar::Maya and
Date::Calendar::Aztec.
SEE ALSO
Raku Software
Date::Calendar::Strftime or https://github.com/jforget/raku-Date-Calendar-Strftime
Date::Calendar::Gregorian or https://github.com/jforget/raku-Date-Calendar-Gregorian
Date::Calendar::Julian or https://github.com/jforget/raku-Date-Calendar-Julian
Date::Calendar::Hebrew or https://github.com/jforget/raku-Date-Calendar-Hebrew
Date::Calendar::CopticEthiopic or https://github.com/jforget/raku-Date-Calendar-CopticEthiopic
Date::Calendar::FrenchRevolutionary or https://github.com/jforget/raku-Date-Calendar-FrenchRevolutionary
Date::Calendar::Hijri or https://github.com/jforget/raku-Date-Calendar-Hijri
Date::Calendar::Persian or https://github.com/jforget/raku-Date-Calendar-Persian
Date::Calendar::Bahai or https://github.com/jforget/raku-Date-Calendar-Bahai
Perl 5 Software
Other Software
calendar/cal-mayan.el in Emacs
CALENDRICA 4.0 -- Common Lisp, which can be download in the "Resources" section of https://www.cambridge.org/us/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition?format=PB&isbn=9781107683167
Books
Calendrical Calculations (Third or Fourth Edition) by Nachum Dershowitz and Edward M. Reingold, Cambridge University Press, see http://www.calendarists.com or https://www.cambridge.org/us/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition?format=PB&isbn=9781107683167. ISBN 978-0-521-70238-6 for the third edition.
La saga des calendriers, by Jean Lefort, published by Belin (Pour la Science), ISBN 2-90929-003-5 See https://www.belin-editeur.com/la-saga-des-calendriers (website no longer responding).
Histoire comparée des numérations écrites by Geneviève Guitel, published by Flammarion (Nouvelle bibliothèque scientifique), ISBN 2-08-21114-0
Internet
https://en.wikipedia.org/wiki/Aztec_calendar
https://en.wikipedia.org/wiki/Maya_calendar
https://www.tondering.dk/claus/cal/maya.php
https://www.britannica.com/topic/Aztec-calendar
https://www.timeanddate.com/calendar/mayan.html
https://www.azteccalendar.com/
http://research.famsi.org/date_mayaLC.php
AUTHOR
Jean Forget <J2N-FORGET at orange dot fr>
COPYRIGHT AND LICENSE
Copyright (c) 2020, 2023, 2024 Jean Forget
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.