| Package | Description |
|---|---|
| net.time4j |
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment. |
| net.time4j.tz |
General timezone-API.
|
| Modifier and Type | Field and Description |
|---|---|
static TemporalType<TimeZone,Timezone> |
TemporalType.JAVA_UTIL_TIMEZONE
Bridge between a traditional Java timezone of type
java.util.TimeZone and the class net.time4j.tz.Timezone. |
| Modifier and Type | Method and Description |
|---|---|
ChronoFunction<Moment,V> |
ZonalElement.in(Timezone tz)
Creates a function which can query a
Moment in the
given timezone. |
Moment |
PlainTimestamp.in(Timezone tz)
Combines this local timestamp with given timezone to a global
UTC-moment.
|
ChronoOperator<Moment> |
ElementOperator.in(Timezone tz)
Creates an operator which can adjust a
Moment in the
given timezone. |
static TimeMetric<IsoUnit,Duration<IsoUnit>> |
Duration.in(Timezone tz,
IsoUnit... units)
Helps to evaluate the zonal duration between two timestamps
and applies an offset correction if necessary.
|
Moment |
GeneralTimestamp.in(Timezone tz,
StartOfDay startOfDay)
Combines this general timestamp with given timezone to a global UTC-moment.
|
ZonalDateTime |
PlainTimestamp.inZonalView(Timezone tz)
Converts this instance to a combination of UTC-moment, given timezone and its zonal timestamp.
|
String |
PrettyTime.printRelative(UnixTime moment,
Timezone tz,
TimeUnit precision)
Formats given time point relative to the current time of
PrettyTime.getReferenceClock()
as duration in given precision or less. |
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. |
| Constructor and Description |
|---|
ZonalClock(TimeSource<?> timeSource,
Timezone tz)
Constructs a new clock which can yield the current local time in
given timezone.
|
| Modifier and Type | Method and Description |
|---|---|
static Timezone |
Timezone.of(String tzid)
Gets the timezone for given identifier.
|
static Timezone |
Timezone.of(String tzid,
TransitionHistory history)
Creates a new synthetic timezone based only on given data.
|
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.
|
static Timezone |
Timezone.ofPlatform()
Obtains the platform timezone with data and rules of the platform.
|
static Timezone |
Timezone.ofSystem()
Gets the system timezone.
|
abstract Timezone |
Timezone.with(TransitionStrategy strategy)
Creates a copy of this timezone which uses given strategy for
resolving local timestamps.
|
| Modifier and Type | Method and Description |
|---|---|
ZonalOffset |
TransitionStrategy.getOffset(GregorianDate localDate,
WallTime localTime,
Timezone timezone)
Calculates a suitable offset for given local timestamp.
|
long |
TransitionStrategy.resolve(GregorianDate localDate,
WallTime localTime,
Timezone timezone)
Calculates a suitable global timestamp for given local timestamp.
|
Copyright © 2014–2017. All rights reserved.