-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
238 lines (180 loc) · 7.5 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
Please use UTF-8 to read this file.
There is no code for Chinese calendar, which is mostly used by people
in or from East Asia, China, Korean, Japan and so on.
I just based on the code of ccal and create KCalendarSystemChinese.
And I read some docs on line:
http://thunder.cwru.edu/ccal/index.html (dead)
http://thunder.cwru.edu/ccal/rule.htm (in Chinese)(dead)
http://ccal.chinesebay.com/ccal/
http://ccal.chinesebay.com/ccal/index.html.cn (in Chinese)
http://www.math.nus.edu.sg/aslaksen/calendar/chinese.html
http://en.wikipedia.org/wiki/Chinese_calendar
My code is in:
https://github.com/liangqi/kcalendar
cp kde4/kcalendarsystemchinese.h kde/src/KDE/kdelibs/kdecore/date
cp kde4/kcalendarsystemchinese.cpp kde/src/KDE/kdelibs/kdecore/date
cp kde4/kcalendarsystem.cpp kde/src/KDE/kdelibs/kdecore/date
cp kde4/CMakeList.txt kde/src/KDE/kdelibs/kdecore
And then build your kdelibs.
You can try two examples in example/test, example/guitest.
Some known issue or problem which you can help me:
1. for virtual bool setDate( QDate &date, int year, int month, int day
), what's it for? what's the difference between it with setYMD? Is it
my understanding(in my current code) right or not?
2. for epoch(), what's it?
3. in my example/test, if I call weekStartDay(), it will crash, do you
have any hints?
4. Just because ccal has its own calculation function, a little slow,
especially when using it with KDatePicker, then I choose to like ccal,
embed a data table for 1950-2050 in it, now speed is ok. Maybe some
one can optimize the code of ccal, or just for my case.
Valid date:
1645-1-28 -> 7303-2-5
4342-1-1 -> 9999-12-30(Chinese Calendar)
About the year difference between Gregorian and Chinese, I use 2697.
http://en.wikipedia.org/wiki/Chinese_calendar#Continuously-numbered_years
snapshots:
http://kcalendar.googlecode.com/svn/trunk/snapshot/chinese-calendar-kde4-1.png
http://kcalendar.googlecode.com/svn/trunk/snapshot/chinese-calendar-kde4-2.png
talks:
http://lists.kde.org/?t=119817976300004
license issue:
ccal - got mail, the author released part of ccal as LGPL too, from 2.4
============================================
From: Zhuo Meng <[email protected]>
To: Liang Qi <[email protected]>
Date: Mon, 7 Jan 2008 11:23:33 -0500
Subject: Re: hi, something about Chinese Calendar
Hi, Liang,
I rereleased 2.4 and replaced the license.
Best,
-Zhuo
On Fri, Jan 04, 2008 at 12:11:52PM +0100, Liang Qi wrote:
> Hi, Zhuo,
>
> I am ok about the files list. If you relicense all your code under
> LGPL, I think that maybe someone else will be very happy.
>
> And could you put your LGPL ccal package on your website or somewhere else?
>
> Thanks a lot.
>
> Regards,
> Liang
>
> On 04/01/2008, Zhuo Meng <[email protected]> wrote:
> > Hi Liang,
> >
> > Glad to know that you settled the license issue for the lunar outreach
> > code. I have no problem of relicense the part of the ccal that you use
> > under LGPL. I suppose the files included will be all from NOVAS and
> > Lunar Outreach and mphases.*, solarterm.*, lunaryear.* and yearcache.*.
> >
> > If you need additional files to be under LGPL, just let me know.
> >
> > Best,
> > -Zhuo
============================================
README in ccal 2.5.2:
Portions related to
computing of Chinese dates are distributed under the terms of the GNU
Less General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option)
any later version.
============================================
NOVAS - got mail, the author said it's ok
============================================
From: George Kaplan [Contractor] <[email protected]>
To: Liang Qi <[email protected]>
Date: 8 Nov 2007 19:36
Subject: Re: about the license of NOVAS
Dear Mr. Liang,
The NOVAS software, both Fortran and C, is in the public domain. That is,
there is no license and you can use it freely. We do ask that you
acknowledge the U.S. Naval Observatory in any documentation, papers, or
other writing about any software that uses NOVAS.
George
============================================
============================================
Lunar Outreach Services - the author had relicensed his code
============================================
From: [email protected]
Date: 18 Feb 2014 16:03
To: Liang Qi <[email protected]>
Subject: Re: can't access the code of Lunar Outreach Services
Hi Liang--
I added the LGPL text to the sources, so you should be good to go.
Best,
Chris
============================================
http://www.packetgnomes.org/~chris/lunar/cgi-src/phases/ (old, dead)
http://www.muppetlabs.com/~chris/lunar/cgi-src/phases/
Backup: https://github.com/liangqi/phases/
代码主页:
https://github.com/liangqi/kcalendar
KDE 4.0已经非常临近了,但非常遗憾的是KDE系统中一直没有面向中国以及东亚用户使用的农历。
最近基于ccal的代码,做了一些封装,目前基本可用,但是效率还有待提高。
欢迎大家测试并且提出修改意见。
代码使用方法:
有关如何构建KDE 4开发环境和KDE 4应用开发,请参考:
http://techbase.kde.org/Getting_Started/Build/KDE4
http://techbase.kde.org/Development/Tutorials#Introduction_To_KDE_4_Programming
只需要kdelibs以及之前的步骤,完成后。
将kde4/kcalendarsystemchinese.h, kde4/kcalendarsystemchinese.cpp, kde4/kcalendarsystem.cpp复制到kde/src/KDE/kdelibs/kdecore/date下。
将kde4/CMakeList.txt复制到kde/src/KDE/kdelibs/kdecore下。
切换到kde/src/KDE/kdelibs下,cmakekde即可编译新的库。
有关测试用例:
example/test用来测试各API接口。
example/guitest使用KDatePicker测试,比较慢的说,请大家稍等待一下。
编译方法:
cd example/test
cmake .
make
cd example/guitest
cmake .
make
主要问题,addMonths正在改进中
加1000个月的时候
2007-12-19版本中测试信息
kde-devel@liangqi-suse103:~/tmp/test> time ./test
Chinese for 2007-12-19: 4704 - 11 - 10
addMonths: 2007-12-19, 1000: "Sat Oct 23 2088" : 4785 - 10 - 10
real 0m23.462s
user 0m23.193s
sys 0m0.096s
2007-12-20版本中测试信息
kde-devel@liangqi-suse103:~/tmp/test> time ./test
Chinese for 2007-12-19: 4704 - 11 - 10
addMonths: 2007-12-19, 1000: "Sat Oct 23 2088" : 4785 - 10 - 10
real 0m7.976s
user 0m7.792s
sys 0m0.084s
有效日期:
1645-1-28 -> 7303-2-5
4342-1-1 -> 9999-12-30(Chinese Calendar)
有关西历和农历的年份计算,我使用的是2697,请参考:
http://en.wikipedia.org/wiki/Chinese_calendar#Continuously-numbered_years
截屏:
http://kcalendar.googlecode.com/svn/trunk/snapshot/chinese-calendar-kde4-1.png
http://kcalendar.googlecode.com/svn/trunk/snapshot/chinese-calendar-kde4-2.png
讨论方法:
kde-core-devel邮件列表
http://lists.kde.org/?t=119817976300004
http://lists.kde.org/?t=128937569200001
kde-china邮件列表
http://mail.kde.org/mailman/listinfo/kde-china
kde-cn irc
irc://irc.freenode.net/#kde-cn
版权问题:
ccal - 已经收到邮件,作者以LGPL发布了ccal,从2.4版开始。邮件内容见上面英文部分。
NOVAS - 已经收到邮件,作者说没有问题。邮件内容见上面英文部分。
Lunar Outreach Services - 作者已经按LGPL重新发布代码了
http://www.packetgnomes.org/~chris/lunar/cgi-src/phases/ (old, dead)
http://www.muppetlabs.com/~chris/lunar/cgi-src/phases/
备份: https://github.com/liangqi/phases/
2007-12-20
最新备注,已经加入1950-2050的缓存,guitest速度已经非常理想了。欢迎大家测试。
2011-04-27
更新了一些链接和协议内容。
Liang Qi 齐亮