1
0
mirror of synced 2025-12-29 00:37:59 +08:00

增加支持月相、值年九星。

This commit is contained in:
6tail
2020-07-09 17:08:34 +08:00
parent 82c776d7dd
commit 37cc9cb4ca
3 changed files with 246 additions and 0 deletions

View File

@@ -1532,6 +1532,26 @@ public class Lunar{
return LunarUtil.getTimeJi(getDayInGanZhiExact(),getTimeInGanZhi());
}
/**
* 获取月相
* @return 月相
*/
public String getYueXiang() {
return LunarUtil.YUE_XIANG[day];
}
/**
* 获取值年九星
* @return 值年九星
*/
public NineStar getYearNineStar(){
int index = LunarUtil.BASE_YEAR_JIU_XING_INDEX-(year-LunarUtil.BASE_YEAR)%9;
if(index<0){
index += 9;
}
return new NineStar(index);
}
/**
* 获取节气表(节气名称:阳历),节气交接时刻精确到秒,以冬至开头,按先后顺序排列
* @return 节气表