|
Openfire 3.4.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.util.FastDateFormat
public class FastDateFormat
Similar to SimpleDateFormat
, but faster and thread-safe.
Only formatting is supported, but all patterns are compatible with
SimpleDateFormat.
Note, this class is from the open source Tea project (http://sourceforge.net/projects/teatrove/).
Field Summary | |
---|---|
static Object |
FULL
Style pattern |
static Object |
LONG
Style pattern |
static Object |
MEDIUM
Style pattern |
static Object |
SHORT
Style pattern |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object FULL
public static final Object LONG
public static final Object MEDIUM
public static final Object SHORT
Method Detail |
---|
public static FastDateFormat getInstance()
public static FastDateFormat getInstance(String pattern) throws IllegalArgumentException
pattern
- SimpleDateFormat
compatible pattern
IllegalArgumentException
public static FastDateFormat getInstance(String pattern, TimeZone timeZone) throws IllegalArgumentException
pattern
- SimpleDateFormat
compatible patterntimeZone
- optional time zone, overrides time zone of formatted
date
IllegalArgumentException
public static FastDateFormat getInstance(String pattern, Locale locale) throws IllegalArgumentException
pattern
- SimpleDateFormat
compatible patternlocale
- optional locale, overrides system locale
IllegalArgumentException
public static FastDateFormat getInstance(String pattern, DateFormatSymbols symbols) throws IllegalArgumentException
pattern
- SimpleDateFormat
compatible patternsymbols
- optional date format symbols, overrides symbols for
system locale
IllegalArgumentException
public static FastDateFormat getInstance(String pattern, TimeZone timeZone, Locale locale) throws IllegalArgumentException
pattern
- SimpleDateFormat
compatible patterntimeZone
- optional time zone, overrides time zone of formatted
datelocale
- optional locale, overrides system locale
IllegalArgumentException
public static FastDateFormat getInstance(String pattern, TimeZone timeZone, Locale locale, DateFormatSymbols symbols) throws IllegalArgumentException
pattern
- SimpleDateFormat
compatible patterntimeZone
- optional time zone, overrides time zone of formatted
datelocale
- optional locale, overrides system localesymbols
- optional date format symbols, overrides symbols for
provided locale
IllegalArgumentException
public static FastDateFormat getDateInstance(Object style, TimeZone timeZone, Locale locale) throws IllegalArgumentException
style
- date style: FULL, LONG, MEDIUM, or SHORTtimeZone
- optional time zone, overrides time zone of formatted
datelocale
- optional locale, overrides system locale
IllegalArgumentException
public static FastDateFormat getTimeInstance(Object style, TimeZone timeZone, Locale locale) throws IllegalArgumentException
style
- time style: FULL, LONG, MEDIUM, or SHORTtimeZone
- optional time zone, overrides time zone of formatted
datelocale
- optional locale, overrides system locale
IllegalArgumentException
public static FastDateFormat getDateTimeInstance(Object dateStyle, Object timeStyle, TimeZone timeZone, Locale locale) throws IllegalArgumentException
dateStyle
- date style: FULL, LONG, MEDIUM, or SHORTtimeStyle
- time style: FULL, LONG, MEDIUM, or SHORTtimeZone
- optional time zone, overrides time zone of formatted
datelocale
- optional locale, overrides system locale
IllegalArgumentException
public String format(Date date)
public String format(Calendar calendar)
public StringBuffer format(Date date, StringBuffer buf)
public StringBuffer format(Calendar calendar, StringBuffer buf)
public String getPattern()
public TimeZone getTimeZone()
public Locale getLocale()
public int getMaxLengthEstimate()
|
Openfire 3.4.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |