public class TimeDuration
extends Duration
A time period in hours, minutes, seconds and milliseconds (optionally with days).
DEQUIRKED: getAgo()/getFrom() inherited from BaseDuration.
| Constructor and description |
|---|
TimeDuration(int hours, int minutes, int seconds, int millis)Creates a duration of hours, minutes, seconds
and millis, with the day count left at zero. |
TimeDuration(int days, int hours, int minutes, int seconds, int millis)Creates a duration of days, hours, minutes,
seconds and millis. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Duration |
minus(Duration rhs)Subtracts rhs field by field and returns the difference as a
TimeDuration. |
|
public DatumDependentDuration |
minus(DatumDependentDuration rhs)Negates the years and months from rhs and subtracts the day and
time fields, returning a TimeDatumDependentDuration. |
|
public Duration |
plus(Duration rhs)Adds rhs field by field and returns the sum as a TimeDuration. |
|
public DatumDependentDuration |
plus(DatumDependentDuration rhs)Keeps the years and months from rhs and adds the day and time
fields, returning a TimeDatumDependentDuration. |
Creates a duration of hours, minutes, seconds
and millis, with the day count left at zero.
Creates a duration of days, hours, minutes,
seconds and millis.
Subtracts rhs field by field and returns the difference as a
TimeDuration.
Negates the years and months from rhs and subtracts the day and
time fields, returning a TimeDatumDependentDuration.
Adds rhs field by field and returns the sum as a TimeDuration.
Keeps the years and months from rhs and adds the day and time
fields, returning a TimeDatumDependentDuration.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.