|
1 | | -Metadata-Version: 1.1 |
| 1 | +Metadata-Version: 2.1 |
2 | 2 | Name: lunardate |
3 | | -Version: 0.2.0 |
| 3 | +Version: 0.2.1 |
4 | 4 | Summary: A Chinese Calendar Library in Pure Python |
5 | 5 | Home-page: https://github.com/lidaobing/python-lunardate |
6 | 6 | Author: LI Daobing |
7 | 7 | Author-email: lidaobing@gmail.com |
8 | 8 | License: GPLv3 |
9 | | -Description: |
10 | | - A Chinese Calendar Library in Pure Python |
11 | | - ========================================= |
12 | | - |
13 | | - Chinese Calendar: http://en.wikipedia.org/wiki/Chinese_calendar |
14 | | - |
15 | | - Usage |
16 | | - ----- |
17 | | - >>> LunarDate.fromSolarDate(1976, 10, 1) |
18 | | - LunarDate(1976, 8, 8, 1) |
19 | | - >>> LunarDate(1976, 8, 8, 1).toSolarDate() |
20 | | - datetime.date(1976, 10, 1) |
21 | | - >>> LunarDate(1976, 8, 8, 1).year |
22 | | - 1976 |
23 | | - >>> LunarDate(1976, 8, 8, 1).month |
24 | | - 8 |
25 | | - >>> LunarDate(1976, 8, 8, 1).day |
26 | | - 8 |
27 | | - >>> LunarDate(1976, 8, 8, 1).isLeapMonth |
28 | | - True |
29 | | - |
30 | | - >>> today = LunarDate.today() |
31 | | - >>> type(today).__name__ |
32 | | - 'LunarDate' |
33 | | - |
34 | | - >>> # support '+' and '-' between datetime.date and datetime.timedelta |
35 | | - >>> ld = LunarDate(1976,8,8) |
36 | | - >>> sd = datetime.date(2008,1,1) |
37 | | - >>> td = datetime.timedelta(days=10) |
38 | | - >>> ld-ld |
39 | | - datetime.timedelta(0) |
40 | | - >>> (ld-sd).days |
41 | | - -11444 |
42 | | - >>> ld-td |
43 | | - LunarDate(1976, 7, 27, 0) |
44 | | - >>> (sd-ld).days |
45 | | - 11444 |
46 | | - >>> ld+td |
47 | | - LunarDate(1976, 8, 18, 0) |
48 | | - >>> td+ld |
49 | | - LunarDate(1976, 8, 18, 0) |
50 | | - >>> ld2 = LunarDate.today() |
51 | | - >>> ld < ld2 |
52 | | - True |
53 | | - >>> ld <= ld2 |
54 | | - True |
55 | | - >>> ld > ld2 |
56 | | - False |
57 | | - >>> ld >= ld2 |
58 | | - False |
59 | | - >>> ld == ld2 |
60 | | - False |
61 | | - >>> ld != ld2 |
62 | | - True |
63 | | - >>> ld == ld |
64 | | - True |
65 | | - >>> LunarDate.today() == LunarDate.today() |
66 | | - True |
67 | | - >>> before_leap_month = LunarDate.fromSolarDate(2088, 5, 17) |
68 | | - >>> before_leap_month.year |
69 | | - 2088 |
70 | | - >>> before_leap_month.month |
71 | | - 4 |
72 | | - >>> before_leap_month.day |
73 | | - 27 |
74 | | - >>> before_leap_month.isLeapMonth |
75 | | - False |
76 | | - >>> leap_month = LunarDate.fromSolarDate(2088, 6, 17) |
77 | | - >>> leap_month.year |
78 | | - 2088 |
79 | | - >>> leap_month.month |
80 | | - 4 |
81 | | - >>> leap_month.day |
82 | | - 28 |
83 | | - >>> leap_month.isLeapMonth |
84 | | - True |
85 | | - >>> after_leap_month = LunarDate.fromSolarDate(2088, 7, 17) |
86 | | - >>> after_leap_month.year |
87 | | - 2088 |
88 | | - >>> after_leap_month.month |
89 | | - 5 |
90 | | - >>> after_leap_month.day |
91 | | - 29 |
92 | | - >>> after_leap_month.isLeapMonth |
93 | | - False |
94 | | - |
95 | | - Limits |
96 | | - ------ |
97 | | - |
98 | | - this library can only deal with year from 1900 to 2099 (in chinese calendar). |
99 | | - |
100 | | - See also |
101 | | - -------- |
102 | | - |
103 | | - * lunar: http://packages.qa.debian.org/l/lunar.html, |
104 | | - A converter written in C, this program is derived from it. |
105 | | - * python-lunar: http://code.google.com/p/liblunar/ |
106 | | - Another library written in C, including a python binding. |
107 | | - |
108 | | -Platform: UNKNOWN |
109 | 9 | Classifier: Development Status :: 4 - Beta |
110 | 10 | Classifier: Programming Language :: Python |
| 11 | +Classifier: Programming Language :: Python :: 2 |
| 12 | +Classifier: Programming Language :: Python :: 2.7 |
| 13 | +Classifier: Programming Language :: Python :: 3 |
| 14 | +Classifier: Programming Language :: Python :: 3.4 |
| 15 | +Classifier: Programming Language :: Python :: 3.5 |
| 16 | +Classifier: Programming Language :: Python :: 3.6 |
| 17 | +Classifier: Programming Language :: Python :: 3.7 |
111 | 18 | Classifier: License :: OSI Approved :: GNU General Public License (GPL) |
112 | 19 | Classifier: Operating System :: OS Independent |
113 | 20 | Classifier: Topic :: Software Development :: Libraries :: Python Modules |
| 21 | +License-File: LICENSE.txt |
| 22 | + |
| 23 | + |
| 24 | +A Chinese Calendar Library in Pure Python |
| 25 | +========================================= |
| 26 | + |
| 27 | +Chinese Calendar: http://en.wikipedia.org/wiki/Chinese_calendar |
| 28 | + |
| 29 | +Usage |
| 30 | +----- |
| 31 | + >>> LunarDate.fromSolarDate(1976, 10, 1) |
| 32 | + LunarDate(1976, 8, 8, 1) |
| 33 | + >>> LunarDate(1976, 8, 8, 1).toSolarDate() |
| 34 | + datetime.date(1976, 10, 1) |
| 35 | + >>> LunarDate(1976, 8, 8, 1).year |
| 36 | + 1976 |
| 37 | + >>> LunarDate(1976, 8, 8, 1).month |
| 38 | + 8 |
| 39 | + >>> LunarDate(1976, 8, 8, 1).day |
| 40 | + 8 |
| 41 | + >>> LunarDate(1976, 8, 8, 1).isLeapMonth |
| 42 | + True |
| 43 | + |
| 44 | + >>> today = LunarDate.today() |
| 45 | + >>> type(today).__name__ |
| 46 | + 'LunarDate' |
| 47 | + |
| 48 | + >>> # support '+' and '-' between datetime.date and datetime.timedelta |
| 49 | + >>> ld = LunarDate(1976,8,8) |
| 50 | + >>> sd = datetime.date(2008,1,1) |
| 51 | + >>> td = datetime.timedelta(days=10) |
| 52 | + >>> ld-ld |
| 53 | + datetime.timedelta(0) |
| 54 | + >>> (ld-sd).days |
| 55 | + -11444 |
| 56 | + >>> ld-td |
| 57 | + LunarDate(1976, 7, 27, 0) |
| 58 | + >>> (sd-ld).days |
| 59 | + 11444 |
| 60 | + >>> ld+td |
| 61 | + LunarDate(1976, 8, 18, 0) |
| 62 | + >>> td+ld |
| 63 | + LunarDate(1976, 8, 18, 0) |
| 64 | + >>> ld2 = LunarDate.today() |
| 65 | + >>> ld < ld2 |
| 66 | + True |
| 67 | + >>> ld <= ld2 |
| 68 | + True |
| 69 | + >>> ld > ld2 |
| 70 | + False |
| 71 | + >>> ld >= ld2 |
| 72 | + False |
| 73 | + >>> ld == ld2 |
| 74 | + False |
| 75 | + >>> ld != ld2 |
| 76 | + True |
| 77 | + >>> ld == ld |
| 78 | + True |
| 79 | + >>> LunarDate.today() == LunarDate.today() |
| 80 | + True |
| 81 | + >>> before_leap_month = LunarDate.fromSolarDate(2088, 5, 17) |
| 82 | + >>> before_leap_month.year |
| 83 | + 2088 |
| 84 | + >>> before_leap_month.month |
| 85 | + 4 |
| 86 | + >>> before_leap_month.day |
| 87 | + 27 |
| 88 | + >>> before_leap_month.isLeapMonth |
| 89 | + False |
| 90 | + >>> leap_month = LunarDate.fromSolarDate(2088, 6, 17) |
| 91 | + >>> leap_month.year |
| 92 | + 2088 |
| 93 | + >>> leap_month.month |
| 94 | + 4 |
| 95 | + >>> leap_month.day |
| 96 | + 28 |
| 97 | + >>> leap_month.isLeapMonth |
| 98 | + True |
| 99 | + >>> after_leap_month = LunarDate.fromSolarDate(2088, 7, 17) |
| 100 | + >>> after_leap_month.year |
| 101 | + 2088 |
| 102 | + >>> after_leap_month.month |
| 103 | + 5 |
| 104 | + >>> after_leap_month.day |
| 105 | + 29 |
| 106 | + >>> after_leap_month.isLeapMonth |
| 107 | + False |
| 108 | + |
| 109 | +Limits |
| 110 | +------ |
| 111 | + |
| 112 | +this library can only deal with year from 1900 to 2099 (in chinese calendar). |
| 113 | + |
| 114 | +See also |
| 115 | +-------- |
| 116 | + |
| 117 | +* lunar: http://packages.qa.debian.org/l/lunar.html, |
| 118 | + A converter written in C, this program is derived from it. |
| 119 | +* python-lunar: http://code.google.com/p/liblunar/ |
| 120 | + Another library written in C, including a python binding. |
0 commit comments