1
0
mirror of synced 2026-04-09 01:48:41 +08:00

修复八字排盘流年干支错误。

This commit is contained in:
6tail
2020-10-25 13:08:43 +08:00
parent 5680eb8d44
commit cc9444aa03
2 changed files with 52 additions and 3 deletions

View File

@@ -39,16 +39,17 @@ public class DaYun {
this.yun = yun;
this.lunar = yun.getLunar();
this.index = index;
int birthYear = lunar.getSolar().getYear();
int year = yun.getStartSolar().getYear();
if (index < 1) {
this.startYear = lunar.getSolar().getYear();
this.startYear = birthYear;
this.startAge = 1;
this.endYear = year - 1;
this.endAge = yun.getStartYear();
this.endAge = year - birthYear;
} else {
int add = (index - 1) * 10;
this.startYear = year + add;
this.startAge = yun.getStartYear() + add + 1;
this.startAge = this.startYear - birthYear + 1;
this.endYear = this.startYear + 9;
this.endAge = this.startAge + 9;
}