Skip to main content

A Chinese Calendar Library in Pure Python

Project description

A Chinese Calendar Library in Pure Python

Chinese Calendar: http://en.wikipedia.org/wiki/Chinese_calendar

Usage:
>>> LunarDate.fromSolarDate(1976, 10, 1)
LunarDate(1976, 8, 8, 1)
>>> LunarDate(1976, 8, 8, 1).toSolarDate()
datetime.date(1976, 10, 1)
>>> LunarDate(1976, 8, 8, 1).year
1976
>>> LunarDate(1976, 8, 8, 1).month
8
>>> LunarDate(1976, 8, 8, 1).day
8
>>> LunarDate(1976, 8, 8, 1).isLeapMonth
True
>>>

Limits:

this library can only deal with year from 1900 to 2050 (in chinese calendar).

See also:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lunardate-0.1.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

lunardate-0.1.1-py2.5.egg (7.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page