private static class FastDatePrinter.TimeZoneNumberRule extends Object implements FastDatePrinter.Rule
Inner class to output a time zone as a number +/-HHMM or +/-HH:MM.
| 限定符和类型 | 字段和说明 |
|---|---|
(专用程序包) static FastDatePrinter.TimeZoneNumberRule |
INSTANCE_COLON |
(专用程序包) static FastDatePrinter.TimeZoneNumberRule |
INSTANCE_NO_COLON |
(专用程序包) boolean |
mColon |
| 构造器和说明 |
|---|
TimeZoneNumberRule(boolean colon)
Constructs an instance of
TimeZoneNumberRule with the specified properties. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
appendTo(Appendable buffer,
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 在接口中 FastDatePrinter.Rulepublic void appendTo(Appendable buffer, Calendar calendar) throws IOException
appendTo 在接口中 FastDatePrinter.Rulebuffer - the output buffercalendar - calendar to be appendedIOException - if an I/O error occursCopyright © 2020. All rights reserved.