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

能否直接实例化一个农历日期?反推出阳历日期 #28

Open
zhangnew opened this issue Aug 18, 2023 · 2 comments
Open

能否直接实例化一个农历日期?反推出阳历日期 #28

zhangnew opened this issue Aug 18, 2023 · 2 comments

Comments

@zhangnew
Copy link

目前看代码好像只接受一个阳历日期

@cuba3
Copy link
Member

cuba3 commented Aug 18, 2023

目前看代码好像只接受一个阳历日期

实例化一个cnlunarDate(year,m,d,闰)?如果日期不存在就跳出?开始有想过,但不确定2023年1月是否属于农历2022年,另外就是闰月并不一定存在,还有就是如果只有廿九,没有三十,直接报错?然后提示最近的新历?你要不给一个输入输出的demo?

@zhangnew
Copy link
Author

对的,加一个参数控制是否为闰月;如果日期不存在就报错,提示一下最近的日期就更好了(前后一天?

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

2 participants