Skip to content

Commit

Permalink
v1.3.15 新增2025年法定假日数据。
Browse files Browse the repository at this point in the history
  • Loading branch information
6tail committed Nov 12, 2024
1 parent 701cec1 commit b6bde78
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@

## [1.3.14] - 2024-03-17
1. 修复八字转阳历存在遗漏的问题。

## [1.3.15] - 2024-11-12
1. 新增2025年法定假日数据。
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lunar是一款无第三方依赖的公历(阳历)、农历(阴历、老黄历)
<dependency>
<groupId>cn.6tail</groupId>
<artifactId>lunar</artifactId>
<version>1.3.14</version>
<version>1.3.15</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/nlf/calendar/Solar.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ public Solar(int year, int month, int day, int hour, int minute, int second) {
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));
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/nlf/calendar/util/HolidayUtil.java

Large diffs are not rendered by default.

0 comments on commit b6bde78

Please sign in to comment.