| Package | Description |
|---|---|
| net.time4j |
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment. |
| Modifier and Type | Field and Description |
|---|---|
static ChronoElement<ClockUnit> |
PlainTime.PRECISION
Defines the precision as the smallest non-zero time element and
truncates time parts of higher precision if necessary.
|
static Normalizer<ClockUnit> |
Duration.STD_CLOCK_PERIOD
Normalizes the wall time items of a duration on the base
1 day = 24 hours und 1 hour = 60 minutes and
1 minute = 60 seconds. |
| Modifier and Type | Method and Description |
|---|---|
<T extends TimePoint<? super ClockUnit,T>> |
ClockUnit.between(T start,
T end)
Calculates the temporal distance between given wall times
in this unit.
|
| Modifier and Type | Method and Description |
|---|---|
static ClockUnit |
ClockUnit.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ClockUnit[] |
ClockUnit.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
static TimeMetric<ClockUnit,Duration<ClockUnit>> |
Duration.inClockUnits()
Constructs a metric in hours, minutes, seconds and nanoseconds.
|
static TimeMetric<ClockUnit,Duration<ClockUnit>> |
Duration.inClockUnits()
Constructs a metric in hours, minutes, seconds and nanoseconds.
|
static Duration<ClockUnit> |
Duration.ofClockUnits(int hours,
int minutes,
int seconds)
Creates a positive duratioon in hours, minutes and seconds.
|
Normalizer<ClockUnit> |
ClockUnit.only()
Yields a normalizer which converts a given duration in another
duration with only this clock unit.
|
static Duration<ClockUnit> |
Duration.parseClockPeriod(String period)
Parses a canonical representation with only wall time units to a
time-only duration.
|
| Modifier and Type | Method and Description |
|---|---|
long |
ClockUnit.convert(long sourceDuration,
ClockUnit sourceUnit)
Converts the given duration to a temporal amount measured in
this unit.
|
String |
PrettyTime.print(long amount,
ClockUnit unit,
TextWidth width)
Formats given duration in clock units.
|
DayCycles |
PlainTime.roll(long amount,
ClockUnit unit)
Rolls this time by the given duration (as amount and unit) and
also counts possible day overflow.
|
PrettyTime |
PrettyTime.withEmptyUnit(ClockUnit emptyUnit)
Defines the time unit used for formatting an empty duration.
|
| Modifier and Type | Method and Description |
|---|---|
long |
ClockUnit.convert(TimeSpan<? extends ClockUnit> duration)
Converts the given duration to an amount in this unit and performs
any necessary truncation if needed.
|
Copyright © 2014. All rights reserved.