mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
新增了获取本月最后一天,是否为本月最后一天
This commit is contained in:
@@ -1094,4 +1094,12 @@ public class DateUtilTest {
|
||||
DateUtil.parse(sourceStr));
|
||||
Assert.assertTrue(between);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isLastDayTest(){
|
||||
DateTime dateTime = DateUtil.parse("2022-09-30");
|
||||
int dayOfMonth = DateUtil.getLastDayOfMonth(dateTime);
|
||||
Assert.assertEquals(dayOfMonth,dateTime.dayOfMonth());
|
||||
Assert.assertTrue("not is last day of this month !!",DateUtil.isLastDayOfMonth(dateTime));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user