|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.iam.platformservice.utils.PlatformDateTimeUtil
public class PlatformDateTimeUtil
Constructor Summary | |
---|---|
PlatformDateTimeUtil() |
Method Summary | |
---|---|
static java.lang.String |
formatDate(java.util.Date date) Method that converts a date object into string based on locale and timezone The formatted date is in the DateFormat.LONG format and includes Time |
static java.lang.String |
formatDate(java.util.Date date, java.util.Hashtable userProfile) Formats the supplied date for the desired locale and time zone |
static java.lang.String |
formatDate(java.util.Date date, int style, boolean dateOnly) Method that converts a date object into string based on locale and timezone |
static java.lang.String |
formatDateToGMT(java.util.Date date) Method to format a given date and return the string representation in GMT. |
static java.lang.String |
getPattern() Method to give the date time pattern for a given locale and DateFormat.LONG style. |
static java.lang.String |
getPattern(int style) Method to give the date time pattern for a given locale and style It modifies the pattern to also include the Timezone if not already present This method will be useful for specifying the pattern for date components. |
static java.util.Date |
parseDate(java.lang.String date) Method to parse a given date and return java date object that includes Time. |
static java.util.Date |
parseDate(java.lang.String date, java.util.Hashtable userProfile) Parses the supplied date for the desired locale and time zone |
static java.util.Date |
parseDate(java.lang.String date, int style, boolean dateOnly) Method to parse a given date and return java date object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlatformDateTimeUtil()
Method Detail |
---|
public static java.lang.String formatDate(java.util.Date date, int style, boolean dateOnly)
date
- Date to be formattedstyle
- Values expected are DateFormat.LONG, DateFormat.SHORT ..dateOnly,
- Whether formatter should just format the date or both date and timepublic static java.lang.String formatDate(java.util.Date date)
date
- Date to be formattedpublic static java.lang.String formatDate(java.util.Date date, java.util.Hashtable userProfile)
date
- Date to formatuserProfile
- List of custom properties based on which formatting will take place Following properties can be set. Only dateFormat is optional. If it is not provided, it defaults to LONG
public static java.util.Date parseDate(java.lang.String date, java.util.Hashtable userProfile) throws java.text.ParseException
date
- Date to parseuserProfile
- List of custom properties based on which formatting will take place Following properties can be set. Only dateFormat is optional. If it is not provided, it defaults to LONG
java.text.ParseException
public static java.util.Date parseDate(java.lang.String date, int style, boolean dateOnly) throws java.text.ParseException
date,
- date to be parsedstyle,
- Expected values are DateFormat.SHORT, DateFormat.LONG..dateOnly,
- whether formatter should just parse the date or both date and timejava.text.ParseException
public static java.util.Date parseDate(java.lang.String date) throws java.text.ParseException
date,
- date to be parsedjava.text.ParseException
public static java.lang.String formatDateToGMT(java.util.Date date) throws java.text.ParseException
date,
- date to be formattedjava.text.ParseException
public static java.lang.String getPattern(int style)
style
- The DateFormat style. Takes the int values like DateFormat.LONG, DateFormat.SHORT etc.public static java.lang.String getPattern()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |