mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复ChineseDate传入农历日期非闰月时获取公历错误问题
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
package cn.hutool.core.date.chinese;
|
||||
|
||||
import cn.hutool.core.date.ChineseDate;
|
||||
import cn.hutool.core.lang.Console;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class IssueI5YB1ATest {
|
||||
@Test
|
||||
public void chineseDateTest() {
|
||||
public void chineseDateTest() {
|
||||
// 四月非闰月,因此isLeapMonth参数无效
|
||||
final ChineseDate date = new ChineseDate(2023, 4, 8, true);
|
||||
Console.log(date.getGregorianDate());
|
||||
Assert.assertEquals("2023-05-26 00:00:00", date.getGregorianDate().toString());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user