java.time

Leveraging the java.time API in Groovy for modern date handling.

Groovy Date and Time – Modern API Guide with 12 Tested Examples

Groovy date and time with the java.time API. 12+ examples covering LocalDate, LocalDateTime, ZonedDateTime, Duration, formatting. Groovy 5.x. “The only reason for time is so that everything doesn’t happen at once. In Groovy, at least, you get to control when it does.” Adapted from Albert Einstein Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 25 minutes If you’ve ever wrestled with java.util.Date and SimpleDateFormat in Groovy, you know the ... Read More