DaYun constructor
Implementation
DaYun(Yun yun, int index) {
_yun = yun;
_lunar = yun.getLunar();
_index = index;
int birthYear = _lunar!.getSolar().getYear();
int year = yun.getStartSolar().getYear();
if (index < 1) {
_startYear = birthYear;
_startAge = 1;
_endYear = year - 1;
_endAge = year - birthYear;
} else {
int add = (index - 1) * 10;
_startYear = year + add;
_startAge = _startYear - birthYear + 1;
_endYear = _startYear + 9;
_endAge = _startAge + 9;
}
}