1
0
mirror of synced 2026-10-20 05:26:12 +08:00

v1.3.4 LunarMonth增加序号、干支、财神方位等;完善纪念日。

This commit is contained in:
6tail
2023-03-27 21:39:16 +08:00
parent 586a8d3f1e
commit 3ef8d0c657
15 changed files with 301 additions and 40 deletions

View File

@@ -1776,9 +1776,7 @@ public class Lunar {
* @return 值日天神
*/
public String getDayTianShen() {
String monthZhi = getMonthZhi();
int offset = LunarUtil.ZHI_TIAN_SHEN_OFFSET.get(monthZhi);
return LunarUtil.TIAN_SHEN[(dayZhiIndex + offset) % 12 + 1];
return LunarUtil.TIAN_SHEN[(dayZhiIndex + LunarUtil.ZHI_TIAN_SHEN_OFFSET.get(getMonthZhi())) % 12 + 1];
}
/**
@@ -1787,9 +1785,7 @@ public class Lunar {
* @return 值时天神
*/
public String getTimeTianShen() {
String dayZhi = getDayZhiExact();
int offset = LunarUtil.ZHI_TIAN_SHEN_OFFSET.get(dayZhi);
return LunarUtil.TIAN_SHEN[(timeZhiIndex + offset) % 12 + 1];
return LunarUtil.TIAN_SHEN[(timeZhiIndex + LunarUtil.ZHI_TIAN_SHEN_OFFSET.get(getDayZhiExact())) % 12 + 1];
}
/**