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.0.6. “The only reason for time is so that everything doesn’t happen at once.” Ray Cummings, The Girl in the Golden Atom (1922) Last Updated: July 2026 | Tested on: Groovy 5.0.6, 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 pain. Mutable date objects, thread-unsafe formatters, ... Read More
