Java, Java8, Java21, Java17, Migration.
a basic overview and example of using the Date and Time API: import java.time.LocalDate; import java.time.LocalTime; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class DateTimeAPIExample { public static void main(String[] args) { // Current date, time, and