private static class FastDatePrinter.TimeZoneNumberRule extends java.lang.Object implements FastDatePrinter.Rule
Inner class to output a time zone as a number +/-HHMM
or +/-HH:MM.
| Modifier and Type | Field and Description |
|---|---|
(package private) static FastDatePrinter.TimeZoneNumberRule |
INSTANCE_COLON |
(package private) static FastDatePrinter.TimeZoneNumberRule |
INSTANCE_NO_COLON |
(package private) boolean |
mColon |
| Constructor and Description |
|---|
TimeZoneNumberRule(boolean colon)
Constructs an instance of
TimeZoneNumberRule with the specified properties. |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(java.lang.Appendable buffer,
java.util.Calendar calendar)
Appends the value of the specified calendar to the output buffer based on the rule implementation.
|
int |
estimateLength()
Returns the estimated length of the result.
|
static final FastDatePrinter.TimeZoneNumberRule INSTANCE_COLON
static final FastDatePrinter.TimeZoneNumberRule INSTANCE_NO_COLON
final boolean mColon
TimeZoneNumberRule(boolean colon)
TimeZoneNumberRule with the specified properties.colon - add colon between HH and MM in the output if truepublic int estimateLength()
estimateLength in interface FastDatePrinter.Rulepublic void appendTo(java.lang.Appendable buffer,
java.util.Calendar calendar)
throws java.io.IOException
appendTo in interface FastDatePrinter.Rulebuffer - the output buffercalendar - calendar to be appendedjava.io.IOException - if an I/O error occurs