Builder to create date-time formatters.
This allows a {@code DateTimeFormatter} to be created.All date-time formatters are created ultimately using this builder.
The basic elements of date-time can all be added:
- Value - a numeric value
- Fraction - a fractional value including the decimal place. Always use this when outputting fractions to ensure that the fraction is parsed correctly
- Text - the textual equivalent for the value
- OffsetId/Offset - the {@linkplain ZoneOffset zone offset}
- ZoneId - the {@linkplain ZoneId time-zone} id
- ZoneText - the name of the time-zone
- ChronologyId - the {@linkplain Chronology chronology} id
- ChronologyText - the name of the chronology
- Literal - a text literal
- Nested and Optional - formats can be nested or made optional
- Other - the printer and parser interfaces can be used to add user supplied formatting
In addition, any of the elements may be decorated by padding, either with spaces or any other character.
Finally, a shorthand pattern, mostly compatible with {@code java.text.SimpleDateFormat SimpleDateFormat}can be used, see {@link #appendPattern(String)}. In practice, this simply parses the pattern and calls other methods on the builder.
@implSpec This class is a mutable builder intended for use from a single thread.
@since 1.8