(
ChronoDisplay context,
Appendable buffer,
AttributeQuery attributes
)
| 145 | } |
| 146 | |
| 147 | @Override |
| 148 | public void print( |
| 149 | ChronoDisplay context, |
| 150 | Appendable buffer, |
| 151 | AttributeQuery attributes |
| 152 | ) throws IOException, ChronoException { |
| 153 | |
| 154 | Locale loc = attributes.get(Attributes.LANGUAGE, Locale.ROOT); |
| 155 | EastAsianMonth eam = context.get(this); |
| 156 | |
| 157 | if (attributes.contains(DualFormatElement.COUNT_OF_PATTERN_SYMBOLS)) { // numeric case |
| 158 | NumberSystem numsys = attributes.get(Attributes.NUMBER_SYSTEM, NumberSystem.ARABIC); |
| 159 | buffer.append(eam.getDisplayName(loc, numsys, attributes)); |
| 160 | } else { |
| 161 | TextWidth tw = attributes.get(Attributes.TEXT_WIDTH, TextWidth.WIDE); |
| 162 | OutputContext oc = attributes.get(Attributes.OUTPUT_CONTEXT, OutputContext.FORMAT); |
| 163 | TextAccessor ta = |
| 164 | eam.isLeap() |
| 165 | ? CalendarText.getInstance("chinese", loc).getLeapMonths(tw, oc) |
| 166 | : CalendarText.getInstance("chinese", loc).getStdMonths(tw, oc); |
| 167 | buffer.append(ta.print(Month.valueOf(eam.getNumber()))); // uses the iso-month only as index for text forms |
| 168 | } |
| 169 | |
| 170 | } |
| 171 | |
| 172 | @Override |
| 173 | public EastAsianMonth parse( |
nothing calls this directly
no test coverage detected