earthBranchDay method
PWBEarthBranchModel
earthBranchDay()
Implementation
PWBEarthBranchModel earthBranchDay() {
String start = "1921-01-01 00:00:00"; // 甲子日起算
DateTime dateStart = DateTime.parse(start).toLocal();
Duration duration = theDate.difference(dateStart);
int index = duration.inDays % 12;
index = index >= 0 ? index : index + 12;
return PWBEarthBranchModel(PWBEarchBranchEnum.values[index]);
}