org.jete.util
Class DateOffset

java.lang.Object
  extended byjava.util.Date
      extended byorg.jete.util.DateOffset
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class DateOffset
extends java.util.Date

Simply create a Date object with the appropriate offset specified by the constructor. This is helpful for date relative testing situations.

The constructor takes a long value as the millisecond offset used when creating the date. This may be positive or negative. All other functionality is the same as java.util.Date, as this class is really just a wrapper for the java.util.Date object.

Version:
$Id: DateOffset.html,v 1.2 2006/03/12 02:47:03 tdeast Exp $
See Also:
Serialized Form

Constructor Summary
DateOffset(java.util.Date date, long milliseconds)
          The date submitted is the initial date for the object, with milliseconds representing the offset
DateOffset(long milliseconds)
          The milliseconds are added to the current date.
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, toString, UTC
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateOffset

public DateOffset(long milliseconds)
The milliseconds are added to the current date.

Parameters:
milliseconds -

DateOffset

public DateOffset(java.util.Date date,
                  long milliseconds)
The date submitted is the initial date for the object, with milliseconds representing the offset

Parameters:
date -
milliseconds -