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]); }
public int getDayGanIndex() { return((2 == sect) ? lunar.getDayGanIndexExact2() : lunar.getDayGanIndexExact()); }