|
Oracle® Globalization Development Kit Java API Reference 10g Release 1(10.1) B10971-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.text.Format
|
+--oracle.i18n.text.OraDateFormat
OraDateFormat is an abstract class to do locale sensitive formatting and parsing between datetime and string locale dependently. It supports Oracle datetime formatting behavior.
OraSimpleDateFormat, Serialized Form| Nested Class Summary |
| Nested classes inherited from class java.text.Format |
Format.Field |
| Field Summary | |
static int |
ALL_FIELDConstant for ALL field alignment. |
static int |
AM_PM_FIELDConstant for AM_PM field alignment. |
protected Calendar |
calendarThe calendar that this OraDateFormat uses to calculate the datetime field values. |
static int |
CENTRY_FIELDConstant for CENTRY field alignment. |
static int |
DATE_FIELDConstant for DATE field alignment. |
static int |
DAY_OF_WEEK_FIELDConstant for DAY_OF_WEEK field alignment. |
static int |
DAY_OF_YEAR_FIELDConstant for DAY_OF_YEAR field alignment. |
static int |
DEFAULTConstant for DEFAULT format. |
static int |
ERA_FIELDConstant for ERA field alignment. |
static int |
HOUR_FIELDConstant for HOUR field alignment Used in FieldPosition of formatting. |
static int |
HOUR_OF_DAY_FIELDConstant for HOUR_OF_DAY field alignment. |
static int |
ISO_WEEK_OF_YEAR_FIELDConstant for ISO_WEEK_OF_YEAR field alignment. |
static int |
ISO_YEAR_FIELDConstant for ISO_YEAR field alignment. |
static int |
JULIAN_DAY_FIELDConstant for JULIAN_DAY field alignment. |
static int |
LONGConstant for date/time LONG format style. |
static int |
MILLISECOND_FIELDConstant for MILLISECOND field alignment. |
static int |
MINUTE_FIELDConstant for MINUTE field alignment. |
static int |
MONTH_FIELDConstant for MONTH field alignment. |
static int |
QUARTER_OF_YEAR_FIELDConstant for QUARTER_OF_YEAR field alignment. |
static int |
SECOND_FIELDConstant for SECOND field alignment. |
static int |
SECONDS_FIELDConstant for SECONDS field alignment. |
static int |
SHORTConstant for date/time SHORT format style. |
static int |
TEXT_FIELDConstant for TEXT field alignment. |
static int |
TIMEZONE_FIELDConstant for TIMEZONE field alignment. |
static int |
WEEK_OF_MONTH_FIELDConstant for WEEK_OF_MONTH field alignment. |
static int |
WEEK_OF_YEAR_FIELDConstant for WEEK_OF_YEAR field alignment. |
static int |
YEAR_FIELDConstant for YEAR field alignment. |
| Constructor Summary | |
OraDateFormat() | |
| Method Summary | |
Object |
clone()Overrides Cloneable. |
boolean |
equals(Object obj)Overrides equals. |
String |
format(Date date)Formats a Date into a datetime string. |
abstract StringBuffer |
format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)Formats a Date into a datetime string. |
StringBuffer |
format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition)Formats an Object into a datetime string. |
Calendar |
getCalendar()Returns the calendar associated with this datetime formatter. |
static oracle.i18n.text.OraDateFormat |
getDateInstance()Returns a date formatter that uses the DEFAULT date formatting style for the default locale. |
static oracle.i18n.text.OraDateFormat |
getDateInstance(int style)Returns a date formatter that uses the given date formatting style for the default locale. |
static oracle.i18n.text.OraDateFormat |
getDateInstance(int style, Locale locale)Returns a date formatter that uses the given date formatting style for the given locale. |
static oracle.i18n.text.OraDateFormat |
getDateInstance(int style, oracle.i18n.util.OraLocaleInfo localeInfo)Returns a date formatter that uses the given date formatting style for the given OraLocaleInfo. |
static oracle.i18n.text.OraDateFormat |
getDateTimeInstance()Returns a datetime formatter that uses the DEFAULT formatting style for the default locale. |
static oracle.i18n.text.OraDateFormat |
getDateTimeInstance(int dateStyle)Returns a datetime formatter that uses the given date formatting style and the default time formatting style for the default locale. |
static oracle.i18n.text.OraDateFormat |
getDateTimeInstance(int dateStyle, Locale locale)Returns a datetime formatter that uses the given date formatting style and the default time formatting style for the given locale. |
static oracle.i18n.text.OraDateFormat |
getDateTimeInstance(int dateStyle, oracle.i18n.util.OraLocaleInfo localeInfo)Returns a datetime formatter that uses the given date formatting style and the default time formatting style for the given OraLocaleInfo. |
static String |
getDefaultDateFormatPattern(int style, Locale locale)Returns the default date format pattern for the given date formatting style and the given locale. |
static String |
getDefaultDateFormatPattern(int style, oracle.i18n.util.OraLocaleInfo localeInfo)Returns the default date format pattern for the given date formatting style and the given OraLocaleInfo. |
static String |
getDefaultDateTimeFormatPattern(int dateStyle, Locale locale)Returns the default datetime format pattern for the given date formatting style and the given locale. |
static String |
getDefaultDateTimeFormatPattern(int dateStyle, oracle.i18n.util.OraLocaleInfo localeInfo)Returns the default datetime format pattern for the given date formatting style and the given OraLocaleInfo. |
static String |
getDefaultTimeFormatPattern(Locale locale)Returns the default time format pattern for the given locale. |
static String |
getDefaultTimeFormatPattern(oracle.i18n.util.OraLocaleInfo localeInfo)Returns the default time format pattern for the given OraLocaleInfo. |
static oracle.i18n.text.OraDateFormat |
getInstance()Returns a datetime formatter that uses the DEFAULT style for the default locale. |
static oracle.i18n.text.OraDateFormat |
getTimeInstance()Returns a time formatter for the default locale. |
static oracle.i18n.text.OraDateFormat |
getTimeInstance(Locale locale)Returns a time formatter for the given locale. |
static oracle.i18n.text.OraDateFormat |
getTimeInstance(oracle.i18n.util.OraLocaleInfo localeInfo)Returns a time formatter for the given OraLocaleInfo. |
TimeZone |
getTimeZone()Returns the timezone associated with the calendar of this formatter. |
Date |
parse(String text)Parses a datetime string into a Date. |
abstract Date |
parse(String text, ParsePosition pos)Parses a datetime string into a Date, starting from the given parse position. |
Object |
parseObject(String text, ParsePosition pos)Parses a datetime string into a (Date) Object, starting from the given parse position. |
void |
setCalendar(Calendar calendar)Sets the given calendar to be used by this datetime formatter. |
void |
setTimeZone(TimeZone timezone)Sets the given timezone to be used by the calendar of this formatter. |
| Methods inherited from class java.text.Format |
format, formatToCharacterIterator, parseObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ERA_FIELD
public static final int YEAR_FIELD
public static final int MONTH_FIELD
public static final int DATE_FIELD
public static final int HOUR_OF_DAY_FIELD
public static final int MINUTE_FIELD
public static final int SECOND_FIELD
public static final int MILLISECOND_FIELD
public static final int DAY_OF_WEEK_FIELD
public static final int DAY_OF_YEAR_FIELD
public static final int WEEK_OF_YEAR_FIELD
public static final int WEEK_OF_MONTH_FIELD
public static final int AM_PM_FIELD
public static final int HOUR_FIELD
public static final int TIMEZONE_FIELD
public static final int ALL_FIELD
public static final int CENTRY_FIELD
public static final int JULIAN_DAY_FIELD
public static final int QUARTER_OF_YEAR_FIELD
public static final int SECONDS_FIELD
public static final int TEXT_FIELD
public static final int ISO_YEAR_FIELD
public static final int ISO_WEEK_OF_YEAR_FIELD
public static final int SHORT
public static final int LONG
public static final int DEFAULT
protected Calendar calendar
| Constructor Detail |
public OraDateFormat()
| Method Detail |
public static final oracle.i18n.text.OraDateFormat getDateInstance()
public static final oracle.i18n.text.OraDateFormat getDateInstance(int style)
style - the given date formatting style.IllegalArgumentException - if the given date formatting style is invalid.public static final oracle.i18n.text.OraDateFormat getDateInstance(int style, Locale locale)
style - the given date formatting style.locale - the given locale.IllegalArgumentException - if the given date formatting style is invalid.
public static final oracle.i18n.text.OraDateFormat getDateInstance(int style,
oracle.i18n.util.OraLocaleInfo localeInfo)
style - the given date formatting style.localeInfo - the given OraLocaleInfo.IllegalArgumentException - if the given date formatting style is invalid.public static final oracle.i18n.text.OraDateFormat getDateTimeInstance()
public static final oracle.i18n.text.OraDateFormat getDateTimeInstance(int dateStyle)
dateStyle - the given date formatting style.IllegalArgumentException - if the given date formatting style is invalid.public static final oracle.i18n.text.OraDateFormat getDateTimeInstance(int dateStyle, Locale locale)
dateStyle - the given date formatting style.locale - the given locale.IllegalArgumentException - if the given date formatting style is invalid.
public static final oracle.i18n.text.OraDateFormat getDateTimeInstance(int dateStyle,
oracle.i18n.util.OraLocaleInfo localeInfo)
dateStyle - the given date formatting style.localeInfo - the given OraLocaleInfo.IllegalArgumentException - if the given date formatting style is invalid.public static final oracle.i18n.text.OraDateFormat getInstance()
public static final oracle.i18n.text.OraDateFormat getTimeInstance()
public static final oracle.i18n.text.OraDateFormat getTimeInstance(Locale locale)
public static final oracle.i18n.text.OraDateFormat getTimeInstance(oracle.i18n.util.OraLocaleInfo localeInfo)
localeInfo - the given OraLocaleInfo.public final String format(Date date)
date - the datetime object to be formatted into a datetime string.public abstract StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)
date - the datetime object to be formatted into a datetime string.toAppendTo - the string buffer to be appended with the formatted datetime string.fieldPosition - to be used to get offsets of a given field in the returned string buffer. On input: the alignment field of which the offsets to be returned. On output: the offsets of the alignment field in the returned string buffer.public final StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition)
format in class Formatobj - the object to be formatted into a datetime string. It must be an instance of Date or Number.toAppendTo - the string buffer to be appended with the formatted datetime string.fieldPosition - to be used to get offsets of a given field in the returned string buffer. On input: the alignment field of which the offsets to be returned. On output: the offsets of the alignment field in the returned string buffer.IllegalArgumentException - if the given object is neither an instance of Date nor an instance of Number.
public Date parse(String text)
throws ParseException
text - the datetime string to be parsed.ParseException - if the format pattern associated with this fromatter is not valid for parsing or the given datetime string can not be parsed into a Date.public abstract Date parse(String text, ParsePosition pos)
text - the datetime stringpos - indicates where to start the parsing on input. On output, returns where the parse ends if parsing succeeds, or the start index if fails.IllegalArgumentException - if the format pattern associated with this fromatter is not valid for parsing or the given datetime string can not be parsed into a Date.public Object parseObject(String text, ParsePosition pos)
parseObject in class Formatparse(String, ParsePosition).public static String getDefaultDateFormatPattern(int style, Locale locale)
locale - the given locale.IllegalArgumentException - if the given date formatting style is invalid.
public static String getDefaultDateFormatPattern(int style,
oracle.i18n.util.OraLocaleInfo localeInfo)
localeInfo - the given OraLocaleInfo.IllegalArgumentException - if the given date formatting style is invalid.public static String getDefaultDateTimeFormatPattern(int dateStyle, Locale locale)
dateStyle - the given date formatting style.locale - the given locale.IllegalArgumentException - if the given date formatting style is invalid.
public static String getDefaultDateTimeFormatPattern(int dateStyle,
oracle.i18n.util.OraLocaleInfo localeInfo)
dateStyle - the given date formatting style.localeInfo - the given OraLocaleInfo.IllegalArgumentException - if the given date formatting style is invalid.public static String getDefaultTimeFormatPattern(Locale locale)
locale - the given locale.public static String getDefaultTimeFormatPattern(oracle.i18n.util.OraLocaleInfo localeInfo)
localeInfo - the given OraLocaleInfo.public Calendar getCalendar()
public void setCalendar(Calendar calendar)
calendar - the given calendar to be used by this formatter.public TimeZone getTimeZone()
public void setTimeZone(TimeZone timezone)
timezone - the given timezone to be used by the calendar of this formatter.public Object clone()
clone in class Formatpublic boolean equals(Object obj)
equals in class Object
|
Oracle® Globalization Development Kit Java API Reference 10g Release 1(10.1) B10971-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||