mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix next bug
This commit is contained in:
@@ -91,9 +91,10 @@ public class CronPatternNextMatchTest {
|
||||
@Test
|
||||
public void nextMatchAfterByWeekTest(){
|
||||
CronPattern pattern = new CronPattern("1 1 1 * * Sat *");
|
||||
// 周五
|
||||
final DateTime time = DateUtil.parse("2022-04-01");
|
||||
// 周日,下个周六在4月9日
|
||||
final DateTime time = DateUtil.parse("2022-04-03");
|
||||
assert time != null;
|
||||
final Calendar calendar = pattern.nextMatchAfter(time.toCalendar());
|
||||
Assert.assertEquals("2022-04-09 01:01:01", DateUtil.date(calendar).toString());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user