groovy.time.package.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of groovy Show documentation
Show all versions of groovy Show documentation
Groovy: A powerful multi-faceted language for the JVM
package groovy.time.*
Classes for easily manipulating Dates and times. While
java.util.Date
has GDK methods for adding or subtracting days,
this is not so useful for different durations of time.
{@link groovy.time.TimeCategory TimeCategory} creates a simple internal DSL
for manipulating dates and times in a clean and precise fashion.
Examples
use ( TimeCategory ) {
// application on numbers:
println 1.minute.from.now
println 10.days.ago
// application on dates
def someDate = new Date()
println someDate - 3.months
}
@see groovy.time.TimeCategory