com.twitter.common.util
Class DateUtils

java.lang.Object
  extended by com.twitter.common.util.DateUtils

public final class DateUtils
extends Object

Utilities for working with java Dates.


Method Summary
static Date ago(Date referenceDate, int calendarField, int amount)
           
static Date ago(int calendarField, int amount)
           
static Date now()
           
static long nowUnixTime()
           
static long toUnixTime(Date date)
           
static long toUnixTime(long millisSinceEpoch)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

now

public static Date now()

toUnixTime

public static long toUnixTime(Date date)

nowUnixTime

public static long nowUnixTime()

toUnixTime

public static long toUnixTime(long millisSinceEpoch)

ago

public static Date ago(int calendarField,
                       int amount)

ago

public static Date ago(Date referenceDate,
                       int calendarField,
                       int amount)