| Package | Description |
|---|---|
| net.time4j |
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment. |
| net.time4j.engine |
Defines the common generic schemes and interfaces of chronological
systems.
|
| net.time4j.format |
Format support of Time4J.
|
| net.time4j.tz |
General timezone-API.
|
| Modifier and Type | Method and Description |
|---|---|
TZID |
ZonalMoment.getTimezone() |
TZID |
ZonalClock.getTimezone()
Gets the associated timezone.
|
| Modifier and Type | Method and Description |
|---|---|
static ChronoFormatter<Moment> |
Moment.formatter(DisplayMode mode,
Locale locale,
TZID tzid)
Creates a new formatter which uses the given display mode and locale
for formatting and parsing moments in given timezone.
|
static ChronoFormatter<Moment> |
Moment.formatter(String formatPattern,
ChronoPattern patternType,
Locale locale,
TZID tzid)
Creates a new formatter which uses the given pattern and locale
for formatting and parsing moments in given timezone.
|
ChronoFunction<Moment,V> |
ZonalElement.inTimezone(TZID tzid)
Creates a function which can query a
Moment in the
given timezone. |
Moment |
PlainTimestamp.inTimezone(TZID tzid)
Combines this local timestamp with given timezone to a global
UTC-moment.
|
ChronoOperator<Moment> |
ElementOperator.inTimezone(TZID tzid)
Creates an operator which can adjust a
Moment in the
given timezone. |
static ZonalClock |
SystemClock.inZonalView(TZID tzid)
Creates a local clock in given timezone.
|
ZonalMoment |
Moment.inZonalView(TZID tzid)
Creates a combination of this moment and given timezone.
|
boolean |
PlainTimestamp.isValid(TZID tzid)
Does this local timestamp exist in given timezone?
|
String |
PrettyTime.printRelative(UnixTime moment,
TZID tzid)
Formats given time point relative to the current time of
PrettyTime.getReferenceClock() as duration in at most second
precision or less. |
PlainTimestamp |
Moment.toZonalTimestamp(TZID tzid)
Converts this instance to a local timestamp in given timezone.
|
| Constructor and Description |
|---|
ZonalClock(TimeSource<?> timeSource,
TZID tzid)
Constructs a new clock which can yield the current local time in
given timezone.
|
| Modifier and Type | Method and Description |
|---|---|
TZID |
ChronoEntity.getTimezone()
Returns the associated timezone ID for display purposes
if available.
|
TZID |
ChronoDisplay.getTimezone()
Returns the associated timezone ID for display purposes
if available.
|
| Modifier and Type | Field and Description |
|---|---|
static AttributeKey<TZID> |
Attributes.TIMEZONE_ID
Attribute denoting the timezone identifier for display purposes.
|
| Modifier and Type | Method and Description |
|---|---|
Attributes.Builder |
Attributes.Builder.setTimezone(TZID tzid)
Sets the timezone reference.
|
ChronoFormatter<T> |
ChronoFormatter.withTimezone(TZID tzid)
Creates a copy of this formatter with given timezone id which
shall be used in formatting or parsing.
|
| Modifier and Type | Method and Description |
|---|---|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLongTimezoneName(Set<TZID> preferredZones)
Adds a long localized timezone name.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addShortTimezoneName(Set<TZID> preferredZones)
Adds a short localized timezone name (an abbreviation).
|
| Modifier and Type | Class and Description |
|---|---|
class |
ZonalOffset
Represents the shift of a local timestamp relative to UTC timezone
in seconds.
|
| Modifier and Type | Method and Description |
|---|---|
abstract TZID |
Timezone.getID()
Gets the associated timezone identifier.
|
| Modifier and Type | Method and Description |
|---|---|
static List<TZID> |
Timezone.getAvailableIDs()
Gets all available timezone IDs.
|
static Set<TZID> |
Timezone.getPreferredIDs(Locale locale)
Gets a
Set of preferred timezone IDs for given
ISO-3166-country code. |
| Modifier and Type | Method and Description |
|---|---|
static Timezone |
Timezone.of(String tzid,
TZID fallback)
Tries to load the timezone with the first given identifer else
with given alternative identifier.
|
static Timezone |
Timezone.of(TZID tzid)
Gets the timezone for given identifier.
|
Copyright © 2014. All rights reserved.