public String format(TemporalAccessor temporal)
Formats a date-time object using this formatter.
This formats the date-time to a String using the rules of the formatter.
Parameters:
temporal - the temporal object to format, not null
Returns:
the formatted string, not null
Throws:
DateTimeException - if an error occurs during formatting
API says This formats the date-time to a
String using the rules of the formatter.Can I know where can I read rules of he formatter and also in what scenarios it throws DateTimeException.Any resources to read will be of great help . I want to improve my confidence of answering date formatting questions.
Thanks,
Veena