Why is this useful?

All timezone algebra will behave identically on all machines, regardless of system locale.

Complete symmetric import and export of both ISO 8601 and RFC 2822 datetime stamps.

and datetime stamps. Fantastic parsing of both dates written for/by humans and machines ( maya.when() vs. maya.parse() ).

vs. ). Support for human slang, both import and export (e.g. 'an hour ago').

Datetimes can very easily be generated, with our without timezone information attached (naive).

This library is based around epoch time, but dates before Jan 1 1970 are indeed supported, via negative integers.

Maya never panics, and always carrys a towel.

What about Delorean, Arrow, & Pendulum?

Arrow, for example, is a fantastic library, but isn't what I wanted in a datetime library. In many ways, it's better than Maya for certian things. In some ways, in my opinion, it's not.

I simply desire a sane API for datetimes that made sense to me for all the things I'd ever want to do—especially when dealing with timezone algebra. Arrow doesn't do all of the things I need (but it does a lot more!). Maya does do exactly what I need.

I think these projects compliment each-other, personally. Maya is great for parsing websites, for example. Arrow supports floors and ceilings and spans of dates, which Maya does not at all.

Installing Maya

$ pip install maya

✨🍰✨

External Links