private static class FastDatePrinter.Iso8601_Rule extends Object implements FastDatePrinter.Rule
Inner class to output a time zone as a number +/-HHMM or +/-HH:MM.
| 限定符和类型 | 字段和说明 |
|---|---|
(专用程序包) static FastDatePrinter.Iso8601_Rule |
ISO8601_HOURS |
(专用程序包) static FastDatePrinter.Iso8601_Rule |
ISO8601_HOURS_COLON_MINUTES |
(专用程序包) static FastDatePrinter.Iso8601_Rule |
ISO8601_HOURS_MINUTES |
(专用程序包) int |
length |
| 构造器和说明 |
|---|
Iso8601_Rule(int length)
Constructs an instance of
Iso8601_Rule 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 FastDatePrinter.Iso8601_Rule |
getRule(int tokenLen)
Factory method for Iso8601_Rules.
|
static final FastDatePrinter.Iso8601_Rule ISO8601_HOURS
static final FastDatePrinter.Iso8601_Rule ISO8601_HOURS_MINUTES
static final FastDatePrinter.Iso8601_Rule ISO8601_HOURS_COLON_MINUTES
final int length
Iso8601_Rule(int length)
Iso8601_Rule with the specified properties.length - The number of characters in output (unless Z is output)static FastDatePrinter.Iso8601_Rule getRule(int tokenLen)
tokenLen - a token indicating the length of the TimeZone String to be formatted.tokenLen. If no such rule exists, an IllegalArgumentException will be thrown.public 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.