How has TemporalAdjusters changed in recent Java versions?

TemporalAdjusters, Java 8, Java 9, Java 10, Java 11, Java 12, Java 13, Java 14, Java 15, Java 16, Java 17, Java 18
Discover the evolution of TemporalAdjusters in Java from version 8 to 18, highlighting key changes and features that enhance date and time manipulation capabilities.
import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;

public class TemporalAdjustersExample {
    public static void main(String[] args) {
        LocalDate date = LocalDate.of(2023, 10, 10);
        
        // Adjust to the next Sunday
        LocalDate nextSunday = date.with(TemporalAdjusters.next(java.time.DayOfWeek.SUNDAY));
        System.out.println("Next Sunday: " + nextSunday);

        // Adjust to the first day of the month
        LocalDate firstDayOfMonth = date.with(TemporalAdjusters.firstDayOfMonth());
        System.out.println("First Day of Month: " + firstDayOfMonth);

        // Adjust to the last day of the month
        LocalDate lastDayOfMonth = date.with(TemporalAdjusters.lastDayOfMonth());
        System.out.println("Last Day of Month: " + lastDayOfMonth);
    }
}
    

TemporalAdjusters Java 8 Java 9 Java 10 Java 11 Java 12 Java 13 Java 14 Java 15 Java 16 Java 17 Java 18