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 org.apache.commons.lang3.time.StopWatch.

The time package contains some basic utilities for manipulating time (a delorean, police box and grandfather clock?). These include a org.apache.commons.lang3.time.StopWatch for simple performance measurements and an optimized org.apache.commons.lang3.time.FastDateFormat class.

Since:

2.0

Interfaces

DateParser

DateParser is the “missing” interface for the parsing methods of java.text.DateFormat.

DatePrinter

DatePrinter is the “missing” interface for the format methods of java.text.DateFormat.

Classes

CalendarUtils

Helps use Calendars.

DateFormatUtils

Date and time formatting utilities and constants.

DateUtils

A suite of utilities surrounding the use of the java.util.Calendar and java.util.Date object.

DurationFormatUtils

Duration formatting utilities and constants.

DurationUtils

Utilities for Duration.

FastDateFormat

FastDateFormat is a fast and thread-safe version of java.text.SimpleDateFormat.

FastDateParser

FastDateParser is a fast and thread-safe version of java.text.SimpleDateFormat.

FastDatePrinter

FastDatePrinter is a fast and thread-safe version of java.text.SimpleDateFormat.

FastTimeZone

Faster methods to produce custom time zones.

Instants

Works with Instants.

StopWatch

StopWatch provides a convenient API for timings.

StopWatch.Split

Stores a split as a label and duration.

TimeZones

Helps work with java.util.TimeZones.