| 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. |
static TemporalType<Duration,Duration<ClockUnit>> |
TemporalType.THREETEN_DURATION
Bridge between the JSR-310-class
java.time.Duration and
the class net.time4j.Duration. |
| 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 Duration<ClockUnit> |
Duration.from(Duration threetenDuration)
Short cut for
TemporalType.THREETEN_DURATION.translate(threetenDuration). |
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.
|
Normalizer<ClockUnit> |
ClockUnit.rounded()
Yields a normalizer which converts a given duration in another
normalized duration with smaller units truncated and this unit rounded.
|
Duration<ClockUnit> |
Duration.toClockPeriod()
Extracts a new duration with all contained clock units only.
|
Normalizer<ClockUnit> |
ClockUnit.truncated()
Yields a normalizer which converts a given duration in another
duration with smaller units truncated.
|
| 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 |
|---|---|
static Duration<IsoUnit> |
Duration.compose(Duration<CalendarUnit> calendarPeriod,
Duration<ClockUnit> clockPeriod)
Creates a composition of a calendar period and a clock period.
|
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–2015. All rights reserved.