Package groovy.time
Class DatumDependentDuration
java.lang.Object
groovy.time.BaseDuration
groovy.time.DatumDependentDuration
- All Implemented Interfaces:
- java.lang.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)
- 
Nested Class SummaryNested classes/interfaces inherited from class groovy.time.BaseDurationBaseDuration.From
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description DatumDependentDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis)
- 
Method SummaryModifier and Type Method Description java.util.DategetAgo()BaseDuration.FromgetFrom()intgetMonths()intgetYears()DatumDependentDurationminus(DatumDependentDuration rhs)DatumDependentDurationminus(Duration rhs)DatumDependentDurationplus(DatumDependentDuration rhs)DatumDependentDurationplus(Duration rhs)DatumDependentDurationplus(TimeDatumDependentDuration rhs)DatumDependentDurationplus(TimeDuration rhs)longtoMilliseconds()Methods inherited from class groovy.time.BaseDurationcompareTo, getDays, getHours, getMillis, getMinutes, getSeconds, plus, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
- 
Constructor Details- 
DatumDependentDurationpublic DatumDependentDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis)
 
- 
- 
Method Details- 
getMonthspublic int getMonths()- Overrides:
- getMonthsin class- BaseDuration
 
- 
getYearspublic int getYears()- Overrides:
- getYearsin class- BaseDuration
 
- 
plus
- 
plus
- 
plus
- 
plus
- 
minus
- 
minus
- 
toMillisecondspublic long toMilliseconds()
- 
getAgopublic java.util.Date getAgo()- Specified by:
- getAgoin class- BaseDuration
 
- 
getFrom- Specified by:
- getFromin class- BaseDuration
 
 
-