org.otfeed.support
Class DateUtil

java.lang.Object
  extended by org.otfeed.support.DateUtil

public final class DateUtil
extends java.lang.Object

Utility class: provides misc helper functions to conveniently instantiate Date class. Note that this class implicitly uses current time zone, and, therefore may not be appropriate for the applications that may be deployed in different timezones.


Method Summary
static java.util.Date getDate(int year)
          Builds Date object from date/time components.
static java.util.Date getDate(int year, int month)
          Builds Date object from date/time components.
static java.util.Date getDate(int year, int month, int day)
          Builds Date object from date/time components.
static java.util.Date getDate(int year, int month, int day, int hour)
          Builds Date object from date/time components.
static java.util.Date getDate(int year, int month, int day, int hour, int minute)
          Builds Date object from date/time components.
static java.util.Date getDate(int year, int month, int day, int hour, int minute, int second)
          Builds Date object from date/time components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDate

public static final java.util.Date getDate(int year,
                                           int month,
                                           int day,
                                           int hour,
                                           int minute,
                                           int second)
Builds Date object from date/time components.

Parameters:
year - year.
month - month.
day - day.
hour - hour.
minute - minute.
second - second.
Returns:
Date object.

getDate

public static final java.util.Date getDate(int year,
                                           int month,
                                           int day,
                                           int hour,
                                           int minute)
Builds Date object from date/time components.

Parameters:
year - year.
month - month.
day - day.
hour - hour.
minute - minute.
Returns:
Date object.

getDate

public static final java.util.Date getDate(int year,
                                           int month,
                                           int day,
                                           int hour)
Builds Date object from date/time components.

Parameters:
year - year.
month - month.
day - day.
hour - hour.
Returns:
Date object.

getDate

public static final java.util.Date getDate(int year,
                                           int month,
                                           int day)
Builds Date object from date/time components.

Parameters:
year - year.
month - month.
day - day.
Returns:
Date object.

getDate

public static final java.util.Date getDate(int year,
                                           int month)
Builds Date object from date/time components.

Parameters:
year - year.
month - month.
Returns:
Date object.

getDate

public static final java.util.Date getDate(int year)
Builds Date object from date/time components.

Parameters:
year - year.
Returns:
Date object.


Copyright © 2007 Mike Kroutikov. All Rights Reserved.