private string getDiShi(int zhiIndex) { int offset = CHANG_SHENG_OFFSET[getDayGan()]; int index = offset + (lunar.getDayGanIndexExact() % 2 == 0 ? zhiIndex : -zhiIndex); if (index >= 12) { index -= 12; } if (index < 0) { index += 12; } return(CHANG_SHENG[index]); }