Given:
LocalDate d1 = LocalDate.of(1997,2,7);
DateTimeFormatter dtf =
DateTimeFormatter.ofPattern( /*insert code here*/ );
System.out.println(dtf.format (d1));
Which pattern formats the date as Friday 7th of February 1997?
Given:
LocalDate d1 = LocalDate.of(1997,2,7);
DateTimeFormatter dtf =
DateTimeFormatter.ofPattern( /*insert code here*/ );
System.out.println(dtf.format (d1));
Which pattern formats the date as Friday 7th of February 1997?
To format the date as 'Friday 7th of February 1997', the correct pattern needs to include day name (eeee), day of the month (d) followed by 'th of', full month name (MMMM), and year (yyyy). Using single quotes (' ') correctly preserves the text literal that should not be interpreted as date-time fields. Therefore, the correct pattern is 'eeee d'th of' MMMM yyyy'.
D is true