• This repository has been archived on 12/Jan/2021
  • Stars
    star
    1
  • Language
    Python
  • License
    The Unlicense
  • Created almost 11 years ago
  • Updated almost 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python module for work with dates of Maya Calendar

python-mayadate

Maya Date:

>>> m = mayadate.date(8, 3, 2, 10, 15)
>>> m
mayadate.date(8, 3, 2, 10, 15)

Human readable:

>>> str(m)
"8.3.2.10.15 | 2 Men | 13 Pax | 1 Ik' | G8"

Long Count:

>>> m.longcountstr
'8.3.2.10.15'

Tzolkin:

>>> m.tzolkinstr
'2 Men'

Haab:

>>> m.haabstr
'13 Pax'

Year Bearer:

>>> m.yearbearerstr
"1 Ik'"

Lord of Night:

>>> m.lordofnightstr
'G8'

To Gregorian Date Conversion:

>>> g = m.togregorian()
>>> g
datetime.date(103, 5, 19)

Computations:

>>> n = m - mayadate.delta(1)
>>> n
mayadate.date(8, 3, 2, 10, 14)

Comparsions:

>>> n < m
True

TODO:

  • replace() method
  • BCE in togregorian() method
  • custom formatting support
  • pickle support
  • distutils support