mondrian.util
Class Format.DateFormat

java.lang.Object
  extended by mondrian.util.Format.BasicFormat
      extended by mondrian.util.Format.FallbackFormat
          extended by mondrian.util.Format.DateFormat
Enclosing class:
Format

static class Format.DateFormat
extends Format.FallbackFormat

DateFormat is an element of a Format.CompoundFormat which has a value when applied to a Calendar object. (Values of type Date are automatically converted into Calendars when you call Format.BasicFormat.format(java.util.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 "/". A Format.CompoundFormat object is created to bind them together.

 

Field Summary
(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
Format.DateFormat(int code, String s, Format.FormatLocale locale, boolean twelveHourClock)
           
 
Method Summary
(package private)  void format(Calendar calendar, StringBuilder buf)
           
(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, isDate, isNumeric, isString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locale

Format.FormatLocale locale

twelveHourClock

boolean twelveHourClock
Constructor Detail

Format.DateFormat

Format.DateFormat(int code,
                  String s,
                  Format.FormatLocale locale,
                  boolean twelveHourClock)
Method Detail

setTwelveHourClock

void setTwelveHourClock(boolean twelveHourClock)

format

void format(Calendar calendar,
            StringBuilder buf)
Overrides:
format in class Format.FallbackFormat

SourceForge.net_Logo