1
0
mirror of synced 2026-10-16 11:36:11 +08:00

v1.7.5 修复极端情况下八字转公历时刻出现遗漏的问题;更新△T参数;优化吉神宜驱、凶神宜忌。

This commit is contained in:
6tail
2025-10-01 10:39:10 +08:00
parent 664af99ae0
commit cb931339cf
11 changed files with 185 additions and 96 deletions

View File

@@ -1889,7 +1889,7 @@ public class Lunar {
* @return 日吉神
*/
public List<String> getDayJiShen() {
return LunarUtil.getDayJiShen(getMonth(), getDayInGanZhi());
return LunarUtil.getDayJiShen(getMonthZhiIndex(), getDayInGanZhi());
}
/**
@@ -1898,7 +1898,7 @@ public class Lunar {
* @return 日凶煞
*/
public List<String> getDayXiongSha() {
return LunarUtil.getDayXiongSha(getMonth(), getDayInGanZhi());
return LunarUtil.getDayXiongSha(getMonthZhiIndex(), getDayInGanZhi());
}
/**

View File

@@ -357,6 +357,9 @@ public class Solar {
}
// 验证一下
Solar solar = Solar.fromYmdHms(solarTime.getYear(), solarTime.getMonth(), solarTime.getDay(), hour, mi, s);
if (d == 30) {
solar = solar.nextHour(-1);
}
Lunar lunar = solar.getLunar();
String dgz = (2 == sect) ? lunar.getDayInGanZhiExact2() : lunar.getDayInGanZhiExact();
if (lunar.getYearInGanZhiExact().equals(yearGanZhi) && lunar.getMonthInGanZhiExact().equals(monthGanZhi) && dgz.equals(dayGanZhi) && lunar.getTimeInGanZhi().equals(timeGanZhi)) {

File diff suppressed because one or more lines are too long

View File

@@ -6,7 +6,7 @@ import com.nlf.calendar.Solar;
* 寿星天文历工具
*
* @author 6tail
* @link http://www.nongli.net/sxwnl/
* @link https://github.com/sxwnl/sxwnl
*/
public class ShouXingUtil {
/**
@@ -56,10 +56,18 @@ public class ShouXingUtil {
2000, 63.87, 0.1, 0, 0,
2005, 64.7, 0.21, 0, 0,
2012, 66.8, 0.22, 0, 0,
2018, 73.6, 0.40, 0, 0,
2021, 78.1, 0.44, 0, 0,
2024, 83.1, 0.55, 0, 0,
2028, 98.6
// 2018, 69.0, 0.36, 0, 0,
// 使用skyfeild的DE440s△T预测数据拟合
2016, 68.1024, 0.5456, -0.0542, -0.001172,
2020, 69.3612, 0.0422, -0.0502, 0.006216,
2024, 69.1752, -0.0335, -0.0048, 0.000811,
2028, 69.0206, -0.0275, 0.0055, -0.000014,
2032, 68.9981, 0.0163, 0.0054, 0.000006,
2036, 69.1498, 0.0599, 0.0053, 0.000026,
2040, 69.4751, 0.1035, 0.0051, 0.000046,
2044, 69.9737, 0.1469, 0.0050, 0.000066,
2048, 70.6451, 0.1903, 0.0049, 0.000085,
2050, 71.0457
};
private static final double[] XL0 = {
10000000000D,