v1.3.15 新增2025年法定假日数据。
This commit is contained in:
@@ -11,3 +11,6 @@
|
|||||||
|
|
||||||
## [1.3.14] - 2024-03-17
|
## [1.3.14] - 2024-03-17
|
||||||
1. 修复八字转阳历存在遗漏的问题。
|
1. 修复八字转阳历存在遗漏的问题。
|
||||||
|
|
||||||
|
## [1.3.15] - 2024-11-12
|
||||||
|
1. 新增2025年法定假日数据。
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ lunar是一款无第三方依赖的公历(阳历)、农历(阴历、老黄历)
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.6tail</groupId>
|
<groupId>cn.6tail</groupId>
|
||||||
<artifactId>lunar</artifactId>
|
<artifactId>lunar</artifactId>
|
||||||
<version>1.3.14</version>
|
<version>1.3.15</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ lunar is a calendar library for Solar and Chinese Lunar.
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.6tail</groupId>
|
<groupId>cn.6tail</groupId>
|
||||||
<artifactId>lunar</artifactId>
|
<artifactId>lunar</artifactId>
|
||||||
<version>1.3.14</version>
|
<version>1.3.15</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -7,7 +7,7 @@
|
|||||||
<groupId>cn.6tail</groupId>
|
<groupId>cn.6tail</groupId>
|
||||||
<artifactId>lunar</artifactId>
|
<artifactId>lunar</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.3.14</version>
|
<version>1.3.15</version>
|
||||||
<name>${project.groupId}:${project.artifactId}</name>
|
<name>${project.groupId}:${project.artifactId}</name>
|
||||||
<url>https://github.com/6tail/lunar-java</url>
|
<url>https://github.com/6tail/lunar-java</url>
|
||||||
<description>a calendar library for Solar and Chinese Lunar</description>
|
<description>a calendar library for Solar and Chinese Lunar</description>
|
||||||
|
|||||||
@@ -89,9 +89,13 @@ public class Solar {
|
|||||||
if (month < 1 || month > 12) {
|
if (month < 1 || month > 12) {
|
||||||
throw new IllegalArgumentException(String.format("wrong month %d", month));
|
throw new IllegalArgumentException(String.format("wrong month %d", month));
|
||||||
}
|
}
|
||||||
if (day < 1 || day > 31) {
|
if (day < 1) {
|
||||||
throw new IllegalArgumentException(String.format("wrong day %d", day));
|
throw new IllegalArgumentException(String.format("wrong day %d", day));
|
||||||
}
|
}
|
||||||
|
int days = SolarUtil.getDaysOfMonth(year, month);
|
||||||
|
if (day > days) {
|
||||||
|
throw new IllegalArgumentException(String.format("only %d days in solar year %d month %d", days, year, month));
|
||||||
|
}
|
||||||
if (hour < 0 || hour > 23) {
|
if (hour < 0 || hour > 23) {
|
||||||
throw new IllegalArgumentException(String.format("wrong hour %d", hour));
|
throw new IllegalArgumentException(String.format("wrong hour %d", hour));
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user