My favorites | Sign in
Project Logo
                
Show all Featured wiki pages:
Downloads
Links:
Feeds:
People details
Project owners:
  hantuo1984, lidaobing

A Chinese Calendar Library in Pure Python

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

Usage

        >>> from lunardate import LunarDate
        >>> 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









Hosted by Google Code