getDiShi method

String getDiShi(
  1. int zhiIndex
)

Implementation

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