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)
| Fields inherited from class | Fields |
|---|---|
class BaseDuration | days, hours, millis, minutes, months, seconds, years |
| Constructor and description |
|---|
DatumDependentDuration
(int years, int months, int days, int hours, int minutes, int seconds, int millis) |
| Type Params | Return Type | Name and description |
|---|---|---|
public Date |
getAgo() | |
public BaseDuration.From |
getFrom() | |
public int |
getMonths() | |
public Date |
getNow() | |
public int |
getYears() | |
public DatumDependentDuration |
minus(DatumDependentDuration rhs) | |
public DatumDependentDuration |
minus(Duration rhs) | |
public DatumDependentDuration |
plus(DatumDependentDuration rhs) | |
public DatumDependentDuration |
plus(TimeDatumDependentDuration rhs) | |
public DatumDependentDuration |
plus(Duration rhs) | |
public DatumDependentDuration |
plus(TimeDuration rhs) | |
public long |
toMilliseconds()
|
| Methods inherited from class | Name |
|---|---|
class BaseDuration | compareTo, getAgo, getDays, getFrom, getHours, getMillis, getMinutes, getMonths, getSeconds, getYears, plus, toMilliseconds, toString |
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/groovy/time/DatumDependentDuration.html