v1.4.0 修复九星错别字;优化每日宜忌算法;去除每日宜忌的重复项。
This commit is contained in:
@@ -14,3 +14,8 @@
|
||||
|
||||
## [1.3.15] - 2024-11-12
|
||||
1. 新增2025年法定假日数据。
|
||||
|
||||
## [1.4.0] - 2025-02-06
|
||||
1. 修复九星错别字。
|
||||
2. 优化每日宜忌算法。
|
||||
3. 去除每日宜忌的重复项。
|
||||
|
||||
@@ -16,7 +16,7 @@ lunar是一款无第三方依赖的公历(阳历)、农历(阴历、老黄历)
|
||||
<dependency>
|
||||
<groupId>cn.6tail</groupId>
|
||||
<artifactId>lunar</artifactId>
|
||||
<version>1.3.15</version>
|
||||
<version>1.4.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ lunar is a calendar library for Solar and Chinese Lunar.
|
||||
<dependency>
|
||||
<groupId>cn.6tail</groupId>
|
||||
<artifactId>lunar</artifactId>
|
||||
<version>1.3.15</version>
|
||||
<version>1.4.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
||||
3
pom.xml
3
pom.xml
@@ -7,7 +7,7 @@
|
||||
<groupId>cn.6tail</groupId>
|
||||
<artifactId>lunar</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.3.15</version>
|
||||
<version>1.4.0</version>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<url>https://github.com/6tail/lunar-java</url>
|
||||
<description>a calendar library for Solar and Chinese Lunar</description>
|
||||
@@ -104,6 +104,7 @@
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
<source>${source-version}</source>
|
||||
</configuration>
|
||||
|
||||
@@ -18,7 +18,7 @@ public class NineStar {
|
||||
/**
|
||||
* 七色
|
||||
*/
|
||||
public static final String[] COLOR = {"白", "黒", "碧", "绿", "黄", "白", "赤", "白", "紫"};
|
||||
public static final String[] COLOR = {"白", "黑", "碧", "绿", "黄", "白", "赤", "白", "紫"};
|
||||
|
||||
/**
|
||||
* 五行
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.nlf.calendar.util.LunarUtil;
|
||||
*/
|
||||
public class LiuYue {
|
||||
/**
|
||||
* 序数,0-9
|
||||
* 序数,0-11
|
||||
*/
|
||||
private final int index;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -7,8 +7,7 @@ import org.junit.Test;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 农历测试
|
||||
@@ -409,7 +408,7 @@ public class LunarTest {
|
||||
Lunar lunar = solar.getLunar();
|
||||
Assert.assertEquals("甲辰", lunar.getMonthInGanZhi());
|
||||
Assert.assertEquals("癸卯", lunar.getMonthInGanZhiExact());
|
||||
Assert.assertEquals(4, lunar.getDayJi().size());
|
||||
Assert.assertEquals("[出火, 入宅, 安葬, 伐木]", lunar.getDayJi().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -56,7 +56,7 @@ public class NineStarTest {
|
||||
@Test
|
||||
public void test8() {
|
||||
LunarMonth m = LunarMonth.fromYm(2022, 1);
|
||||
Assert.assertEquals("二黒土天璇", m.getNineStar().toString());
|
||||
Assert.assertEquals("二黑土天璇", m.getNineStar().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -77,4 +77,12 @@ public class NineStarTest {
|
||||
Assert.assertEquals("七赤金摇光", d.getTimeNineStar().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test12() {
|
||||
LunarMonth m = LunarMonth.fromYm(2024, 11);
|
||||
Assert.assertEquals("四绿木天权", m.getNineStar().toString());
|
||||
m = LunarMonth.fromYm(2024, 12);
|
||||
Assert.assertEquals("三碧木天玑", m.getNineStar().toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user