jsdsi.util
Class DateUtil

java.lang.Object
  extended byjsdsi.util.DateUtil

public class DateUtil
extends java.lang.Object

Static utility class for java.util.Dates.

Version:
$Revision: 1.2 $ $Date: 2004/05/07 13:17:39 $
Author:
Sean Radford

Method Summary
static java.util.Date newDate()
          Returns a new java.util.Date set to 'now' except that the milliseconds are zero
static java.util.Date newDate(int yearChange)
          Returns a zero-millisecond java.util.Date set to 'now' but with the YEAR modified by yearChange
static java.util.Date newDate(int yearChange, int monthChange)
          Returns a zero-millisecond java.util.Date set to 'now' but with the YEAR modified by yearChange and the MONTH modified by monthChange
static java.util.Date newDate(int yearChange, int monthChange, int dayChange)
          Returns a zero-millisecond java.util.Date set to 'now' but with the YEAR modified by yearChange, the MONTH modified by monthChange, and the DAY modified by dayChange
static java.util.Date newDate(int yearChange, int monthChange, int dayChange, int hourChange)
           
static java.util.Date newDate(int yearChange, int monthChange, int dayChange, int hourChange, int minuteChange)
           
static java.util.Date newDate(int yearChange, int monthChange, int dayChange, int hourChange, int minuteChange, int secondChange)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newDate

public static java.util.Date newDate()
Returns a new java.util.Date set to 'now' except that the milliseconds are zero

Returns:
the date

newDate

public static java.util.Date newDate(int yearChange)
Returns a zero-millisecond java.util.Date set to 'now' but with the YEAR modified by yearChange

Parameters:
yearChange - The value to change the year by
Returns:
the date

newDate

public static java.util.Date newDate(int yearChange,
                                     int monthChange)
Returns a zero-millisecond java.util.Date set to 'now' but with the YEAR modified by yearChange and the MONTH modified by monthChange

Parameters:
yearChange -
monthChange -
Returns:
the date

newDate

public static java.util.Date newDate(int yearChange,
                                     int monthChange,
                                     int dayChange)
Returns a zero-millisecond java.util.Date set to 'now' but with the YEAR modified by yearChange, the MONTH modified by monthChange, and the DAY modified by dayChange

Parameters:
yearChange -
monthChange -
dayChange -
Returns:
the date

newDate

public static java.util.Date newDate(int yearChange,
                                     int monthChange,
                                     int dayChange,
                                     int hourChange)
Parameters:
yearChange -
monthChange -
dayChange -
hourChange -
Returns:
the date

newDate

public static java.util.Date newDate(int yearChange,
                                     int monthChange,
                                     int dayChange,
                                     int hourChange,
                                     int minuteChange)
Parameters:
yearChange -
monthChange -
dayChange -
hourChange -
minuteChange -
Returns:
the date

newDate

public static java.util.Date newDate(int yearChange,
                                     int monthChange,
                                     int dayChange,
                                     int hourChange,
                                     int minuteChange,
                                     int secondChange)
Parameters:
yearChange -
monthChange -
dayChange -
hourChange -
minuteChange -
secondChange -
Returns:
the date


Copyright © 2002-2006 JSDSI. All Rights Reserved.