Uses of Enum Class
net.time4j.ClockUnit
Package
Description
The main package contains four basic types of ISO-8601, namely
PlainDate
, PlainTime
, PlainTimestamp
and Moment
.This package contains the expert-level format- and parse engine of Time4J.
Interval support.
-
Uses of ClockUnit in net.time4j
Modifier and TypeFieldDescriptionstatic 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 base1 day = 24 hours
und1 hour = 60 minutes
and1 minute = 60 seconds
.static TemporalType<Duration,Duration<ClockUnit>>
TemporalType.THREETEN_DURATION
Bridge between the JSR-310-classjava.time.Duration
and the classnet.time4j.Duration
.Modifier and TypeMethodDescriptionClockUnit.between(T start, T end)
Calculates the temporal distance between given wall times in this unit.Modifier and TypeMethodDescriptionstatic ClockUnit
Returns the enum constant of this class with the specified name.static ClockUnit[]
ClockUnit.values()
Returns an array containing the constants of this enum class, in the order they are declared.Modifier and TypeMethodDescriptionstatic Comparator<Duration<ClockUnit>>
Duration.comparatorOnClock()
Obtains a comparator suitable for Durations based on clock units.Short cut forTemporalType.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.Duration.ofClockUnits(int hours, int minutes, int seconds)
Creates a positive duratioon in hours, minutes and seconds.ClockUnit.only()
Yields a normalizer which converts a given duration in another duration with only this clock unit.Duration.parseClockPeriod(String period)
Parses a canonical representation with only wall time units to a time-only duration.ClockUnit.rounded()
Yields a normalizer which converts a given duration in another normalized duration with smaller units truncated and this unit rounded.Duration.toClockPeriod()
Extracts a new duration with all contained clock units only.Duration.toClockPeriodWithDaysAs24Hours()
Extracts a new duration with all contained clock units only.ClockUnit.truncated()
Yields a normalizer which converts a given duration in another duration with smaller units truncated.Modifier and TypeMethodDescriptionlong
Converts the given duration to a temporal amount measured in this unit.Subtracts given count of days from this general timestamp and return the result.Subtracts given amount in units from this clock time and yields the result of subtraction.Subtracts given amount in units from this timestamp and yields the result of subtraction.Adds given count of clock units to this general timestamp and return the result.Adds given amount in units to this clock time and yields the result of addition.Adds given amount in units to this timestamp and yields the result of addition.Formats given duration in clock units.Rolls this time by the given duration (as amount and unit) and also counts possible day overflow.PrettyTime.withEmptyUnit(ClockUnit emptyUnit)
Defines the time unit used for formatting an empty duration. -
Uses of ClockUnit in net.time4j.format.expert
Modifier and TypeMethodDescriptionstatic ChronoPrinter<PlainTime>
Iso8601Format.ofBasicTime(IsoDecimalStyle decimalStyle, ClockUnit precision)
Obtains a printer with given decimal style for printing a clock time in basic format "HHmm[ss[,SSSSSSSSS]]".static ChronoPrinter<PlainTime>
Iso8601Format.ofExtendedTime(IsoDecimalStyle decimalStyle, ClockUnit precision)
Obtains a printer with given decimal style for printing a clock time in extended format "HH:mm[:ss[,SSSSSSSSS]]".static ChronoPrinter<Moment>
Iso8601Format.ofMoment(IsoDateStyle dateStyle, IsoDecimalStyle decimalStyle, ClockUnit precision, ZonalOffset offset)
Obtains a printer with given styles for printing a moment.static ChronoPrinter<PlainTimestamp>
Iso8601Format.ofTimestamp(IsoDateStyle dateStyle, IsoDecimalStyle decimalStyle, ClockUnit precision)
Obtains a printer with given styles for printing a timestamp. -
Uses of ClockUnit in net.time4j.range
Modifier and TypeMethodDescriptionClockInterval.getDuration()
Yields the length of this interval.Modifier and TypeMethodDescriptionClockInterval.formatBasicISO(IsoDecimalStyle decimalStyle, ClockUnit precision)
Prints the canonical form of this interval in given basic ISO-8601 style.ClockInterval.formatExtendedISO(IsoDecimalStyle decimalStyle, ClockUnit precision)
Prints the canonical form of this interval in given extended ISO-8601 style.MomentInterval.formatISO(IsoDateStyle dateStyle, IsoDecimalStyle decimalStyle, ClockUnit precision, ZonalOffset offset, InfinityStyle infinityStyle)
Prints the canonical form of this interval in given ISO-8601 style.TimestampInterval.formatISO(IsoDateStyle dateStyle, IsoDecimalStyle decimalStyle, ClockUnit precision, InfinityStyle infinityStyle)
Prints the canonical form of this interval in given ISO-8601 style.MomentInterval.formatReduced(IsoDateStyle dateStyle, IsoDecimalStyle decimalStyle, ClockUnit precision, ZonalOffset offset, InfinityStyle infinityStyle)
Prints the canonical form of this interval in given reduced ISO-8601 style.TimestampInterval.formatReduced(IsoDateStyle dateStyle, IsoDecimalStyle decimalStyle, ClockUnit precision, InfinityStyle infinityStyle)
Prints the canonical form of this interval in given reduced ISO-8601 style.Moves this interval along the time axis by given units.Modifier and TypeMethodDescriptionObtains a stream iterating over every clock time which is the result of addition of given duration to start until the end of this interval is reached.Obtains a stream iterating over every clock time which is the result of addition of given duration to start until the end is reached.