|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.j5goodies.DateUtil
public class DateUtil
A class that provides some utilities for date manipulation.
Constructor Summary | |
---|---|
DateUtil()
|
Method Summary | |
---|---|
static Date |
getDate(int year,
int zeroBasedMonth,
int day)
Construct a date. |
static Date |
getDate(int year,
int zeroBasedMonth,
int day,
int hour,
int minute,
int second,
int subsecond)
Construct a date. |
static Date |
getDate(int year,
int zeroBasedMonth,
int day,
int hour,
int minute,
int second,
int subsecond,
TimeZone timeZone)
|
static Date |
getEndOf(Date date)
Get the very last millisecond of the day. |
static Date |
getStartOf(Date date)
Get the very first millisecond of the day. |
static DateFormat |
instance(String pattern)
Get a date format instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateUtil()
Method Detail |
---|
public static DateFormat instance(String pattern)
Get a date format instance. This method ensures that the instance is local to a thread, to compensate for the fact that DateFormats aren't thread-safe.
pattern
- - the date format pattern.
public static Date getDate(int year, int zeroBasedMonth, int day)
Construct a date.
year
- - the yearzeroBasedMonth
- - the month (e.g. Calendar.JANUARY)day
- - the day of the month
public static Date getDate(int year, int zeroBasedMonth, int day, int hour, int minute, int second, int subsecond)
Construct a date.
year
- - the yearzeroBasedMonth
- - the month (e.g. Calendar.JANUARY)day
- - the day of the monthhour
- - the hour in 24-hour notationminute
- - the minutesecond
- - the secondsubsecond
- TODO
public static Date getDate(int year, int zeroBasedMonth, int day, int hour, int minute, int second, int subsecond, TimeZone timeZone)
public static Date getEndOf(Date date)
Get the very last millisecond of the day.
date
- - the day
public static Date getStartOf(Date date)
Get the very first millisecond of the day.
date
- - the day
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |