public class CellDateFormatter extends CellFormatter
format, locale| Constructor and Description |
|---|
CellDateFormatter(Locale locale,
String format)
Creates a new date formatter with the given specification.
|
CellDateFormatter(String format)
Creates a new date formatter with the given specification.
|
| Modifier and Type | Method and Description |
|---|---|
void |
formatValue(StringBuffer toAppendTo,
Object value)
Format a value according the format string.
|
void |
simpleValue(StringBuffer toAppendTo,
Object value)
Format a value according to the type, in the most basic way.
|
format, simpleFormatpublic CellDateFormatter(String format)
format - The format.public void formatValue(StringBuffer toAppendTo, Object value)
CellFormatterNOTE: this method must be thread safe! In particular, if it uses a Format instance that is not thread safe, i.e. DateFormat, this method must be synchronized, either on the method, if the format is a final property, or on the format instance itself.
formatValue in class CellFormattertoAppendTo - The buffer to append to.value - The value to format.public void simpleValue(StringBuffer toAppendTo, Object value)
NOTE: this method must be thread safe! In particular, if it uses a Format instance that is not thread safe, i.e. DateFormat, this method must be synchronized, either on the method, if the format is a final property, or on the format instance itself.
For a date, this is "mm/d/y".
simpleValue in class CellFormattertoAppendTo - The buffer to append to.value - The value to format.