zhdate icon indicating copy to clipboard operation
zhdate copied to clipboard

优化代码结构,更改部分常量命名

Open EillesWan opened this issue 1 year ago • 6 comments

本来是除夕过个年,打开邮箱一看,又有人提了我去年就已经修复的问题,有点感慨(?) 于是我再次打开这个项目,在今年的除夕更新如下内容:

  1. 把原本放在 __init__.py 的主类全部移入了 main.py 中,并在 __init__.py 里加了引用和版本字符串
  2. 更新翻译,把原本的 Chinese New Year(CHINESENEWYEAR)Chinese Year Code(CHINESEYEARCODE) 俩常量的翻译改为 Lunar New YearLunar Year CodeLUNARNEWYEAR, LUNARYEARCODE
  3. 使用 Blcak 格式化了文档,constants.py 除外,主要是那玩意格式化完了之后更丑了……
  4. 没了,格式化一下 README 算么[手动狗头]

=========

It is when I want to open some games to play and a notifacation from E-Mail disturb me that a issue has been turned out that is what I have repaired last year the same date. So I decided to open this repo again and do some changes...

  1. Moved the classes originally in __init__.py into main.py and add __version__ and __all__ into __init__.py.
  2. Updated the translation. Chinese New Year(CHINESENEWYEAR), Chinese Year Code(CHINESEYEARCODE) -> Lunar New Year Lunar Year Code (LUNARNEWYEAR, LUNARYEARCODE)
  3. Formatted the codes via Blcak, except constants.py for it may be more ugly after do the formatting.
  4. Also formatted README.

EillesWan avatar Feb 09 '24 09:02 EillesWan

刚刚新增了一些代码,主要是把生肖常量、天干地支常量、中文数字常量转移到了constants.py里面去,然后新增了一个__format__方法的覆写,主要解决了 #2 的ISSUE,顺带把today和from_datetime改为了类方法。

EillesWan avatar Feb 11 '24 16:02 EillesWan

您有考虑fork一份换个包名上传到pypi吗,看起来原作者可能没有时间继续维护了:(

Antares0982 avatar Mar 03 '24 14:03 Antares0982

您有考虑fork一份换个包名上传到pypi吗,看起来原作者可能没有时间继续维护了:(

已经完成了一个新的农历日期库,并上传了pypi,叫做zhDateTime。 因为我不喜欢GPLv3,所以就自己把农历日期时间重写了一遍,采用协议MPL2.0,用法可以参阅zhDateTime 仓库地址https://gitee.com/EillesWan/zhDateTime

EillesWan avatar Apr 21 '24 07:04 EillesWan