public class CronUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getDaysInMonth(byte month,
int year)
Calculates the amount of days of a month in a specified year.
|
static Date |
getNextMatchingDate(String cronTab)
Uses the cron tab to calculate the first matching date after the current
date + one minute.
|
static Date |
getNextMatchingDate(String cronTab,
Date earliestPossibleDate)
Uses the cron tab to calculate the first date that is equal or later than
a specified date.
|
public static Date getNextMatchingDate(String cronTab) throws IllegalArgumentException
cronTab - the crontab of which the next date is to be generatedIllegalArgumentExceptionpublic static Date getNextMatchingDate(String cronTab, Date earliestPossibleDate) throws IllegalArgumentException
cronTab - the crontab of which the next date is to be generatedearliestPossibleDate - the earliest date that is allowed to matchIllegalArgumentExceptionpublic static int getDaysInMonth(byte month,
int year)
month - the month of which the number of days are returnedyear - the year of the monthCopyright © 2017–2019. All rights reserved.