

Invocation of this method (for thread safety). Note that a new DateFormat instance is created for every New Date(0).format('MM/dd/yy') would return the string Parameters: to - another Date to go down to closure - the closure to call Since: 2.2įor example, if the system timezone is GMT, public void downto( Date to, Closure closure)ĭecrementing by one day each time.Parameters: updates - A Map of Calendar keys and values Returns: The newly created Date Since: 2.2.0 See Also: Calendar#set(int, int) Date#set() Calendar#copyWith() Returns: the Date but with the time portion cleared Since: 1.6.7ĭef oneYearFromNow = pyWith(year: nextYear) It makes sense to compare month/day/year only portions of a Date.

Methods inherited from interface java.lang.

ObjectĪddShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withStream, withTraits
This Date instance, according to the locale-specific format used by Return a string representation of the date and time portion of Return a string representation of the 'day' portion of this dateĪccording to the locale-specific DateFormat#SHORT default format. Support the subscript operator for a Date with a collection of indices. Support the subscript operator for a Date. Iterates from this date down to the given date, inclusive,Ĭreate a String representation of this date according to the given Some fields updated according to a Map of changes. Support creating a new Date having similar properties toĪn existing Date (which remains unaltered) but with Clears the time portion of this Date instance useful utility where
