|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gisgraphy.util.DateUtil
public class DateUtil
Date Utility Class used to convert Strings to Dates and Timestamps
| 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 |
| Method Detail |
|---|
public static String getDatePattern()
public static String getDateTimePattern()
public static String getDate(Date aDate)
aDate - date from database as a string
public static Date convertStringToDate(String aMask,
String strDate)
throws ParseException
aMask - the date pattern the string is instrDate - a string representation of a date
ParseException - when String doesn't match the expected formatSimpleDateFormatpublic static String getTimeNow(Date theTime)
theTime - the current time
public static Calendar getToday()
throws ParseException
ParseException - when String doesn't match the expected format
public static String getDateTime(String aMask,
Date aDate)
aMask - the date pattern the string is inaDate - a date object
SimpleDateFormatpublic static 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 - when String doesn't match the expected format
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||