public class MonthDateFormat extends DateFormat
DateFormat.FieldAM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD| Constructor and Description |
|---|
MonthDateFormat()
Creates a new instance for the default time zone.
|
MonthDateFormat(Locale locale)
Creates a new instance for the specified time zone.
|
MonthDateFormat(Locale locale,
int chars)
Creates a new instance for the specified time zone.
|
MonthDateFormat(TimeZone zone)
Creates a new instance for the specified time zone.
|
MonthDateFormat(TimeZone zone,
int chars)
Creates a new instance for the specified time zone.
|
MonthDateFormat(TimeZone zone,
Locale locale,
int chars,
boolean[] showYear,
DateFormat yearFormatter)
Creates a new formatter.
|
MonthDateFormat(TimeZone zone,
Locale locale,
int chars,
boolean showYearForJan,
boolean showYearForDec)
Creates a new formatter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Tests this formatter for equality with an arbitrary object.
|
StringBuffer |
format(Date date,
StringBuffer toAppendTo,
FieldPosition fieldPosition)
Formats the given date.
|
static void |
main(String[] args)
Some test code.
|
Date |
parse(String source,
ParsePosition pos)
Parses the given string (not implemented).
|
clone, format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, hashCode, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat, setTimeZoneformat, formatToCharacterIterator, parseObjectpublic MonthDateFormat()
public MonthDateFormat(TimeZone zone)
zone - the time zone (null not permitted).public MonthDateFormat(Locale locale)
locale - the locale used to obtain the month
names (null not permitted).public MonthDateFormat(TimeZone zone, int chars)
zone - the time zone (null not permitted).chars - the maximum number of characters to use from the month
names (that are obtained from the date symbols of the
default locale). If this value is <= 0, the entire
month name is used in each case.public MonthDateFormat(Locale locale, int chars)
locale - the locale (null not permitted).chars - the maximum number of characters to use from the month
names (that are obtained from the date symbols of the
default locale). If this value is <= 0, the entire
month name is used in each case.public MonthDateFormat(TimeZone zone, Locale locale, int chars, boolean showYearForJan, boolean showYearForDec)
zone - the time zone used to extract the month and year from dates
passed to this formatter (null not permitted).locale - the locale used to determine the month names
(null not permitted).chars - the maximum number of characters to use from the month
names, or zero to indicate that the entire month name
should be used.showYearForJan - a flag that controls whether or not the year is
appended to the symbol for the first month of
each year.showYearForDec - a flag that controls whether or not the year is
appended to the symbol for the last month of
each year.public MonthDateFormat(TimeZone zone, Locale locale, int chars, boolean[] showYear, DateFormat yearFormatter)
zone - the time zone used to extract the month and year from dates
passed to this formatter (null not permitted).locale - the locale used to determine the month names
(null not permitted).chars - the maximum number of characters to use from the month
names, or zero to indicate that the entire month name
should be used.showYear - an array of flags that control whether or not the
year is displayed for a particular month.yearFormatter - the year formatter.public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)
format in class DateFormatdate - the date.toAppendTo - the string buffer.fieldPosition - the field position.public Date parse(String source, ParsePosition pos)
parse in class DateFormatsource - the date string.pos - the parse position.null, as this method has not been implemented.public boolean equals(Object obj)
equals in class DateFormatobj - the object.public static void main(String[] args)
args - ignored.Copyright © 2001-2014 JFree.org. All Rights Reserved.