DateTimeFormatterBuilder.appendOptional

Appends a formatter to the builder which will optionally format/parse. !(p) This method has the same effect as appending each of the constituent parts directly to this builder surrounded by an {@link #optionalStart()} and {@link #optionalEnd()}. !(p) The formatter will format if data is available for all the fields contained within it. The formatter will parse if the string matches, otherwise no error is returned.

@param formatter the formatter to add, not null @return this, for chaining, not null

class DateTimeFormatterBuilder
appendOptional

Meta