Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong algorithm #9

Open
binhna opened this issue Jan 4, 2021 · 2 comments
Open

Wrong algorithm #9

binhna opened this issue Jan 4, 2021 · 2 comments

Comments

@binhna
Copy link

binhna commented Jan 4, 2021

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
Copy link

dingp commented Apr 16, 2021

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
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants