Merge branch 'v6-dev' of gitee.com:dromara/hutool into v6-dev

This commit is contained in:
Looly 2023-12-25 11:06:05 +08:00
commit 0ac5b56180
22 changed files with 63 additions and 24 deletions

View File

@ -3,7 +3,7 @@
-------------------------------------------------------------------------------------------------------------
# 6.0.0-M9 (2023-11-29)
# 6.0.0-M10 (2023-12-23)
### 计划实现
* 【poi 】 Markdown相关如HTML转换等基于commonmark-java

View File

@ -144,18 +144,18 @@ We provide the T-Shirt and Sweater with Hutool Logo, please visit the shop
<dependency>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</dependency>
```
### 🍐Gradle
```
implementation 'org.dromara.hutool:hutool-all:6.0.0-M9'
implementation 'org.dromara.hutool:hutool-all:6.0.0-M10'
```
## 📥Download
- [Maven Repo](https://repo1.maven.org/maven2/cn/hutool/hutool-all/6.0.0-M9/)
- [Maven Repo](https://repo1.maven.org/maven2/cn/hutool/hutool-all/6.0.0-M10/)
> 🔔note:
> Hutool 5.x supports JDK8+ and is not tested on Android platforms, and cannot guarantee that all tool classes or tool methods are available.

View File

@ -139,21 +139,21 @@
<dependency>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</dependency>
```
### 🍐Gradle
```
implementation 'org.dromara.hutool:hutool-all:6.0.0-M9'
implementation 'org.dromara.hutool:hutool-all:6.0.0-M10'
```
### 📥下载jar
点击以下链接,下载`hutool-all-X.X.X.jar`即可:
- [Maven中央库](https://repo1.maven.org/maven2/org/dromara/hutool/hutool-all/6.0.0-M9/)
- [Maven中央库](https://repo1.maven.org/maven2/org/dromara/hutool/hutool-all/6.0.0-M10/)
> 🔔️注意
> Hutool 6.x支持JDK8+对Android平台没有测试不能保证所有工具类或工具方法可用。

View File

@ -1 +1 @@
6.0.0-M9
6.0.0-M10

View File

@ -1 +1 @@
var version = '6.0.0-M9'
var version = '6.0.0-M10'

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-all</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-bom</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-core</artifactId>

View File

@ -18,11 +18,13 @@ import org.dromara.hutool.core.date.DateTime;
import org.dromara.hutool.core.date.DateUtil;
import org.dromara.hutool.core.date.TimeUtil;
import org.dromara.hutool.core.date.Zodiac;
import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.core.text.StrUtil;
import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;
import java.util.Objects;
/**
@ -403,6 +405,23 @@ public class ChineseDate {
return String.format("%s%s年 %s%s", getCyclical(), getChineseZodiac(), getChineseMonthName(), getChineseDay());
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final ChineseDate that = (ChineseDate) o;
return year == that.year && month == that.month && day == that.day;
}
@Override
public int hashCode() {
return Objects.hash(year, month, day);
}
// ------------------------------------------------------- private method start
/**

View File

@ -17,6 +17,7 @@ import org.dromara.hutool.core.text.StrUtil;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.time.LocalDate;
import java.util.Date;
import java.util.Objects;
@ -174,4 +175,23 @@ public class ChineseDateTest {
chineseDate = new ChineseDate(1998, 5, 1, false);
Assertions.assertEquals("1998-05-26 00:00:00", chineseDate.getGregorianDate().toString());
}
@Test
public void equalsTest(){
// 二月初一
final Date date1 = DateUtil.date(LocalDate.of(2023, 2, 20));
// 润二月初一
final Date date2 = DateUtil.date(LocalDate.of(2023, 3, 22));
final ChineseDate chineseDate1 = new ChineseDate(date1);
final ChineseDate chineseDate2 = new ChineseDate(date2);
final ChineseDate chineseDate3 = new ChineseDate(date2);
Assertions.assertEquals("2023-02-01", chineseDate1.toStringNormal());
Assertions.assertEquals("2023-02-01", chineseDate2.toStringNormal());
Assertions.assertEquals("2023-02-01", chineseDate3.toStringNormal());
Assertions.assertNotEquals(chineseDate1, chineseDate2);
Assertions.assertEquals(chineseDate2, chineseDate3);
}
}

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-cron</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-crypto</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-db</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-extra</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-http</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-json</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-log</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-poi</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-setting</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-socket</artifactId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
</parent>
<artifactId>hutool-swing</artifactId>

View File

@ -20,7 +20,7 @@
<groupId>org.dromara.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>6.0.0-M9</version>
<version>6.0.0-M10</version>
<name>hutool</name>
<description>
Hutool是一个功能丰富且易用的Java工具库通过诸多实用工具类的使用旨在帮助开发者快速、便捷地完成各类开发任务。这些封装的工具涵盖了字符串、数字、集合、编码、日期、文件、IO、加密、数据库JDBC、JSON、HTTP客户端等一系列操作可以满足各种不同的开发需求。