|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.appfuse.util.DateUtil
public class DateUtil
Date Utility Class This is used to convert Strings to Dates and Timestamps
Constructor Summary | |
---|---|
DateUtil()
|
Method Summary | |
---|---|
static String |
convertDateToString(Date aDate)
This method generates a string representation of a date based on the System Property 'dateFormat' in the format you specify on input |
static Date |
convertStringToDate(String strDate)
This method converts a String to a date using the datePattern |
static Date |
convertStringToDate(String aMask,
String strDate)
This method generates a string representation of a date/time in the format you specify on input |
static String |
getDate(Date aDate)
This method attempts to convert an Oracle-formatted date in the form dd-MMM-yyyy to mm/dd/yyyy. |
static String |
getDatePattern()
Return default datePattern (MM/dd/yyyy) |
static String |
getDateTime(String aMask,
Date aDate)
This method generates a string representation of a date's date/time in the format you specify on input |
static String |
getDateTimePattern()
|
static String |
getTimeNow(Date theTime)
This method returns the current date time in the format: MM/dd/yyyy HH:MM a |
static Calendar |
getToday()
This method returns the current date in the format: MM/dd/yyyy |
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 String getDatePattern()
public static String getDateTimePattern()
public static final String getDate(Date aDate)
aDate
- date from database as a string
public static final Date convertStringToDate(String aMask, String strDate) throws ParseException
aMask
- the date pattern the string is instrDate
- a string representation of a date
ParseException
SimpleDateFormat
public static String getTimeNow(Date theTime)
theTime
- the current time
public static Calendar getToday() throws ParseException
ParseException
public static final String getDateTime(String aMask, Date aDate)
aMask
- the date pattern the string is inaDate
- a date object
SimpleDateFormat
public static final String convertDateToString(Date aDate)
aDate
- A date to convert
public static Date convertStringToDate(String strDate) throws ParseException
strDate
- the date to convert (in format MM/dd/yyyy)
ParseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |