ca.uhn.cache.internal.util
Class UTC

java.lang.Object
  extended byca.uhn.cache.internal.util.UTC

public final class UTC
extends java.lang.Object

Utility class to handle time and Univertal Time Coordinates (UTC).

Version:
$Revision: 1.1 $ updated on $Date: 2005/01/24 22:53:25 $ by $Author: bryan_tripp $
Author:
Alexei Guevara

Method Summary
static java.util.Date currentTime()
           
static java.util.Date fromCurrentTime(int theYearsDelta, int theMonthsDelta, int theDaysDelta)
          Time Arithmetic function.
static java.util.Date fromCurrentTime(long theMillis)
          Time Arithmetic function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

currentTime

public static final java.util.Date currentTime()
Returns:
The current UTC time.

fromCurrentTime

public static final java.util.Date fromCurrentTime(int theYearsDelta,
                                                   int theMonthsDelta,
                                                   int theDaysDelta)
Time Arithmetic function. Adds the specified (signed) amount of years, months and days to the currentTime and returns it.

Parameters:
theYearsDelta - The years to add.
theMonthsDelta - The months to add.
theDaysDelta - The days to add.
Returns:
The new date/time.

fromCurrentTime

public static final java.util.Date fromCurrentTime(long theMillis)
Time Arithmetic function. Adds the specified (signed) amount of milliseconds to currentTime and returns it.

Parameters:
theMillis - The milliseconds to add.
Returns:
The new date/time.


Copyright © 2004-2005 University Health Network. All Rights Reserved.