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
-
Interface Summary Interface Description DateParser DateParser is the "missing" interface for the parsing methods ofDateFormat
.DatePrinter DatePrinter is the "missing" interface for the format methods ofDateFormat
.FastDatePrinter.NumberRule Inner class defining a numeric rule.FastDatePrinter.Rule Inner class defining a rule. -
Class Summary Class Description CalendarUtils Helps useCalendar
s.DateFormatUtils Date and time formatting utilities and constants.DateUtils A suite of utilities surrounding the use of theCalendar
andDate
object.DateUtils.DateIterator Date iterator.DurationFormatUtils Duration formatting utilities and constants.DurationFormatUtils.Token Element that is parsed from the format pattern.DurationUtils Utilities forDuration
.FastDateFormat FastDateFormat is a fast and thread-safe version ofSimpleDateFormat
.FastDateParser FastDateParser is a fast and thread-safe version ofSimpleDateFormat
.FastDateParser.CaseInsensitiveTextStrategy A strategy that handles a text field in the parsing patternFastDateParser.CopyQuotedStrategy A strategy that copies the static or quoted field in the parsing patternFastDateParser.ISO8601TimeZoneStrategy FastDateParser.NumberStrategy A strategy that handles a number field in the parsing patternFastDateParser.PatternStrategy A strategy to parse a single field from the parsing patternFastDateParser.Strategy A strategy to parse a single field from the parsing patternFastDateParser.StrategyAndWidth Holds strategy and field widthFastDateParser.TimeZoneStrategy A strategy that handles a time zone field in the parsing patternFastDateParser.TimeZoneStrategy.TzInfo FastDatePrinter FastDatePrinter is a fast and thread-safe version ofSimpleDateFormat
.FastDatePrinter.CharacterLiteral Inner class to output a constant single character.FastDatePrinter.DayInWeekField Inner class to output the numeric day in week.FastDatePrinter.Iso8601_Rule Inner class to output a time zone as a number+/-HHMM
or+/-HH:MM
.FastDatePrinter.PaddedNumberField Inner class to output a padded number.FastDatePrinter.StringLiteral Inner class to output a constant string.FastDatePrinter.TextField Inner class to output one of a set of values.FastDatePrinter.TimeZoneDisplayKey Inner class that acts as a compound key for time zone names.FastDatePrinter.TimeZoneNameRule Inner class to output a time zone name.FastDatePrinter.TimeZoneNumberRule Inner class to output a time zone as a number+/-HHMM
or+/-HH:MM
.FastDatePrinter.TwelveHourField Inner class to output the twelve hour field.FastDatePrinter.TwentyFourHourField Inner class to output the twenty four hour field.FastDatePrinter.TwoDigitMonthField Inner class to output a two digit month.FastDatePrinter.TwoDigitNumberField Inner class to output a two digit number.FastDatePrinter.TwoDigitYearField Inner class to output a two digit year.FastDatePrinter.UnpaddedMonthField Inner class to output an unpadded month.FastDatePrinter.UnpaddedNumberField Inner class to output an unpadded number.FastDatePrinter.WeekYear Inner class to output the numeric day in week.FastTimeZone Faster methods to produce custom time zones.FormatCache<F extends java.text.Format> FormatCache is a cache and factory forFormat
s.FormatCache.ArrayKey Helper class to hold multi-part Map keys as arrays.GmtTimeZone Custom time zone that contains offset from GMT.StopWatch StopWatch
provides a convenient API for timings.TimeZones Helps to deal withTimeZone
s. -
Enum Summary Enum Description DateUtils.ModifyType Calendar modification types.StopWatch.SplitState Enumeration type which indicates the split status of stopwatch.StopWatch.State Enumeration type which indicates the status of stopwatch.