public class Time
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Time.CronExpression
Thanks to Quartz project, https://quartz.dev.java.net
Provides a parser and evaluator for unix-like cron expressions.
|
Constructor and Description |
---|
Time() |
Modifier and Type | Method and Description |
---|---|
static long |
cronInterval(java.lang.String cron)
Computes the number of milliseconds between the next valid date and the one after.
|
static long |
cronInterval(java.lang.String cron,
java.util.Date date)
Compute the number of milliseconds between the next valid date and the one after.
|
static java.util.Date |
parseCRONExpression(java.lang.String cron)
Parses a CRON expression.
|
static int |
parseDuration(java.lang.String duration)
Parses a duration.
|
public static int parseDuration(java.lang.String duration)
duration
- a quantity of time, such as 3h, 2mn, 7spublic static java.util.Date parseCRONExpression(java.lang.String cron)
cron
- the CRON StringDate
that satisfies the expressionpublic static long cronInterval(java.lang.String cron)
cron
- the CRON Stringpublic static long cronInterval(java.lang.String cron, java.util.Date date)
cron
- the CRON Stringdate
- the date to start search