In java.time.format.DateTimeFormatterBuilder:
/** Map of letters to fields. */
private static final Map<Character, TemporalField> FIELD_MAP = new HashMap<>();
static {
// SDF = SimpleDateFormat
// ...
FIELD_MAP.put('F', ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH); // SDF, LDML
// ...
}
It shows that the symbol "F" may have the same meaning in SimpleDateFormatter(SDF).
In SDF, the symbol "F" means the ordinal of designated day of week, such as "the second Sunday in May" , Mother's Day (US).
With SDF, I can define Mother's Day (US) in 2021 by "2021-05-2-Sun" with pattern "yyyy-MM-F-EEE".
But any pattern with the symbol "F" with DateTimeFormatter may cause a DateTimeParseException.
I found an issue that is already "fixed":
[JDK-8169482]java.time.DateTimeFormatter javadoc: F is not week-of-month
But it only "fixed" the javadoc! Σ(っ °Д °;)っ
The symbol "F" is still with an undefined behavior.
The confusing description in SDF "F: Day of week in month" may be the reason.