wolfhong / LunarCalendar

A lunar calendar converter in Python, including 24 solar terms and a number of solar holidays and lunar holidays, mainly from China.
https://pypi.org/project/LunarCalendar/
MIT License
57 stars 17 forks source link

Wrong algorithm #9

Open binhna opened 3 years ago

binhna commented 3 years ago

I try this and the algorithm gives me the wrong output: print(Lunar.from_date(datetime.date(2021, 1, 4))) --> Lunar(year=2020, month=11, day=21, isleap=False)

It should be: Lunar(year=2020, month=11, day=22, isleap=False)

dingp commented 3 years ago

I think you got your date wrong. From every single converter available online, I got 2021-01-04 in solar calendar converts to 2020-11-21 in lunar calendar.

kainjinez commented 8 months ago

@binhna Although It was late, your result is about the Vietnamese calendar, not the Chinese calendar. At a specific time, it won't be the same.