Package mondrian.util
Class Format.DateFormat
- java.lang.Object
-
- mondrian.util.Format.BasicFormat
-
- mondrian.util.Format.FallbackFormat
-
- mondrian.util.Format.DateFormat
-
- Enclosing class:
- Format
static class Format.DateFormat extends Format.FallbackFormat
DateFormat is an element of aFormat.CompoundFormat
which has a value when applied to aCalendar
object. (Values of typeDate
are automatically converted intoCalendar
s when you callFormat.BasicFormat.format(Date, StringBuilder)
calls to format other kinds of values give a runtime error.)In a typical use of this class, a format string such as "m/d/yy" is parsed into DateFormat objects for "m", "d", and "yy", and
Format.LiteralFormat
objects for "/". AFormat.CompoundFormat
object is created to bind them together.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Format.FormatLocale
locale
(package private) boolean
twelveHourClock
-
Fields inherited from class mondrian.util.Format.FallbackFormat
token
-
Fields inherited from class mondrian.util.Format.BasicFormat
code
-
-
Constructor Summary
Constructors Constructor Description DateFormat(int code, String s, Format.FormatLocale locale, boolean twelveHourClock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
format(Calendar calendar, StringBuilder buf)
(package private) mondrian.util.Format.FormatType
getFormatType()
(package private) void
setTwelveHourClock(boolean twelveHourClock)
-
Methods inherited from class mondrian.util.Format.FallbackFormat
format, format, format
-
Methods inherited from class mondrian.util.Format.BasicFormat
format, formatNull, isApplicableTo, isApplicableTo
-
-
-
-
Field Detail
-
locale
Format.FormatLocale locale
-
twelveHourClock
boolean twelveHourClock
-
-
Constructor Detail
-
DateFormat
DateFormat(int code, String s, Format.FormatLocale locale, boolean twelveHourClock)
-
-
Method Detail
-
getFormatType
mondrian.util.Format.FormatType getFormatType()
- Overrides:
getFormatType
in classFormat.BasicFormat
-
setTwelveHourClock
void setTwelveHourClock(boolean twelveHourClock)
-
format
void format(Calendar calendar, StringBuilder buf)
- Overrides:
format
in classFormat.FallbackFormat
-
-