skyTrunkMonth method
PWBSkyTrunkModel
skyTrunkMonth()
Implementation
PWBSkyTrunkModel skyTrunkMonth() {
int yearIndex = skyTrunkYear().value.index % 5; //find(天干表, 年干)! % 5
int monthIndex = earthBranchMonth().value.index; //find(地支表, 月支)!
if (monthIndex == 0 || monthIndex == 1) {
monthIndex += 12;
}
int index = (yearIndex * 2 + monthIndex) % 10;
return PWBSkyTrunkModel(PWBSkyTrunkEnum.values[index]);
}