|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.epicentric.common.DateUtils
DateUtils.
Utilities for date manipulation, comparison and arithmetic.
| Field Summary | |
static int |
APRIL
Deprecated. |
static int |
AUGUST
Deprecated. |
static int |
CENTURIES
Deprecated. |
static int |
DAYS
Deprecated. |
static int |
DECEMBER
Deprecated. |
static int |
FEBRUARY
Deprecated. |
static int |
FIRST_BUSINESS_DAY
Deprecated. |
static int |
FRIDAY
Deprecated. |
static int |
HOURS
Deprecated. |
static int |
JANUARY
Deprecated. |
static int |
JULY
Deprecated. |
static int |
JUNE
Deprecated. |
static int |
LAST_BUSINESS_DAY
Deprecated. |
static int |
LAST_DAY
Deprecated. |
static int |
MARCH
Deprecated. |
static int |
MAY
Deprecated. |
static int |
MILLISECONDS
Deprecated. |
static int |
MINUTES
Deprecated. |
static int |
MONDAY
Deprecated. |
static int |
MONTHS
Deprecated. |
static int |
NOVEMBER
Deprecated. |
static int |
OCTOBER
Deprecated. |
static int |
SATURDAY
Deprecated. |
static int |
SECONDS
Deprecated. |
static int |
SEPTEMBER
Deprecated. |
static int |
SUNDAY
Deprecated. |
static int |
THURSDAY
Deprecated. |
static int |
TUESDAY
Deprecated. |
static int |
WEDNESDAY
Deprecated. |
static int |
WEEKS
Deprecated. |
static int |
YEARS
Deprecated. |
| Constructor Summary | |
DateUtils()
Deprecated. |
|
| Method Summary | |
static Date |
addInterval(Date date,
int interval,
int intervalUnits)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement (use java.util.Calendar). |
static int |
compareTime(Date date1,
Date date2)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static String |
dateTommddyy(Date date)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. (use DateFormat). |
static String |
DateToNumericString(Date date)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static boolean |
dayOfMonthMatch(Date date,
int dayOfMonth)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static int |
diffInDays(Date d1,
Date d2)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replace with DateUtils.diffInDays(Date,Date). |
static long |
diffInSecs(Date d1,
Date d2)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replace with DateUtils.diffInSecs(Date,Date). |
static boolean |
equalsIgnoreTime(Date date1,
Date date2)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replaced with DateUtils.equalsIgnoreTime(Date,Date). |
static String |
getDateTimeStamp(Date date)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replace with DateUtils.getISODateStamp(Date) or
DateUtils.getISODateTimeStamp(Date). |
static Calendar |
getNewCalendar()
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static Calendar |
getNewCalendar(Date date)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement (use one of the Calendar.getInstance() methods. |
static Calendar |
getNewCalendar(long milliseconds)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement (use Calendar.setTimeInMillis(long)). |
static int[] |
incrementMonthYear(int year,
int month,
int months)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement (use java.util.Calendar). |
static boolean |
inDateRange(Date date,
int startMonth,
int startDay,
int endMonth,
int endDay)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static boolean |
isLastDayOfMonth(Date date)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static boolean |
isSameDay(Date date1,
Date date2)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replaced with DateUtils.equalsIgnoreTime(Date,Date). |
static boolean |
isToday(Date then)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replace with DateUtils.isToday(Date) |
static Date |
mmddyyToBirthDate(String dateStr)
Deprecated. As of version 3.5. Will be removed in 8.0 or later. Use mmddyyToDate instead. |
static Date |
mmddyyToDate(String dateStr)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. (use . |
static long |
msecInPeriod(int intervalUnits)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static Date |
now()
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement (use new Date()). |
static Date |
NumericStringToDate(String string)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static void |
validateIntervalUnits(int intervalUnits)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MILLISECONDS
public static final int SECONDS
public static final int MINUTES
public static final int HOURS
public static final int DAYS
public static final int WEEKS
public static final int MONTHS
public static final int YEARS
public static final int CENTURIES
public static final int SUNDAY
public static final int MONDAY
public static final int TUESDAY
public static final int WEDNESDAY
public static final int THURSDAY
public static final int FRIDAY
public static final int SATURDAY
public static final int LAST_DAY
public static final int FIRST_BUSINESS_DAY
public static final int LAST_BUSINESS_DAY
public static final int JANUARY
public static final int FEBRUARY
public static final int MARCH
public static final int APRIL
public static final int MAY
public static final int JUNE
public static final int JULY
public static final int AUGUST
public static final int SEPTEMBER
public static final int OCTOBER
public static final int NOVEMBER
public static final int DECEMBER
| Constructor Detail |
public DateUtils()
| Method Detail |
public static long msecInPeriod(int intervalUnits)
public static Date addInterval(Date date,
int interval,
int intervalUnits)
throws IllegalArgumentException
date - to incrementinterval - amount to incrementintervalUnits - one of the interval unit constants in this class
public static int[] incrementMonthYear(int year,
int month,
int months)
year - month - months -
public static void validateIntervalUnits(int intervalUnits)
throws IllegalArgumentException
intervalUnits - integer matching units constants available
in this class.
public static boolean dayOfMonthMatch(Date date,
int dayOfMonth)
public static boolean isLastDayOfMonth(Date date)
public static Date now()
public static boolean equalsIgnoreTime(Date date1,
Date date2)
DateUtils.equalsIgnoreTime(Date,Date).
public static int compareTime(Date date1,
Date date2)
public static boolean isToday(Date then)
DateUtils.isToday(Date)
public static int diffInDays(Date d1,
Date d2)
DateUtils.diffInDays(Date,Date).
public static long diffInSecs(Date d1,
Date d2)
DateUtils.diffInSecs(Date,Date).
public static String getDateTimeStamp(Date date)
DateUtils.getISODateStamp(Date) or
DateUtils.getISODateTimeStamp(Date).
public static Date mmddyyToBirthDate(String dateStr)
dateStr - is date of birth in "MM/DD/YY" format
(doesn't require leading zeros).
see Sun's api documentation for the following classes for details
on parsing boundary conditions:
java.util.Date
java.text.DateFormat
java.text.SimpleDateFormatpublic static Date mmddyyToDate(String dateStr)
dateStr - is date in "MM/DD/YY" format
(doesn't require leading zeros).
see Sun's api documentation for the following classes for details
on parsing boundary conditions:
java.util.Date
java.text.DateFormat
java.text.SimpleDateFormatpublic static String dateTommddyy(Date date)
DateFormat).
public static boolean inDateRange(Date date,
int startMonth,
int startDay,
int endMonth,
int endDay)
public static Calendar getNewCalendar(Date date)
Calendar.getInstance() methods.
public static Calendar getNewCalendar(long milliseconds)
Calendar.setTimeInMillis(long)).
public static Calendar getNewCalendar()
public static String DateToNumericString(Date date)
public static Date NumericStringToDate(String string)
public static boolean isSameDay(Date date1,
Date date2)
DateUtils.equalsIgnoreTime(Date,Date).
date1 - the Date to compare with date2date2 - the Date to compare with date1
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||