| Package | Description |
|---|---|
| net.time4j |
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment. |
| Modifier and Type | Class and Description |
|---|---|
class |
Duration<U extends IsoUnit>
ISO-8601-compatible duration between two time points.
|
static class |
Duration.Formatter<U extends IsoUnit>
Non-localized and user-defined format for durations based on a
pattern containing some standard symbols and literals.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
IsoDateUnit
Represents a calendar unit conforming to ISO-8601.
|
interface |
IsoTimeUnit
Represents a wall time unit conforming to ISO-8601.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CalendarUnit
Represents the most common time units related to a standard
ISO-8601-calendar.
|
class |
ClockUnit
Represents the most common time units on an ISO-8601-conforming
analogue clock counting the scale ticks.
|
| Modifier and Type | Field and Description |
|---|---|
static Normalizer<IsoUnit> |
Duration.STD_PERIOD
Normalizes the duration items on the base of
1 year = 12 months and 1 day = 24 hours and
1 hour = 60 minutes and 1 minute = 60 seconds -
without converting days to months. |
| Modifier and Type | Method and Description |
|---|---|
static <U extends IsoUnit,T extends TimePoint<? super U,T>> |
Duration.comparator(T base)
Creates a
Comparator which compares durations based on
their lengths. |
static <U extends IsoUnit> |
Duration.formatter(Class<U> type,
String pattern)
Equivalent to
Duration.Formatter.ofPattern(Class, String). |
static <U extends IsoUnit> |
Duration.in(U... units)
Constructs a metric for any kind of standard units in
normalized form.
|
static <U extends IsoUnit> |
Duration.of(long amount,
U unit)
Creates a new duration which only knows one unit.
|
static <U extends IsoUnit> |
Duration.Formatter.ofPattern(Class<U> type,
String pattern)
Constructs a new instance of duration formatter.
|
static <U extends IsoUnit> |
Duration.ofZero()
Gets an empty duration without units.
|
| Modifier and Type | Method and Description |
|---|---|
static Normalizer<IsoUnit> |
Duration.approximateHours(int steps)
Yields an approximate normalizer in steps of hours which
finally uses years, months, days and rounded hours.
|
static Normalizer<IsoUnit> |
Duration.approximateMinutes(int steps)
Yields an approximate normalizer in steps of minutes which
finally uses years, months, days, hours and rounded minutes.
|
static Normalizer<IsoUnit> |
Duration.approximateSeconds(int steps)
Yields an approximate normalizer in steps of seconds which finally
uses years, months, days, hours, minutes and rounded seconds.
|
static TimeAxis<IsoUnit,PlainTimestamp> |
PlainTimestamp.axis()
Provides a static access to the associated time axis respective
chronology which contains the chronological rules.
|
Duration<IsoUnit> |
Duration.Builder.build()
Creates a new duration conforming to ISO-8601.
|
static Duration<IsoUnit> |
Duration.compose(Duration<CalendarUnit> calendarPeriod,
Duration<ClockUnit> clockPeriod)
Creates a composition of a calendar period and a clock period.
|
static Duration.Formatter<IsoUnit> |
Duration.formatter(String pattern)
Equivalent to
Duration.Formatter.ofPattern(String). |
static Duration<IsoUnit> |
Duration.from(TemporalAmount threeten)
Tries to convert given temporal amount to a duration.
|
static TimeMetric<IsoUnit,Duration<IsoUnit>> |
Duration.in(Timezone tz,
IsoUnit... units)
Helps to evaluate the zonal duration between two timestamps
and applies an offset correction if necessary.
|
static TimeMetric<IsoUnit,Duration<IsoUnit>> |
Duration.in(Timezone tz,
IsoUnit... units)
Helps to evaluate the zonal duration between two timestamps
and applies an offset correction if necessary.
|
Duration<IsoUnit> |
PlainTimestamp.normalize(TimeSpan<? extends IsoUnit> timespan)
Normalized given timespan using years, months, days and
all clock units.
|
static Duration.Formatter<IsoUnit> |
Duration.Formatter.ofJodaStyle()
Handles Joda-Time-style-patterns which in general follow XML-schema
- with the exception of sign handling.
|
static Duration.Formatter<IsoUnit> |
Duration.Formatter.ofPattern(String pattern)
Equivalent to
ofPattern(IsoUnit.class, pattern). |
static Duration<IsoUnit> |
Duration.parsePeriod(String period)
Parses a canonical representation to a duration.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Duration.contains(IsoUnit unit)
Queries if this duration contains given time unit.
|
long |
Duration.getPartialAmount(IsoUnit unit)
Gets the partial amount associated with given time unit.
|
static TimeMetric<IsoUnit,Duration<IsoUnit>> |
Duration.in(Timezone tz,
IsoUnit... units)
Helps to evaluate the zonal duration between two timestamps
and applies an offset correction if necessary.
|
static <U extends IsoUnit> |
Duration.in(U... units)
Constructs a metric for any kind of standard units in
normalized form.
|
| Modifier and Type | Method and Description |
|---|---|
Duration<IsoUnit> |
PlainTimestamp.normalize(TimeSpan<? extends IsoUnit> timespan)
Normalized given timespan using years, months, days and
all clock units.
|
Copyright © 2014–2015. All rights reserved.