yuangu

Results 25 comments of yuangu

@TSG9876 不错不错,可以的话,你可以提一个rp过来

已经增加,以异常的形式报出。 `import sxtwl lunar = sxtwl.Lunar() try: lunar.getDayBySolar(2018, 13, 20) except sxtwl.LunarException as e : print(e.what())`

额,没有意识到公元0年的问题,有空的时候。我改一下 发自我的 iPhone > 在 2019年4月5日,下午2:08,xros 写道: > > pip python下载的模块没有更新。刚才看了下github上的最新代码 增加了上面的Exception https://github.com/yuangu/sxtwl_cpp/blob/master/python/sxtwl.py#L547 > 自己用swig编译测试了下日子和非法的月子。是可以跳出的。 > > except sxtwl.LunarException as e: > print(str(e)) > 不过好像没有年代范围呀。 > 例如 > > day0...

ymc和rmc确实写错了。晚点我会修改例子。谢谢 !!话说你有微信么? 加群一起讨论啊,群二维码已经发至您的邮箱了。

不用这麻烦 直接月和日减一来做索引。 s = "农历:%d年%s%d月%d日" % (day.getLunarYear(False), '闰' if day.isLunarLeap() else '', ymc[day.getLunarMonth() - 1], rmc[day.getLunarDay() - 1]) print(s)