| Package | Description |
|---|---|
| net.time4j |
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment. |
| net.time4j.calendar |
Support for various regional calendars.
|
| net.time4j.calendar.astro |
Contains classes related to calendrical astronomy.
|
| net.time4j.calendar.frenchrev |
Support for the French revolutionary calendar.
|
| net.time4j.clock |
Contains miscellaneous clock implementations.
|
| net.time4j.engine |
Defines the common generic schemes and interfaces of chronological
systems.
|
| 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.
|
| net.time4j.range |
Interval support.
|
| net.time4j.tz |
General timezone-API.
|
| net.time4j.tz.olson |
Covers IANA-specific timezone topics.
|
| net.time4j.tz.other |
Covers alternative or specialized timezones.
|
| Modifier and Type | Method and Description |
|---|---|
TZID |
ZonalDateTime.getTimezone() |
TZID |
ZonalClock.getTimezone()
Gets the associated timezone.
|
TZID |
GeneralTimestamp.getTimezone() |
| Modifier and Type | Method and Description |
|---|---|
Moment |
PlainDate.atFirstMoment(TZID tzid)
Creates a new moment which corresponds to this date at earliest valid time
at the begin of associated day in given timezone.
|
PlainTimestamp |
PlainDate.atStartOfDay(TZID tzid)
Creates a new local timestamp with this date at earliest valid time
at the begin of associated day 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.
|
ZonalDateTime |
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. |
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. |
<C extends CalendarVariant<C>> |
Moment.toGeneralTimestamp(CalendarFamily<C> family,
String variant,
TZID tzid,
StartOfDay startOfDay)
Converts this instance to a general timestamp in given timezone.
|
<C extends Calendrical<?,C>> |
Moment.toGeneralTimestamp(Chronology<C> chronology,
TZID tzid,
StartOfDay startOfDay)
Converts this instance to a general timestamp in given timezone.
|
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 |
|---|---|
static ChronoFunction<Moment,HebrewTime> |
HebrewTime.at(TZID tzid)
Obtains the simplified Hebrew time dependent on given moment and a 24-hour-fixed scale.
|
| Modifier and Type | Method and Description |
|---|---|
TZID |
LunarTime.getObserverZoneID()
Obtains the observer timezone which is associated with any calendar date input.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<TZID> |
SolarTime.getObserverZoneID()
Obtains the optional observer timezone which might be associated with any calendar date input.
|
| Modifier and Type | Method and Description |
|---|---|
SolarTime.Builder |
SolarTime.Builder.inTimezone(TZID observerZoneID)
Helps to associate any calendar date input with given timezone.
|
Optional<PlainTimestamp> |
LunarTime.Moonlight.moonrise(TZID tzid)
Obtains the timestamp of moonrise in given timezone if it exists.
|
Optional<PlainTimestamp> |
LunarTime.Moonlight.moonset(TZID tzid)
Obtains the timestamp of moonset in given timezone if it exists.
|
static LunarTime.Builder |
LunarTime.ofLocation(TZID observerZoneID)
Obtains a builder for creating a new instance of local lunar time.
|
static LunarTime |
LunarTime.ofLocation(TZID observerZoneID,
double latitude,
double longitude)
Obtains the lunar time for given geographical location.
|
static LunarTime |
LunarTime.ofLocation(TZID observerZoneID,
double latitude,
double longitude,
int altitude)
Obtains the lunar time for given geographical location.
|
ChronoFunction<CalendarDate,SolarTime.Sunshine> |
SolarTime.sunshine(TZID tzid)
Queries a given calendar date for its associated sunshine data.
|
| Modifier and Type | Method and Description |
|---|---|
TZID |
FrenchRepublicanCalendar.Date.getTimezone()
Always throws an exception.
|
| Modifier and Type | Method and Description |
|---|---|
ZonalClock |
AbstractClock.inZonalView(TZID tzid)
Creates a local clock 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 | Method and Description |
|---|---|
abstract int |
StartOfDay.getDeviation(CalendarDate calendarDay,
TZID tzid)
Yields the start of given calendar day relative to midnight in seconds.
|
| 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.
|
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 | Method and Description |
|---|---|
static ChronoFormatter<Moment> |
ChronoFormatter.ofMomentPattern(String pattern,
PatternType type,
Locale locale,
TZID tzid)
Constructs a pattern-based formatter for global timestamp objects.
|
static ChronoFormatter<Moment> |
ChronoFormatter.ofMomentStyle(DisplayMode dateStyle,
DisplayMode timeStyle,
Locale locale,
TZID tzid)
|
static ChronoFormatter<Moment> |
ChronoFormatter.ofMomentStyle(FormatStyle dateStyle,
FormatStyle timeStyle,
Locale locale,
TZID tzid)
Constructs a style-based formatter for moments.
|
ChronoFormatter<T> |
ChronoFormatter.withTimezone(TZID tzid)
Equivalent to
with(Timezone.of(tzid)). |
| Modifier and Type | Method and Description |
|---|---|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLongTimezoneName(Set<TZID> preferredZones)
Adds a long localized timezone name (in specific non-location format).
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addShortTimezoneName(Set<TZID> preferredZones)
Adds a short localized timezone name (an abbreviation in specific non-location format).
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addTimezoneName(NameStyle style,
Set<TZID> preferredZones)
Adds a localized timezone name in given style.
|
| Modifier and Type | Method and Description |
|---|---|
static SimpleFormatter<Moment> |
SimpleFormatter.ofMomentPattern(String pattern,
Locale locale,
TZID tzid)
Constructs a pattern-based formatter for global timestamp objects (moments).
|
static SimpleFormatter<Moment> |
SimpleFormatter.ofMomentStyle(DisplayMode dateStyle,
DisplayMode timeStyle,
Locale locale,
TZID tzid)
|
static SimpleFormatter<Moment> |
SimpleFormatter.ofMomentStyle(FormatStyle dateStyle,
FormatStyle timeStyle,
Locale locale,
TZID tzid)
Constructs a style-based formatter for global timestamp objects (moments).
|
TemporalFormatter<T> |
SimpleFormatter.withTimezone(TZID tzid) |
| Modifier and Type | Method and Description |
|---|---|
MomentInterval |
TimestampInterval.inTimezone(TZID tzid)
Combines this local timestamp interval with given timezone
to a global UTC-interval.
|
MomentInterval |
DateInterval.inTimezone(TZID tzid)
Converts this instance to a moment interval with date boundaries mapped
to the midnight cycle in given time zone.
|
static DateInterval |
DateInterval.ofCurrentWeek(TimeSource clock,
TZID tzid,
Weekday firstDay)
Obtains the current calendar week based on given clock, time zone and first day of week.
|
Stream<MomentInterval> |
DateInterval.streamPartitioned(DayPartitionRule rule,
TZID tzid)
Creates a partitioning stream of moment intervals where every day of this interval is partitioned
according to given partitioning rule.
|
TimestampInterval |
MomentInterval.toZonalInterval(TZID tzid)
Converts this instance to a zonal timestamp interval
in given timezone.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ZonalOffset
Represents the shift of a local timestamp relative to UTC timezone
usually in full seconds.
|
| Modifier and Type | Method and Description |
|---|---|
abstract TZID |
Timezone.getID()
Gets the associated timezone identifier.
|
static TZID |
Timezone.normalize(String tzid)
Tries to normalize given timezone identifier on the base of best efforts.
|
static TZID |
Timezone.normalize(TZID tzid)
Equivalent to
normalize(tzid.canonical()). |
| Modifier and Type | Method and Description |
|---|---|
static List<TZID> |
Timezone.getAvailableIDs()
Gets all available timezone IDs.
|
static List<TZID> |
Timezone.getAvailableIDs(String provider)
Gets all available timezone IDs for given
ZoneModelProvider. |
static Set<TZID> |
Timezone.getPreferredIDs(Locale locale,
boolean smart,
String provider)
Gets a provider-specific
Set of preferred timezone IDs
for given ISO-3166-country code. |
| Modifier and Type | Method and Description |
|---|---|
static String |
Timezone.getDisplayName(TZID tzid,
NameStyle style,
Locale locale)
Returns the name of a timezone suitable for presentation to
users in given style and locale.
|
static TZID |
Timezone.normalize(TZID tzid)
Equivalent to
normalize(tzid.canonical()). |
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.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
StdZoneIdentifier
Identifies a timezone in a standard way.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AFRICA
Contains all standard timezone IDs in Africa.
|
class |
AMERICA
Contains all standard timezone IDs in America.
|
static class |
AMERICA.ARGENTINA
Contains all standard timezone IDs in Argentina.
|
static class |
AMERICA.INDIANA
Contains all standard timezone IDs in USA/Indiana.
|
static class |
AMERICA.KENTUCKY
Contains all standard timezone IDs in USA/Kentucky.
|
static class |
AMERICA.NORTH_DAKOTA
Contains all standard timezone IDs in USA/North-Dakota.
|
class |
ANTARCTICA
Contains all standard timezone IDs in Antarctica.
|
class |
ASIA
Contains all standard timezone IDs in Asia.
|
class |
ATLANTIC
Contains all standard timezone IDs in Atlantic Ocean.
|
class |
AUSTRALIA
Contains all standard timezone IDs in Australia.
|
class |
EUROPE
Contains all standard timezone IDs in Europe.
|
class |
INDIAN
Contains all standard timezone IDs in Indian Ocean.
|
class |
PACIFIC
Contains all standard timezone IDs in Pacific Ocean.
|
| Modifier and Type | Class and Description |
|---|---|
class |
MilitaryZone
Represents a military timezone (used by US) where the globe is divided
into fixed offset zones using the NATO phonetic alphabet.
|
| Modifier and Type | Method and Description |
|---|---|
Set<TZID> |
WindowsZone.resolve(Locale country)
Resolves this name reference to a set of various zone ids for given
country.
|
Optional<TZID> |
WindowsZone.resolveSmart(Locale country)
Resolves this name reference to at most one zone id for given
country.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
WindowsZone.toString(TZID tzid,
Locale locale)
Deduces the windows name of given timezone reference and region.
|
Copyright © 2014–2021. All rights reserved.