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