|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.util.DateConvertor
The DateConvertor class is used in bankframe to convert date objects to string objects and vice verse. The dates will be formatted in accordance with either a supplied formatting pattern or the pattern for the Locale. When processing date objects and strings using the static methods in this class the formatting pattern for the date can be supplied or it can be passed as a null value. If the formatting pattern is null, the formatting pattern is pulled from the BankframeDatePatterns.properties file. The value retrieved will be the formatting pattern for the previously set Locale. Setting the locale is not the responsibility of this class.
Constructor Summary | |
DateConvertor()
Deprecated. |
Method Summary | |
static java.lang.String |
convertDateToString(java.lang.String formattingPattern,
java.util.Date dateToConvert)
Deprecated. Method to convert a date object to a string object If the formatting pattern is null, the date will be formatted based on the pattern supplied for the current Locale. |
static java.util.Date |
convertStringToDate(java.lang.String formattingPattern,
java.lang.String date)
Deprecated. Method to convert a string object to a date object with no specified time If the formatting pattern is null, the date will be formatted based on the pattern supplied for the current Locale. |
static java.util.Date |
convertStringToDate(java.lang.String formattingPattern,
java.lang.String date,
java.lang.String time)
Deprecated. Method to convert a string object to a date object with a specified time. |
static java.lang.String |
getCurrentTime(java.lang.String formattingPattern)
Deprecated. This method will return a String representing the current time. |
static java.lang.String |
getDateString(java.lang.String formattingPattern,
java.util.Date date)
Deprecated. This method will return a string representing the date from a date object in the form implied by the formattingPattern parameter. |
static java.util.Locale |
getLocale()
Deprecated. get method to retrieve the current locale. |
static java.lang.String |
getTimeString(java.lang.String formattingPattern,
java.util.Date date)
Deprecated. This method will return a string representing the time from a date object in the form implied by the formattingPattern parameter If the formattingPattern parameter is null the pattern for the Locale is used. |
static java.lang.String |
getTodaysDate(java.lang.String formattingPattern)
Deprecated. This method will return a String representing the today's date. |
static java.lang.String |
getTodaysDateAndTime(java.lang.String formattingPattern)
Deprecated. This method will return a String representing today's date and time. |
static void |
setLocale(java.util.Locale locale)
Deprecated. Set method to change the current locale. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DateConvertor()
Method Detail |
public static void setLocale(java.util.Locale locale)
locale
- string representing the locale the date is to be formatted to.public static java.util.Locale getLocale() throws MissingLocaleException
MissingLocaleException
public static java.util.Date convertStringToDate(java.lang.String formattingPattern, java.lang.String date, java.lang.String time) throws MissingLocaleException, ValidationException
date
- string representing a date e.g. "12/11/1999"time
- string representing a time in 24 hour clock
com.banframe.util.MissingLocaleException
MissingLocaleException
ValidationException
public static java.util.Date convertStringToDate(java.lang.String formattingPattern, java.lang.String date) throws MissingLocaleException, ValidationException
date
- string representing a date e.g. "12/11/1999"
MissingLocaleException
ValidationException
public static java.lang.String convertDateToString(java.lang.String formattingPattern, java.util.Date dateToConvert) throws MissingLocaleException
formattingPattern
- String pattern to format date to.dateToConvert
- Date object tp process into a string
MissingLocaleException
public static java.lang.String getDateString(java.lang.String formattingPattern, java.util.Date date) throws MissingLocaleException
formattingPattern
- date
- java.util.date
MissingLocaleException
public static java.lang.String getTimeString(java.lang.String formattingPattern, java.util.Date date) throws MissingLocaleException
formattingPattern
- date
- java.util.date
MissingLocaleException
public static java.lang.String getCurrentTime(java.lang.String formattingPattern) throws MissingLocaleException
formattingPattern
- String describing the pattern to format the time. If this is passed as null the formatting pattern for the locale will be used.
MissingLocaleException
public static java.lang.String getTodaysDate(java.lang.String formattingPattern) throws MissingLocaleException
formattingPattern
- String describing the pattern to format the date. If this is passed as null the formatting pattern for the locale will be used.
MissingLocaleException
public static java.lang.String getTodaysDateAndTime(java.lang.String formattingPattern) throws MissingLocaleException
formattingPattern
- String describing the pattern to format the date. If this is passed as null the formatting pattern for the locale will be used.
MissingLocaleException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |