groovy.time
Class DatumDependentDuration
java.lang.Object
  
groovy.time.BaseDuration
      
groovy.time.DatumDependentDuration
- All Implemented Interfaces: 
 - Comparable<BaseDuration>
 
- Direct Known Subclasses: 
 - TimeDatumDependentDuration
 
public class DatumDependentDuration
- extends BaseDuration
 
DatumDependentDuration represents durations whose length in milliseconds 
 cannot be determined without knowing the datum point.
 
 I don't know how many days in a year unless I know if it's a leap year or not.
 
 I don't know how many days in a month unless I know the name of the month 
 (and if it's a leap year if the month is February)
- Author:
 
  - John Wilson tug@wilson.co.uk
 
 
 
 
 
| 
Constructor Summary | 
DatumDependentDuration(int years,
                       int months,
                       int days,
                       int hours,
                       int minutes,
                       int seconds,
                       int millis)
 
            | 
 
 
 
 
DatumDependentDuration
public DatumDependentDuration(int years,
                              int months,
                              int days,
                              int hours,
                              int minutes,
                              int seconds,
                              int millis)
getMonths
public int getMonths()
- Overrides:
 getMonths in class BaseDuration
 
 
getYears
public int getYears()
- Overrides:
 getYears in class BaseDuration
 
 
plus
public DatumDependentDuration plus(DatumDependentDuration rhs)
 
plus
public DatumDependentDuration plus(TimeDatumDependentDuration rhs)
 
plus
public DatumDependentDuration plus(Duration rhs)
 
plus
public DatumDependentDuration plus(TimeDuration rhs)
 
minus
public DatumDependentDuration minus(DatumDependentDuration rhs)
 
minus
public DatumDependentDuration minus(Duration rhs)
 
toMilliseconds
public long toMilliseconds()
- Specified by:
 toMilliseconds in class BaseDuration
 
- See Also:
 Change the duration into milliseconds, relative to 'now.'  Therefore
 things like timezone and time of year will affect how this conversion 
 occurs.
 
getAgo
public Date getAgo()
- Specified by:
 getAgo in class BaseDuration
 
 
getFrom
public BaseDuration.From getFrom()
- Specified by:
 getFrom in class BaseDuration