1
0
mirror of synced 2026-10-21 22:16:11 +08:00

修复闰冬月、闰腊月的问题;修复日历不准的问题;修复物候错误;大运、小运、流年支持自定义轮数。

This commit is contained in:
6tail
2021-09-13 15:41:49 +08:00
parent d26313d2e3
commit c93031cc28
10 changed files with 314 additions and 99 deletions

View File

@@ -2590,6 +2590,6 @@ public class Lunar {
Calendar startCalendar = ExactDate.fromYmd(startSolar.getYear(), startSolar.getMonth(), startSolar.getDay());
int days = (int) ((currentCalendar.getTimeInMillis() - startCalendar.getTimeInMillis()) / MS_PER_DAY);
return LunarUtil.WU_HOU[offset * 3 + days / 5];
return LunarUtil.WU_HOU[(offset * 3 + days / 5) % LunarUtil.WU_HOU.length];
}
}