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

getNextJie和getPrevJie如何正确使用?这应该是bug吧! #32

Open
ikale opened this issue Feb 6, 2024 · 2 comments
Open

getNextJie和getPrevJie如何正确使用?这应该是bug吧! #32

ikale opened this issue Feb 6, 2024 · 2 comments

Comments

@ikale
Copy link

ikale commented Feb 6, 2024

let s = Solar.fromYmd(2024, 2, 4); // 立春
let nx = s.getLunar().getNextJie(true); // ❌立春,✔惊蛰
let px = s.getLunar().getPrevJie(true); // ❌立春, ✔小寒
console.log(nx.getName(),px.getName());
这三个居然全部都是立春?卡bug吗 [苦笑]

@6tail
Copy link
Owner

6tail commented Feb 7, 2024

image 你可以暂时按上图改下代码,不过我建议getPrevJie(true)还是立春。因为按天算,一旦进入2月4日0点,就已经属于立春了,三候这些已经需要按立春计算了。如果你接受这个建议,可按下图这样改: image

@6tail
Copy link
Owner

6tail commented Mar 2, 2024

v1.6.11 已修复prev的问题。

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