fixEarthlyBranchIndex function
处理地支相对于十二宫的索引,因为十二宫是以寅宫开始,所以下标需要减去地支寅的索引
@param {EarthlyBranchName} earthlyBranch 地支 @returns {number} Number(0~11)
Implementation
int fixEarthlyBranchIndex(EarthlyBranchName earthlyBranchName) {
return fixIndex(
earthlyBranches.indexOf(earthlyBranchName.key) -
earthlyBranches.indexOf(yinEarthly),
);
}