anl.aida.types
Class DateUtils

java.lang.Object
  extended by anl.aida.types.DateUtils

public class DateUtils
extends java.lang.Object

Utility methods for working with anl.aida.types.Dates. This assumes Date is 1-based -- that is, January is month 1 rather than java.util.Date where January is month 0.

Author:
Nick Collier

Field Summary
private static java.util.Calendar cal
           
 
Constructor Summary
DateUtils()
           
 
Method Summary
 java.util.Date toJDate(Date date)
          Creates a Java Date from an anl.aida.types.Date.
 long toTime(Date date)
          Gets the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the specified Date object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cal

private static final java.util.Calendar cal
Constructor Detail

DateUtils

public DateUtils()
Method Detail

toJDate

public java.util.Date toJDate(Date date)
Creates a Java Date from an anl.aida.types.Date.

Parameters:
date - the Date type
Returns:
the created Date

toTime

public long toTime(Date date)
Gets the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the specified Date object.

Parameters:
date - the Date whose time we want
Returns:
the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the specified Date object.