getDiShi method

String getDiShi(
  1. int zhiIndex
)

Implementation

String getDiShi(int zhiIndex) {
  int? offset = CHANG_SHENG_OFFSET[getDayGan()];
  int index = offset! + (getDayGanIndex() % 2 == 0 ? zhiIndex : -zhiIndex);
  if (index >= 12) {
    index -= 12;
  }
  if (index < 0) {
    index += 12;
  }
  return CHANG_SHENG[index];
}