diff --git a/CHANGELOG.md b/CHANGELOG.md
index 689083c..61cee7a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,3 +8,6 @@
1. 修复节气当天获取下一节气仍为当前节气的问题。
2. 修复每日宜忌存在重复项的问题。
3. 修复八字转阳历存在遗漏的问题。
+
+## [1.3.14] - 2024-03-17
+1. 修复八字转阳历存在遗漏的问题。
diff --git a/README.md b/README.md
index 870937d..02dcdba 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ lunar是一款无第三方依赖的公历(阳历)、农历(阴历、老黄历)
cn.6tail
lunar
- 1.3.13
+ 1.3.14
```
diff --git a/README_EN.md b/README_EN.md
index 27d43ce..3ef9508 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -12,7 +12,7 @@ lunar is a calendar library for Solar and Chinese Lunar.
cn.6tail
lunar
- 1.3.13
+ 1.3.14
```
diff --git a/pom.xml b/pom.xml
index 18d6cdd..cfadafd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
cn.6tail
lunar
jar
- 1.3.13
+ 1.3.14
${project.groupId}:${project.artifactId}
https://github.com/6tail/lunar-java
a calendar library for Solar and Chinese Lunar
diff --git a/src/main/java/com/nlf/calendar/Solar.java b/src/main/java/com/nlf/calendar/Solar.java
index 999eee6..eb3a96e 100644
--- a/src/main/java/com/nlf/calendar/Solar.java
+++ b/src/main/java/com/nlf/calendar/Solar.java
@@ -335,9 +335,7 @@ public static List fromBaZi(String yearGanZhi, String monthGanZhi, String
Solar solarTime = jieQiList.get(4 + m);
if (solarTime.getYear() >= baseYear) {
// 日干支和节令干支的偏移值
- Lunar lunar = solarTime.getLunar();
- String dgz = (2 == sect) ? lunar.getDayInGanZhiExact2() : lunar.getDayInGanZhiExact();
- int d = LunarUtil.getJiaZiIndex(dayGanZhi) - LunarUtil.getJiaZiIndex(dgz);
+ int d = LunarUtil.getJiaZiIndex(dayGanZhi) - LunarUtil.getJiaZiIndex(solarTime.getLunar().getDayInGanZhiExact2());
if (d < 0) {
d += 60;
}
@@ -355,8 +353,8 @@ public static List fromBaZi(String yearGanZhi, String monthGanZhi, String
}
// 验证一下
Solar solar = Solar.fromYmdHms(solarTime.getYear(), solarTime.getMonth(), solarTime.getDay(), hour, mi, s);
- lunar = solar.getLunar();
- dgz = (2 == sect) ? lunar.getDayInGanZhiExact2() : lunar.getDayInGanZhiExact();
+ 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)) {
l.add(solar);
}
diff --git a/src/test/java/test/BaZiTest.java b/src/test/java/test/BaZiTest.java
index 17b6d59..52a6001 100644
--- a/src/test/java/test/BaZiTest.java
+++ b/src/test/java/test/BaZiTest.java
@@ -530,4 +530,17 @@ public void test30() {
Assert.assertEquals(expected, actual);
}
+ @Test
+ public void test31() {
+ List l = Solar.fromBaZi("丁卯","丁未","甲申","乙丑", 1, 1900);
+ List actual = new ArrayList();
+ for (Solar solar : l) {
+ actual.add(solar.toYmdHms());
+ }
+
+ List expected = new ArrayList();
+ expected.add("1987-08-03 02:00:00");
+ Assert.assertEquals(expected, actual);
+ }
+
}