public class TimeDuration extends Duration
Whilst we can't say how long a month is without knowing the year and the name of the month, we know how long a second is independent of the date.
This is not 100% true for minutes. Minutes can be 59, 60 or 61 seconds long (due to leap seconds.)
If you ask Duration to convert itself to milliseconds then it will work on the basis of 60 seconds in a minute. If you add or subtract it from a date it will take leap seconds into account.
BaseDuration.From
Constructor and Description |
---|
TimeDuration(int hours,
int minutes,
int seconds,
int millis) |
TimeDuration(int days,
int hours,
int minutes,
int seconds,
int millis) |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getAgo() |
BaseDuration.From |
getFrom() |
DatumDependentDuration |
minus(DatumDependentDuration rhs) |
Duration |
minus(Duration rhs) |
DatumDependentDuration |
plus(DatumDependentDuration rhs) |
Duration |
plus(Duration rhs) |
minus, minus, plus, toMilliseconds
compareTo, getDays, getHours, getMillis, getMinutes, getMonths, getSeconds, getYears, plus, toString
public TimeDuration(int hours, int minutes, int seconds, int millis)
public TimeDuration(int days, int hours, int minutes, int seconds, int millis)
public DatumDependentDuration plus(DatumDependentDuration rhs)
public DatumDependentDuration minus(DatumDependentDuration rhs)
public BaseDuration.From getFrom()