Package groovy.time
Class TimeDatumDependentDuration
java.lang.Object
groovy.time.BaseDuration
groovy.time.DatumDependentDuration
groovy.time.TimeDatumDependentDuration
- All Implemented Interfaces:
Comparable<BaseDuration>
TimeDatumDuration represents a time period which results from an
arithmetic operation between a TimeDuration object and a DatumDuration object
-
Nested Class Summary
Nested classes/interfaces inherited from class groovy.time.BaseDuration
BaseDuration.From -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTimeDatumDependentDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis) Creates a mixed time and datum-dependent duration. -
Method Summary
Modifier and TypeMethodDescriptiongetFrom()Returns a helper for computing dates relative to now.Subtracts a datum-dependent duration.Subtracts a fixed duration.Adds a datum-dependent duration.Adds a fixed duration.Methods inherited from class groovy.time.DatumDependentDuration
getAgo, getMonths, getYears, plus, plus, toMillisecondsMethods inherited from class groovy.time.BaseDuration
compareTo, getDays, getHours, getMillis, getMinutes, getSeconds, plus, toString
-
Constructor Details
-
TimeDatumDependentDuration
public TimeDatumDependentDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis) Creates a mixed time and datum-dependent duration.- Parameters:
years- the year componentmonths- the month componentdays- the day componenthours- the hour componentminutes- the minute componentseconds- the second componentmillis- the millisecond component
-
-
Method Details
-
plus
Adds a fixed duration.- Overrides:
plusin classDatumDependentDuration- Parameters:
rhs- the duration to add- Returns:
- the combined duration
-
plus
Adds a datum-dependent duration.- Overrides:
plusin classDatumDependentDuration- Parameters:
rhs- the duration to add- Returns:
- the combined duration
-
minus
Subtracts a fixed duration.- Overrides:
minusin classDatumDependentDuration- Parameters:
rhs- the duration to subtract- Returns:
- the resulting duration
-
minus
Subtracts a datum-dependent duration.- Overrides:
minusin classDatumDependentDuration- Parameters:
rhs- the duration to subtract- Returns:
- the resulting duration
-
getFrom
Returns a helper for computing dates relative to now.- Overrides:
getFromin classDatumDependentDuration- Returns:
- the relative-date helper
-