1
0
mirror of synced 2026-10-17 20:16:11 +08:00

v1.2.26 修复物候的错误。

This commit is contained in:
6tail
2022-11-01 21:17:54 +08:00
parent ee0b227f75
commit 51afe36b4b
3 changed files with 21 additions and 2 deletions

View File

@@ -2990,7 +2990,11 @@ public class Lunar {
}
Solar startSolar = jieQi.getSolar();
int days = ExactDate.getDaysBetween(startSolar.getYear(), startSolar.getMonth(), startSolar.getDay(), solar.getYear(), solar.getMonth(), solar.getDay());
return LunarUtil.WU_HOU[(offset * 3 + days / 5) % LunarUtil.WU_HOU.length];
int index = days / 5;
if (index > 2) {
index = 2;
}
return LunarUtil.WU_HOU[(offset * 3 + index) % LunarUtil.WU_HOU.length];
}
/**