lunar-python icon indicating copy to clipboard operation
lunar-python copied to clipboard

農曆2057年8月和2097年6月只有29天?還是有30天?

Open SaluChen opened this issue 6 months ago • 2 comments

Q1: from lunar_python import Lunar, Solar lunar = Lunar.fromYmd(2057,8,30) output: Traceback (most recent call last): File "", line 1, in File "/home/etown/lunar-python/lunar_python/Lunar.py", line 188, in fromYmd return Lunar(lunar_year, lunar_month, lunar_day, 0, 0, 0) File "/home/etown/lunar-python/lunar_python/Lunar.py", line 23, in init raise Exception("only %d days in lunar year %d month %d" % (days, lunar_year, lunar_month)) Exception: only 29 days in lunar year 2057 month 8

Q2: from lunar_python import Lunar, Solar lunar = Lunar.fromYmd(2097,6,30) output: Traceback (most recent call last): File "", line 1, in File "/home/etown/lunar-python/lunar_python/Lunar.py", line 188, in fromYmd return Lunar(lunar_year, lunar_month, lunar_day, 0, 0, 0) File "/home/etown/lunar-python/lunar_python/Lunar.py", line 23, in init raise Exception("only %d days in lunar year %d month %d" % (days, lunar_year, lunar_month)) Exception: only 29 days in lunar year 2097 month 6

我知道API訊息是跟我說農曆2057年8月只有29天(2097年6月也只有29天),但是我查詢其他網頁的農曆資料時,發現他們都是8月有30天(2097年6月也有30天),請問是API有問題? 還是其他網頁有問題? https://ytliu0.github.io/ChineseCalendar/index_chinese.html image https://wisdom-life.in/calendar/lunar-calendar/2057/9/28 image 以下是農曆2097年6月30日 https://ytliu0.github.io/ChineseCalendar/index_chinese.html 20970630-01 https://wisdom-life.in/calendar/lunar-calendar/2097/8/7 image

SaluChen avatar Aug 26 '24 06:08 SaluChen