public DateTimeFormatterBuilder appendLocalized (FormatStyle dateStyle, FormatStyle timeStyle)

Appends a localized date-time pattern to the formatter.

This appends a localized section to the builder, suitable for outputting a date, time or date-time combination. The format of the localized section is lazily looked up based on four items:

During formatting, the chronology is obtained from the temporal object being formatted, which may have been overridden by DateTimeFormatter.withChronology(Chronology). The FULL and LONG styles typically require a time-zone. When formatting using these styles, a ZoneId must be available, either by using ZonedDateTime or DateTimeFormatter.withZone.

During parsing, if a chronology has already been parsed, then it is used. Otherwise the default from DateTimeFormatter.withChronology(Chronology) is used, with IsoChronology as the fallback.

Note that this method provides similar functionality to methods on DateFormat such as java.text.DateFormat.getDateTimeInstance(int, int).

Parameters:
dateStyle    the date style to use, null means no date required
timeStyle    the time style to use, null means no time required

Returns:  this, for chaining, not null

Exceptions:
IllegalArgumentException    if both the date and time styles are null