v1.2.23 新增525心理健康节;修复出现多个全国中小学生安全教育日的问题;新增胎息。
This commit is contained in:
@@ -474,6 +474,26 @@ public class EightChar {
|
||||
return LunarUtil.NAYIN.get(getTaiYuan());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取胎息
|
||||
*
|
||||
* @return 胎息
|
||||
*/
|
||||
public String getTaiXi() {
|
||||
int ganIndex = (2 == sect) ? lunar.getDayGanIndexExact2() : lunar.getDayGanIndexExact();
|
||||
int zhiIndex = (2 == sect) ? lunar.getDayZhiIndexExact2() : lunar.getDayZhiIndexExact();
|
||||
return LunarUtil.HE_GAN_5[ganIndex] + LunarUtil.HE_ZHI_6[zhiIndex];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取胎息纳音
|
||||
*
|
||||
* @return 纳音
|
||||
*/
|
||||
public String getTaiXiNaYin() {
|
||||
return LunarUtil.NAYIN.get(getTaiXi());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取命宫
|
||||
*
|
||||
@@ -531,7 +551,10 @@ public class EightChar {
|
||||
timeZhiIndex = i;
|
||||
}
|
||||
}
|
||||
int zhiIndex = (2 + (monthZhiIndex + timeZhiIndex)) % 12;
|
||||
int zhiIndex = 2 + monthZhiIndex + timeZhiIndex;
|
||||
if (zhiIndex > 12) {
|
||||
zhiIndex -= 12;
|
||||
}
|
||||
int jiaZiIndex = LunarUtil.getJiaZiIndex(lunar.getMonthInGanZhiExact()) - (monthZhiIndex - zhiIndex);
|
||||
if (jiaZiIndex >= 60) {
|
||||
jiaZiIndex -= 60;
|
||||
|
||||
Reference in New Issue
Block a user