Uses of Interface
net.time4j.IsoUnit
Package
Description
The main package contains four basic types of ISO-8601, namely
PlainDate
, PlainTime
, PlainTimestamp
and Moment
.Interval support.
Bridge to XML.
-
Uses of IsoUnit in net.time4j
Modifier and TypeClassDescriptionclass
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 TypeInterfaceDescriptioninterface
Represents a calendar unit conforming to ISO-8601.interface
Represents a wall time unit conforming to ISO-8601.Modifier and TypeClassDescriptionclass
Represents the most common time units related to a standard ISO-8601-calendar.class
Represents the most common time units on an ISO-8601-conforming analogue clock counting the scale ticks.class
Represents a special unit for week-based years which are described by ISO-8601 and follow the week cycle from Monday to Sunday.Modifier and TypeFieldDescriptionstatic Normalizer<IsoUnit>
Duration.STD_PERIOD
Normalizes the duration items on the base of1 year = 12 months
and1 day = 24 hours
and1 hour = 60 minutes
and1 minute = 60 seconds
- without converting days to months.Modifier and TypeMethodDescriptionstatic <U extends IsoUnit, T extends TimePoint<U, T>>
Comparator<Duration<? extends U>>Duration.comparator(T base)
Creates aComparator
which compares durations based on their lengths.static <U extends IsoUnit>
Duration.Formatter<U>Equivalent toDuration.Formatter.ofPattern(Class, String)
.static <U extends IsoUnit>
TimeMetric<U,Duration<U>>Duration.in(Collection<? extends U> units)
Constructs a metric for any kind of standard units in normalized form.static <U extends IsoUnit>
TimeMetric<U,Duration<U>>Duration.in(U... units)
Constructs a metric for any kind of standard units in normalized form.Duration.of(long amount, U unit)
Creates a new duration which only knows one unit.static <U extends IsoUnit>
Duration.Formatter<U>Constructs a new instance of duration formatter.Duration.ofZero()
Gets an empty duration without units.Duration.summingUp()
Helps to sum up durations of a stream.Modifier and TypeMethodDescriptionstatic 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.approximateMaxUnitOnly()
Creates a normalizer which yields an approximate duration based on the maximum relevant unit of the original duration (but not smaller than seconds).static Normalizer<IsoUnit>
Duration.approximateMaxUnitOrWeeks()
LikeapproximateMaxUnitOnly()
but can create week-based durations if the count of days is bigger than6
.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.Builder.build()
Creates a new duration conforming to ISO-8601.Duration.compose(Duration<CalendarUnit> calendarPeriod, Duration<ClockUnit> clockPeriod)
Creates a composition of a calendar period and a clock period.static Duration.Formatter<IsoUnit>
Equivalent toDuration.Formatter.ofPattern(String)
.Duration.from(TemporalAmount threeten)
Tries to convert given temporal amount to a duration.static TimeMetric<IsoUnit,Duration<IsoUnit>>
Helps to evaluate the zonal duration between two timestamps and applies an offset correction if necessary.static TimeMetric<IsoUnit,Duration<IsoUnit>>
Helps to evaluate the zonal duration between two timestamps and applies an offset correction if necessary.Normalizes 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>
Equivalent toofPattern(IsoUnit.class, pattern)
.Duration.parsePeriod(String period)
Parses a canonical representation to a duration.Modifier and TypeMethodDescriptionboolean
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>>
Helps to evaluate the zonal duration between two timestamps and applies an offset correction if necessary.static <U extends IsoUnit>
TimeMetric<U,Duration<U>>Duration.in(U... units)
Constructs a metric for any kind of standard units in normalized form. -
Uses of IsoUnit in net.time4j.range
Modifier and TypeMethodDescriptionTimestampInterval.getDuration(U... units)
Yields the length of this interval in given units.Modifier and TypeMethodDescriptionTimestampInterval.getDuration(Timezone tz, IsoUnit... units)
Yields the length of this interval in given units and applies a timezone offset correction .MomentInterval.getNominalDuration(Timezone tz, IsoUnit... units)
Yields the nominal duration of this interval in given timezone and units.Modifier and TypeMethodDescriptionTimestampInterval.getDuration(Timezone tz, IsoUnit... units)
Yields the length of this interval in given units and applies a timezone offset correction .TimestampInterval.getDuration(U... units)
Yields the length of this interval in given units.MomentInterval.getNominalDuration(Timezone tz, IsoUnit... units)
Yields the nominal duration of this interval in given timezone and units.Moves this interval along the time axis by given units. -
Uses of IsoUnit in net.time4j.xml
Modifier and TypeFieldDescriptionstatic XMLAdapter<Duration,Duration<IsoUnit>>
XMLAdapter.XML_DURATION
Bridge between a XML-duration according toxsd:duration
and the Time4J-typeDuration
.