Java Reference
In-Depth Information
Method
Description
Combines one object with another.
at
format
Applies the specified format to a temporal object, producing a string.
Converts input parameters to an instance of the target class.
from
Returns a part of the state of the target object.
get
Queries the target object.
is
minus
Returns a modified copy of the target object with the specified amount of time sub-
tracted.
of
Creates an instance, using specified input parameters for validation.
Parses an input string to produce an instance of the target class.
parse
Returns a modified copy of the target object with the specified amount of time ad-
ded.
plus
Converts an object to a different type.
to
with
Returns a modified copy of the target object with the specified element changed
(equivalent to a setter).
As mentioned previously, the Date-Time API is fluent; therefore, each of its classes
is located in a clearly marked package. Table 4-2 lists the packages that make up the
Date-Time API, along with brief descriptions of the classes that can be found in each.
Table 4-2 . Date-Time API Packages
Package
Description
java.time
The core classes of the API. These classes are used for working
with date-time data based on the ISO-8601 standard. These
classes are immutable and thread-safe.
java.time.chrono
The API for using calendar systems other than ISO-8601.
Classes for formatting date-time data.
java.time.format
Extended API that allows interpolations between date-time
classes.
java.time.temporal
Classes supporting time zone data.
java.time.zone
This chapter presents a brief overview of some commonly used date-time features.
If you will be performing significant work with dates and times, you should read the
Date-Time API documentation that is available online.
 
 
Search WWH ::




Custom Search