mirror of
https://gitee.com/dromara/hutool.git
synced 2025-07-16 16:50:45 +08:00
Merge branch 'v6-dev' of gitee.com:dromara/hutool into v6-dev
This commit is contained in:
commit
0ac5b56180
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# 6.0.0-M9 (2023-11-29)
|
# 6.0.0-M10 (2023-12-23)
|
||||||
|
|
||||||
### 计划实现
|
### 计划实现
|
||||||
* 【poi 】 Markdown相关(如HTML转换等),基于commonmark-java
|
* 【poi 】 Markdown相关(如HTML转换等),基于commonmark-java
|
||||||
|
@ -144,18 +144,18 @@ We provide the T-Shirt and Sweater with Hutool Logo, please visit the shop:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 🍐Gradle
|
### 🍐Gradle
|
||||||
```
|
```
|
||||||
implementation 'org.dromara.hutool:hutool-all:6.0.0-M9'
|
implementation 'org.dromara.hutool:hutool-all:6.0.0-M10'
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📥Download
|
## 📥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:
|
> 🔔️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.
|
> Hutool 5.x supports JDK8+ and is not tested on Android platforms, and cannot guarantee that all tool classes or tool methods are available.
|
||||||
|
@ -139,21 +139,21 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 🍐Gradle
|
### 🍐Gradle
|
||||||
|
|
||||||
```
|
```
|
||||||
implementation 'org.dromara.hutool:hutool-all:6.0.0-M9'
|
implementation 'org.dromara.hutool:hutool-all:6.0.0-M10'
|
||||||
```
|
```
|
||||||
|
|
||||||
### 📥下载jar
|
### 📥下载jar
|
||||||
|
|
||||||
点击以下链接,下载`hutool-all-X.X.X.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平台没有测试,不能保证所有工具类或工具方法可用。
|
> Hutool 6.x支持JDK8+,对Android平台没有测试,不能保证所有工具类或工具方法可用。
|
||||||
|
@ -1 +1 @@
|
|||||||
6.0.0-M9
|
6.0.0-M10
|
||||||
|
@ -1 +1 @@
|
|||||||
var version = '6.0.0-M9'
|
var version = '6.0.0-M10'
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-bom</artifactId>
|
<artifactId>hutool-bom</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-core</artifactId>
|
<artifactId>hutool-core</artifactId>
|
||||||
|
@ -18,11 +18,13 @@ import org.dromara.hutool.core.date.DateTime;
|
|||||||
import org.dromara.hutool.core.date.DateUtil;
|
import org.dromara.hutool.core.date.DateUtil;
|
||||||
import org.dromara.hutool.core.date.TimeUtil;
|
import org.dromara.hutool.core.date.TimeUtil;
|
||||||
import org.dromara.hutool.core.date.Zodiac;
|
import org.dromara.hutool.core.date.Zodiac;
|
||||||
|
import org.dromara.hutool.core.lang.Console;
|
||||||
import org.dromara.hutool.core.text.StrUtil;
|
import org.dromara.hutool.core.text.StrUtil;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
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());
|
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
|
// ------------------------------------------------------- private method start
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,6 +17,7 @@ import org.dromara.hutool.core.text.StrUtil;
|
|||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@ -174,4 +175,23 @@ public class ChineseDateTest {
|
|||||||
chineseDate = new ChineseDate(1998, 5, 1, false);
|
chineseDate = new ChineseDate(1998, 5, 1, false);
|
||||||
Assertions.assertEquals("1998-05-26 00:00:00", chineseDate.getGregorianDate().toString());
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-cron</artifactId>
|
<artifactId>hutool-cron</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-crypto</artifactId>
|
<artifactId>hutool-crypto</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-db</artifactId>
|
<artifactId>hutool-db</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-extra</artifactId>
|
<artifactId>hutool-extra</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-http</artifactId>
|
<artifactId>hutool-http</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-json</artifactId>
|
<artifactId>hutool-json</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-log</artifactId>
|
<artifactId>hutool-log</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-poi</artifactId>
|
<artifactId>hutool-poi</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-setting</artifactId>
|
<artifactId>hutool-setting</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-socket</artifactId>
|
<artifactId>hutool-socket</artifactId>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hutool-swing</artifactId>
|
<artifactId>hutool-swing</artifactId>
|
||||||
|
2
pom.xml
2
pom.xml
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<groupId>org.dromara.hutool</groupId>
|
<groupId>org.dromara.hutool</groupId>
|
||||||
<artifactId>hutool-parent</artifactId>
|
<artifactId>hutool-parent</artifactId>
|
||||||
<version>6.0.0-M9</version>
|
<version>6.0.0-M10</version>
|
||||||
<name>hutool</name>
|
<name>hutool</name>
|
||||||
<description>
|
<description>
|
||||||
Hutool是一个功能丰富且易用的Java工具库,通过诸多实用工具类的使用,旨在帮助开发者快速、便捷地完成各类开发任务。这些封装的工具涵盖了字符串、数字、集合、编码、日期、文件、IO、加密、数据库JDBC、JSON、HTTP客户端等一系列操作,可以满足各种不同的开发需求。
|
Hutool是一个功能丰富且易用的Java工具库,通过诸多实用工具类的使用,旨在帮助开发者快速、便捷地完成各类开发任务。这些封装的工具涵盖了字符串、数字、集合、编码、日期、文件、IO、加密、数据库JDBC、JSON、HTTP客户端等一系列操作,可以满足各种不同的开发需求。
|
||||||
|
Loading…
Reference in New Issue
Block a user