1
0
mirror of synced 2025-12-15 01:47:58 +08:00

v1.3.15 新增2025年法定假日数据。

This commit is contained in:
6tail
2024-11-12 21:14:19 +08:00
parent 701cec10a0
commit b6bde78e59
6 changed files with 12 additions and 6 deletions

View File

@@ -11,3 +11,6 @@
## [1.3.14] - 2024-03-17
1. 修复八字转阳历存在遗漏的问题。
## [1.3.15] - 2024-11-12
1. 新增2025年法定假日数据。

View File

@@ -16,7 +16,7 @@ lunar是一款无第三方依赖的公历(阳历)、农历(阴历、老黄历)
<dependency>
<groupId>cn.6tail</groupId>
<artifactId>lunar</artifactId>
<version>1.3.14</version>
<version>1.3.15</version>
</dependency>
```

View File

@@ -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.14</version>
<version>1.3.15</version>
</dependency>
```

View File

@@ -7,7 +7,7 @@
<groupId>cn.6tail</groupId>
<artifactId>lunar</artifactId>
<packaging>jar</packaging>
<version>1.3.14</version>
<version>1.3.15</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>

View File

@@ -89,9 +89,13 @@ public class Solar {
if (month < 1 || month > 12) {
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));
}
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) {
throw new IllegalArgumentException(String.format("wrong hour %d", hour));
}

File diff suppressed because one or more lines are too long