getMonthNineStar method
Implementation
NineStar getMonthNineStar([int sect = 2]) {
int yearZhiIndex;
int monthZhiIndex;
switch (sect) {
case 1:
yearZhiIndex = _yearZhiIndex;
monthZhiIndex = _monthZhiIndex;
break;
case 3:
yearZhiIndex = _yearZhiIndexExact;
monthZhiIndex = _monthZhiIndexExact;
break;
default:
yearZhiIndex = _yearZhiIndexByLiChun;
monthZhiIndex = _monthZhiIndex;
}
int n = 27 - yearZhiIndex % 3 * 3;
if (monthZhiIndex < LunarUtil.BASE_MONTH_ZHI_INDEX) {
n -= 3;
}
return NineStar.fromIndex((n - monthZhiIndex) % 9);
}