fix date bug

This commit is contained in:
Looly
2020-10-09 15:25:21 +08:00
parent ecedb5fd82
commit 308fa0f9db
4 changed files with 32 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
package cn.hutool.core.date;
import cn.hutool.core.util.StrUtil;
import org.junit.Assert;
import org.junit.Test;
@@ -77,4 +78,11 @@ public class ChineseDateTest {
chineseDate = new ChineseDate(2020,4,15);
Assert.assertEquals("闰四月", chineseDate.getChineseMonth());
}
@Test
public void getFestivalsTest(){
// issue#I1XHSF@Gitee2023-01-20对应农历腊月29非除夕
ChineseDate chineseDate = new ChineseDate(DateUtil.parseDate("2023-01-20"));
Assert.assertTrue(StrUtil.isEmpty(chineseDate.getFestivals()));
}
}