play.libs
Class Time

java.lang.Object
  extended by play.libs.Time

public class Time
extends java.lang.Object

Time utils


Constructor Summary
Time()
           
 
Method Summary
static java.util.Date parseCRONExpression(java.lang.String cron)
          Parse a CRON expression
static int parseDuration(java.lang.String duration)
          Parse a duration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Time

public Time()
Method Detail

parseDuration

public static int parseDuration(java.lang.String duration)
Parse a duration

Parameters:
duration - 3h, 2mn, 7s
Returns:
The number of seconds

parseCRONExpression

public static java.util.Date parseCRONExpression(java.lang.String cron)
Parse a CRON expression

Parameters:
cron - The CRON String
Returns:
The next Date that satisfie teh expression


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly