Groovy JDK

java.util
Class Date

Method Summary
int getAt(int field)
Support the subscript operator for a Date
Date minus(int days)
Subtract a number of days from this date and returns the new date
Date next()
Increment a Date by one day
Date plus(int days)
Add a number of days to this date and returns the new date
Date previous()
Decrement a Date by one day
 
Method Detail

getAt

public int getAt(int field)
Support the subscript operator for a Date.

Parameters:
field - a Calendar field, e.g. MONTH.
Returns:
the value for the given field, e.g. FEBRUARY
See:
Calendar.

minus

public Date minus(int days)
Subtract a number of days from this date and returns the new date.

Parameters:
days - the number of days to subtract.
Returns:
the new date

next

public Date next()
Increment a Date by one day.

Returns:
the next days date

plus

public Date plus(int days)
Add a number of days to this date and returns the new date.

Parameters:
days - the number of days to increase.
Returns:
the new date

previous

public Date previous()
Decrement a Date by one day.

Returns:
the previous days date

Groovy JDK