public class Time extends Object
Time utils
| 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.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
cronInterval(String cron)
Compute the number of milliseconds between the next valid date and the one after
|
static long |
cronInterval(String cron,
Date date)
Compute the number of milliseconds between the next valid date and the one after
|
static Date |
parseCRONExpression(String cron)
Parse a CRON expression
|
static int |
parseDuration(String duration)
Parse a duration
|
public static int parseDuration(String duration)
Parse a duration
duration - 3h, 2mn, 7spublic static Date parseCRONExpression(String cron)
Parse a CRON expression
cron - The CRON Stringpublic static long cronInterval(String cron)
Compute the number of milliseconds between the next valid date and the one after
cron - The CRON Stringpublic static long cronInterval(String cron, Date date)
Compute the number of milliseconds between the next valid date and the one after
cron - The CRON Stringdate - The date to start searchCopyright © 2017–2021 OSGL (Open Source General Library). All rights reserved.