tyme4j icon indicating copy to clipboard operation
tyme4j copied to clipboard

农历干支有疑问

Open sizdshi opened this issue 1 year ago • 3 comments

image image image

应当如何使用才会出现这个正确结果?我怀疑是我自己使用不当

sizdshi avatar Jan 16 '25 07:01 sizdshi

month:1-5的数据都是正确的,从甲寅到戊午

sizdshi avatar Jan 16 '25 07:01 sizdshi

农历年LunarYear对象有获取当年所有农历月的列表的方法,直接遍历即可。或者取第1个月,即正月,然后用next(1)依次类推下一个月。因为存在闰月,例如上述的己未实际是闰5月,不是6月(6月为庚申)。初始化农历月的月份参数如果是闰月,需要传负数的,例如LunarMonth.fromYm(1998, -5)得到闰5月。

6tail avatar Jan 16 '25 07:01 6tail

明白了,谢谢!

sizdshi avatar Jan 16 '25 07:01 sizdshi