| Package | Description |
|---|---|
| net.time4j |
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment. |
| net.time4j.format |
Defines common interfaces for any format support of Time4J.
|
| net.time4j.format.expert |
This package contains the expert-level format- and parse engine of Time4J.
|
| net.time4j.format.platform |
Temporal formatters which access the platform specific resources.
|
| Modifier and Type | Method and Description |
|---|---|
static ZonalDateTime |
ZonalDateTime.parse(String text,
TemporalFormatter<Moment> parser)
Parses given text to a
ZonalDateTime. |
static Moment |
Moment.parse(String text,
TemporalFormatter<Moment> parser)
Parses given text to an instance of this class.
|
static PlainDate |
PlainDate.parse(String text,
TemporalFormatter<PlainDate> parser)
Parses given text to an instance of this class.
|
static PlainTime |
PlainTime.parse(String text,
TemporalFormatter<PlainTime> parser)
Parses given text to an instance of this class.
|
static PlainTimestamp |
PlainTimestamp.parse(String text,
TemporalFormatter<PlainTimestamp> parser)
Parses given text to an instance of this class.
|
String |
ZonalDateTime.print(TemporalFormatter<Moment> printer)
Creates a formatted output of this instance.
|
String |
Moment.print(TemporalFormatter<Moment> printer)
Creates a formatted output of this instance.
|
String |
PlainDate.print(TemporalFormatter<PlainDate> printer)
Creates a formatted output of this instance.
|
String |
PlainTime.print(TemporalFormatter<PlainTime> printer)
Creates a formatted output of this instance.
|
String |
PlainTimestamp.print(TemporalFormatter<PlainTimestamp> printer)
Creates a formatted output of this instance.
|
String |
PrettyTime.printRelativeOrDate(PlainDate date,
TZID tzid,
CalendarUnit maxRelativeUnit,
TemporalFormatter<PlainDate> formatter)
Formats given date relative to the current date of
PrettyTime.getReferenceClock()
as duration or as absolute date. |
String |
PrettyTime.printRelativeOrDateTime(UnixTime moment,
Timezone tz,
TimeUnit precision,
CalendarUnit maxRelativeUnit,
TemporalFormatter<Moment> formatter)
Formats given time point relative to the current time of
PrettyTime.getReferenceClock()
as duration in given precision or as absolute date-time. |
String |
PrettyTime.printRelativeOrDateTime(UnixTime moment,
Timezone tz,
TimeUnit precision,
long maxdelta,
TemporalFormatter<Moment> formatter)
Formats given time point relative to the current time of
PrettyTime.getReferenceClock()
as duration in given precision or as absolute date-time. |
| Modifier and Type | Method and Description |
|---|---|
TemporalFormatter<T> |
TemporalFormatter.with(Leniency leniency)
Sets the leniency mode.
|
TemporalFormatter<T> |
TemporalFormatter.with(Locale locale)
Creates a copy of this formatter with given locale.
|
TemporalFormatter<T> |
TemporalFormatter.withTimezone(String tzid)
Equivalent to
withTimezone(Timezone.of(tzid).getID()). |
TemporalFormatter<T> |
TemporalFormatter.withTimezone(TZID tzid)
Creates a copy of this formatter with given timezone id which
shall be used in formatting or parsing.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ChronoFormatter<T>
Represents a chronological format for the conversion between a
chronological text and the chronological value of type T.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SimpleFormatter<T>
A temporal formatter which uses platform specific resources based on
SimpleDateFormat. |
| Modifier and Type | Method and Description |
|---|---|
TemporalFormatter<T> |
SimpleFormatter.with(Leniency leniency) |
TemporalFormatter<T> |
SimpleFormatter.with(Locale locale) |
TemporalFormatter<T> |
SimpleFormatter.withTimezone(String tzid) |
TemporalFormatter<T> |
SimpleFormatter.withTimezone(TZID tzid) |
Copyright © 2014–2021. All rights reserved.