|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjd.util.DateFormat
DateFormat prvoides locale dependent formatting of dates.
| Field Summary | |
static char |
SYMBOL_DAY
|
static char |
SYMBOL_MONTH
|
static char |
SYMBOL_YEAR
|
| Method Summary | |
String |
format(Date date)
Return a string representation of a date. |
void |
format(Date date,
StringBuffer s)
Return a string representation of a date. |
void |
format(Date date,
StringBuffer s,
char ignorePart)
Return a string representation of a date. |
String |
format(int year,
int month,
int day)
Return a string representation of a date. |
void |
format(int year,
int month,
int day,
StringBuffer s)
Return a string representation of a date. |
void |
format(int year,
int month,
int day,
StringBuffer s,
char ignorePart)
Return a string representation of a date. |
int |
getDayPosition()
Return the position (0-2) of the day value in date string. |
static DateFormat |
getDefaultFormat()
Return a DateFormat for the default locale. |
static DateFormat |
getFormat(Locale locale)
Return a DateFormat for a locale. |
static DateFormat |
getFormat(String language)
Return a DateFormat for a language. |
static DateFormat |
getFormat(String language,
String country)
Return a DateFormat for a language and country. |
String |
getMonthName(int month)
Return the name of a month |
int |
getMonthPosition()
Returns the position (0-2) of the month value in date string. |
char |
getSeparatorSymbol()
Return the locale dependent symbol which separates date parts (e.g. |
String |
getShortMonthName(int month)
Return the short name of a month |
String |
getShortWeekdayName(int weekday)
Return the short name of a weekday |
String |
getWeekdayName(int weekday)
Return the name of a weekday |
int |
getYearPosition()
Returns the position (0-2) of the year value in date string. |
Date |
parse(String text)
Parses a date from a string representation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final char SYMBOL_MONTH
public static final char SYMBOL_DAY
public static final char SYMBOL_YEAR
| Method Detail |
public static DateFormat getDefaultFormat()
public static DateFormat getFormat(String language)
language - lowercase two-letter ISO-639 code.
public static DateFormat getFormat(String language,
String country)
language - lowercase two-letter ISO-639 code.country - uppercase two-letter ISO-3166 code.public static DateFormat getFormat(Locale locale)
public char getSeparatorSymbol()
public int getDayPosition()
public int getMonthPosition()
public int getYearPosition()
public String getMonthName(int month)
month - the month (ranging from 1 to 12)public String getShortMonthName(int month)
month - the month (ranging from 1 to 12)public String getWeekdayName(int weekday)
weekday - the weekdayDate.WEEKDAY_SUNDAYpublic String getShortWeekdayName(int weekday)
weekday - the weekdayDate.WEEKDAY_SUNDAY
public Date parse(String text)
throws ParseException
ParseException - thrown if an parse error occurspublic String format(Date date)
public void format(Date date,
StringBuffer s)
date - the dates - a StringBuffer to hold the result
public void format(Date date,
StringBuffer s,
char ignorePart)
date - the dates - a StringBuffer to hold the resultignorePart - exclude a date part from the result stringSYMBOL_MONTH,
SYMBOL_DAY,
SYMBOL_YEAR
public String format(int year,
int month,
int day)
year - the year (the year 2001 is specified as 2001)month - the month (counting from 1 to 12)day - the day (counting from 1 to 31)
public void format(int year,
int month,
int day,
StringBuffer s)
year - the year (the year 2001 is specified as 2001)month - the month (counting from 1 to 12)day - the day (counting from 1 to 31)s - a StringBuffer to hold the result
public void format(int year,
int month,
int day,
StringBuffer s,
char ignorePart)
year - the year (the year 2001 is specified as 2001)month - the month (counting from 1 to 12)day - the day (counting from 1 to 31)s - a StringBuffer to hold the resultignorePart - exclude a date part from the result stringSYMBOL_MONTH,
SYMBOL_DAY,
SYMBOL_YEAR
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||