Package org.apache.commons.lang3.time
package org.apache.commons.lang3.time
Provides classes and methods to work with dates and durations.
These classes are immutable (and therefore thread-safe) apart from StopWatch
.
The time package contains some basic utilities for manipulating time (a delorean, police box and grandfather clock?).
These include a StopWatch
for simple performance measurements and an optimised FastDateFormat
class.
New in Lang 2.1 is the DurationFormatUtils
class, which provides various methods for formatting durations.
- Since:
- 2.0
-
ClassDescriptionHelps use
Calendar
s.Date and time formatting utilities and constants.DateParser is the "missing" interface for the parsing methods ofDateFormat
.DatePrinter is the "missing" interface for the format methods ofDateFormat
.Date iterator.Calendar modification types.Duration formatting utilities and constants.Element that is parsed from the format pattern.Utilities forDuration
.FastDateFormat is a fast and thread-safe version ofSimpleDateFormat
.FastDateParser is a fast and thread-safe version ofSimpleDateFormat
.A strategy that handles a text field in the parsing patternA strategy that copies the static or quoted field in the parsing patternA strategy that handles a number field in the parsing patternA strategy to parse a single field from the parsing patternA strategy to parse a single field from the parsing patternHolds strategy and field widthA strategy that handles a time zone field in the parsing patternFastDatePrinter is a fast and thread-safe version ofSimpleDateFormat
.Inner class to output a constant single character.Inner class to output the numeric day in week.Inner class to output a time zone as a number+/-HHMM
or+/-HH:MM
.Inner class defining a numeric rule.Inner class to output a padded number.Inner class defining a rule.Inner class to output a constant string.Inner class to output one of a set of values.Inner class that acts as a compound key for time zone names.Inner class to output a time zone name.Inner class to output a time zone as a number+/-HHMM
or+/-HH:MM
.Inner class to output the twelve hour field.Inner class to output the twenty four hour field.Inner class to output a two digit month.Inner class to output a two digit number.Inner class to output a two digit year.Inner class to output an unpadded month.Inner class to output an unpadded number.Inner class to output the numeric day in week.Faster methods to produce custom time zones.FormatCache<F extends Format>FormatCache is a cache and factory forFormat
s.Helper class to hold multi-part Map keys as arrays.Custom time zone that contains offset from GMT.StopWatch
provides a convenient API for timings.Enumeration type which indicates the split status of stopwatch.Enumeration type which indicates the status of stopwatch.Helps to deal withTimeZone
s.