|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovy.time.TimeCategory
public class TimeCategory extends Object
Apply a number of methods to allow convenient Date/Time manipulation,such as:
use ( TimeCategory ) { // application on numbers: println 1.minute.from.now println 10.hours.ago // application on dates def someDate = new Date() println someDate - 3.months }
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail |
---|
public static Duration getDay(Integer self)
public static Duration getDaylightSavingsOffset(Date self)
self
- a Date
public static Duration getDaylightSavingsOffset(BaseDuration self)
public static Duration getDays(Integer self)
public static TimeDuration getHour(Integer self)
public static TimeDuration getHours(Integer self)
public static TimeDuration getMillisecond(Integer self)
public static TimeDuration getMilliseconds(Integer self)
public static TimeDuration getMinute(Integer self)
public static TimeDuration getMinutes(Integer self)
public static DatumDependentDuration getMonth(Integer self)
public static DatumDependentDuration getMonths(Integer self)
public static Duration getRelativeDaylightSavingsOffset(Date self, Date other)
self
- a Dateother
- another Date
public static TimeDuration getSecond(Integer self)
public static TimeDuration getSeconds(Integer self)
@Deprecated public static TimeZone getTimeZone(Date self)
TimeZone.getDefault()
instead.
self
- a Date
public static Duration getWeek(Integer self)
public static Duration getWeeks(Integer self)
public static DatumDependentDuration getYear(Integer self)
public static DatumDependentDuration getYears(Integer self)
public static Date minus(Date date, BaseDuration duration)
public static TimeDuration minus(Date lhs, Date rhs)
lhs
- a Daterhs
- another Date
public static Date plus(Date date, BaseDuration duration)
Copyright © 2003-2013 The Codehaus. All rights reserved.