INNER CODE UNIT · Java
tempMonth
xkzhangsan/xk-time · src/main/java/com/xkzhangsan/time/LunarDate.java:556
int tempMonth = month - 1;
int firstSolarTermOfMonth = solarTerm(year, tempMonth*2);
int secondSolarTermOfMonth = solarTerm(year, tempMonth*2+1);
if(day == firstSolarTermOfMonth){
solarTermIndex = tempMonth*2;
}else if(day == secondSolarTermOfMonth){
solarTermIndex = tempMonth*2 + 1;
}
nongDate[7] = solarTermIndex;
return nongDate;
}
/**
* 获取农历中文年
* @param year 年
* @return String
*/
public final static String getChinaYear(int year) {