1
0
mirror of synced 2025-12-13 16:48:01 +08:00

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

This commit is contained in:
6tail
2020-10-25 13:16:39 +08:00
parent 0638aaf1de
commit c9edcbc697
2 changed files with 5 additions and 4 deletions

View File

@@ -2855,17 +2855,18 @@
};
};
var buildDaYun = function(yun, index){
var birthYear = yun.getLunar().getSolar().getYear();
var year = yun.getStartSolar().getYear();
var startYear,startAge,endYear,endAge;
if (index < 1) {
startYear = lunar.getSolar().getYear();
startYear = birthYear;
startAge = 1;
endYear = year - 1;
endAge = yun.getStartYear();
endAge = year - birthYear;
} else {
var add = (index - 1) * 10;
startYear = year + add;
startAge = yun.getStartYear() + add + 1;
startAge = startYear - birthYear + 1;
endYear = startYear + 9;
endAge = startAge + 9;
}

View File

@@ -1,6 +1,6 @@
{
"name": "lunar-javascript",
"version": "1.0.26",
"version": "1.0.27",
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
"main": "index.js",
"scripts": {