| Package | Description |
|---|---|
| net.time4j |
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment. |
| net.time4j.calendar.astro |
Contains classes related to calendrical astronomy.
|
| 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.
|
| Modifier and Type | Field and Description |
|---|---|
static TemporalType<LocalDateTime,PlainTimestamp> |
TemporalType.LOCAL_DATE_TIME
Bridge between the JSR-310-class
java.time.LocalDateTime and
the class PlainTimestamp. |
| Modifier and Type | Method and Description |
|---|---|
PlainTimestamp |
PlainDate.at(PlainTime time)
Creates a new local timestamp with this date and given wall time.
|
PlainTimestamp |
PlainDate.atStartOfDay()
Creates a new local timestamp with this date at midnight at the
begin of associated day.
|
PlainTimestamp |
PlainDate.atStartOfDay(String tzid)
Creates a new local timestamp with 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.
|
PlainTimestamp |
PlainDate.atTime(int hour,
int minute)
Is equivalent to
at(PlainTime.of(hour, minute)). |
PlainTimestamp |
PlainDate.atTime(int hour,
int minute,
int second)
Is equivalent to
at(PlainTime.of(hour, minute, second)). |
static PlainTimestamp |
PlainTimestamp.from(LocalDateTime ldt)
Short cut for
TemporalType.LOCAL_DATE_TIME.translate(ldt). |
PlainTimestamp |
PlainTimestamp.minus(long amount,
CalendarUnit unit)
Subtracts given amount in units from this timestamp and yields the result of subtraction.
|
PlainTimestamp |
PlainTimestamp.minus(long amount,
ClockUnit unit)
Subtracts given amount in units from this timestamp and yields the result of subtraction.
|
PlainTimestamp |
ZonalClock.now()
Gets the current timestamp in the associated timezone.
|
static PlainTimestamp |
PlainTimestamp.nowInSystemTime()
Obtains the current timestamp in system time.
|
static PlainTimestamp |
PlainTimestamp.of(int year,
int month,
int dayOfMonth,
int hour,
int minute)
Creates a new local timestamp in minute precision.
|
static PlainTimestamp |
PlainTimestamp.of(int year,
int month,
int dayOfMonth,
int hour,
int minute,
int second)
Creates a new local timestamp in second precision.
|
static PlainTimestamp |
PlainTimestamp.of(PlainDate date,
PlainTime time)
Creates a new local timestamp with calendar date and wall time.
|
static PlainTimestamp |
PlainTimestamp.parse(String text,
TemporalFormatter<PlainTimestamp> parser)
Parses given text to an instance of this class.
|
PlainTimestamp |
PlainTimestamp.plus(long amount,
CalendarUnit unit)
Adds given amount in units to this timestamp and yields the result of addition.
|
PlainTimestamp |
PlainTimestamp.plus(long amount,
ClockUnit unit)
Adds given amount in units to this timestamp and yields the result of addition.
|
PlainTimestamp |
Moment.toLocalTimestamp()
Converts this instance to a local timestamp in the system
timezone.
|
PlainTimestamp |
ZonalDateTime.toTimestamp()
Converts this object to a zonal timestamp.
|
PlainTimestamp |
Moment.toZonalTimestamp(String tzid)
Converts this instance to a local timestamp in given timezone.
|
PlainTimestamp |
Moment.toZonalTimestamp(TZID tzid)
Converts this instance to a local timestamp in given timezone.
|
PlainTimestamp |
PlainTimestamp.with(ElementOperator<?> operator)
Adjusts this timestamp by given operator.
|
PlainTimestamp |
PlainTimestamp.with(PlainDate date)
Adjusts the calendar part of this timestamp.
|
PlainTimestamp |
PlainTimestamp.with(PlainTime time)
Adjusts the wall time part of this timestamp.
|
| Modifier and Type | Method and Description |
|---|---|
static TimeAxis<IsoUnit,PlainTimestamp> |
PlainTimestamp.axis()
Provides a static access to the associated time axis respective
chronology which contains the chronological rules.
|
| Modifier and Type | Method and Description |
|---|---|
int |
PlainTimestamp.compareTo(PlainTimestamp timestamp)
Defines the temporal order of date and time as natural order.
|
boolean |
PlainTimestamp.isAfter(PlainTimestamp timestamp) |
boolean |
PlainTimestamp.isBefore(PlainTimestamp timestamp) |
boolean |
PlainTimestamp.isSimultaneous(PlainTimestamp timestamp) |
| Modifier and Type | Method and Description |
|---|---|
static PlainTimestamp |
PlainTimestamp.parse(String text,
TemporalFormatter<PlainTimestamp> parser)
Parses given text to an instance of this class.
|
String |
PlainTimestamp.print(TemporalFormatter<PlainTimestamp> printer)
Creates a formatted output of this instance.
|
| Modifier and Type | Method and Description |
|---|---|
PlainTimestamp |
SolarTime.Sunshine.endLocal()
Obtains the local timestamp of sunset if it exists.
|
PlainTimestamp |
SolarTime.Sunshine.startLocal()
Obtains the local timestamp of sunrise if it exists.
|
| Modifier and Type | Method and Description |
|---|---|
static ChronoFunction<Moment,PlainTimestamp> |
SolarTime.apparentAt(ZonalOffset offset)
Determines the apparent solar time of any moment at given local time zone offset.
|
static ChronoFunction<Moment,PlainTimestamp> |
SolarTime.apparentAt(ZonalOffset offset,
String calculator)
Determines the apparent solar time of any moment at given local time zone offset.
|
Optional<PlainTimestamp> |
LunarTime.Moonlight.moonrise(TZID tzid)
Obtains the timestamp of moonrise in given timezone if it exists.
|
Optional<PlainTimestamp> |
LunarTime.Moonlight.moonriseLocal()
Obtains the timestamp of moonrise in the local observer timezone if it exists.
|
Optional<PlainTimestamp> |
LunarTime.Moonlight.moonset(TZID tzid)
Obtains the timestamp of moonset in given timezone if it exists.
|
Optional<PlainTimestamp> |
LunarTime.Moonlight.moonsetLocal()
Obtains the timestamp of moonset in the local observer timezone if it exists.
|
static ChronoFunction<Moment,PlainTimestamp> |
SolarTime.onAverage(ZonalOffset offset)
Determines the mean solar time of any moment at given local time zone offset.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
SolarTime.Sunshine.isPresent(PlainTimestamp tsp)
Is there any sunshine at given local timestamp?
|
| Modifier and Type | Field and Description |
|---|---|
static ChronoFormatter<PlainTimestamp> |
Iso8601Format.BASIC_DATE_TIME
Defines the basic ISO-8601-format for a composition of
calendar date and wall time with hour and minute using the pattern
"uuuuMMdd'T'HH[mm[ss[,SSSSSSSSS]]]".
|
static ChronoFormatter<PlainTimestamp> |
Iso8601Format.EXTENDED_DATE_TIME
Defines the extended ISO-8601-format for a composition of
calendar date and wall time with hour and minute using the pattern
"uuuu-MM-dd'T'HH[:mm[:ss[,SSSSSSSSS]]]".
|
| Modifier and Type | Method and Description |
|---|---|
static ChronoPrinter<PlainTimestamp> |
Iso8601Format.ofTimestamp(IsoDateStyle dateStyle,
IsoDecimalStyle decimalStyle,
ClockUnit precision)
Obtains a printer with given styles for printing a timestamp.
|
static ChronoFormatter<PlainTimestamp> |
ChronoFormatter.ofTimestampPattern(String pattern,
PatternType type,
Locale locale)
Constructs a pattern-based formatter for plain timestamps.
|
static ChronoFormatter<PlainTimestamp> |
ChronoFormatter.ofTimestampStyle(DisplayMode dateStyle,
DisplayMode timeStyle,
Locale locale)
|
static ChronoFormatter<PlainTimestamp> |
ChronoFormatter.ofTimestampStyle(FormatStyle dateStyle,
FormatStyle timeStyle,
Locale locale)
Constructs a style-based formatter for plain timestamps.
|
| Modifier and Type | Method and Description |
|---|---|
static SimpleFormatter<PlainTimestamp> |
SimpleFormatter.ofTimestampPattern(String pattern,
Locale locale)
Creates a new formatter which uses the given pattern and locale
for formatting and parsing plain timestamps.
|
static SimpleFormatter<PlainTimestamp> |
SimpleFormatter.ofTimestampStyle(DisplayMode dateStyle,
DisplayMode timeStyle,
Locale locale)
|
static SimpleFormatter<PlainTimestamp> |
SimpleFormatter.ofTimestampStyle(FormatStyle dateStyle,
FormatStyle timeStyle,
Locale locale)
Constructs a style-based formatter for plain timestamp objects.
|
| Modifier and Type | Method and Description |
|---|---|
static <I extends ChronoInterval<PlainTimestamp>> |
IntervalTree.onTimestampAxis(Collection<I> intervals)
Creates an interval tree on the timestamp axis filled with given timestamp intervals.
|
| Modifier and Type | Method and Description |
|---|---|
PlainTimestamp |
TimestampInterval.getEndAsTimestamp()
Yields the end time point.
|
PlainTimestamp |
TimestampInterval.getStartAsTimestamp()
Yields the start time point.
|
PlainTimestamp |
TimestampInterval.random()
Obtains a random timestamp within this interval.
|
| Modifier and Type | Method and Description |
|---|---|
static Comparator<ChronoInterval<PlainTimestamp>> |
TimestampInterval.comparator()
Defines a comparator which sorts intervals first
by start boundary and then by length.
|
static IntervalCollection<PlainTimestamp> |
IntervalCollection.onTimestampAxis()
Yields an empty instance on the timestamp axis.
|
static <I extends ChronoInterval<PlainTimestamp>> |
IntervalTree.onTimestampAxis(Collection<I> intervals)
Creates an interval tree on the timestamp axis filled with given timestamp intervals.
|
Stream<PlainTimestamp> |
TimestampInterval.stream(Duration<?> duration)
Obtains a stream iterating over every timestamp which is the result of addition of given duration
to start until the end of this interval is reached.
|
static Stream<PlainTimestamp> |
TimestampInterval.stream(Duration<?> duration,
PlainTimestamp start,
PlainTimestamp end)
Obtains a stream iterating over every timestamp which is the result of addition of given duration
to start until the end is reached.
|
| Modifier and Type | Method and Description |
|---|---|
static TimestampInterval |
TimestampInterval.between(PlainTimestamp start,
PlainTimestamp end)
Creates a finite half-open interval between given time points.
|
default boolean |
DayPartitionRule.matches(PlainTimestamp timestamp)
Does this rule match given timestamp such that any rule interval contains it?
|
static IsoRecurrence<TimestampInterval> |
IsoRecurrence.of(int count,
Duration<?> duration,
PlainTimestamp end)
Creates a recurrent backward sequence of timestamp intervals having given duration.
|
static IsoRecurrence<TimestampInterval> |
IsoRecurrence.of(int count,
PlainTimestamp start,
Duration<?> duration)
Creates a recurrent sequence of timestamp intervals having given duration.
|
static IsoRecurrence<TimestampInterval> |
IsoRecurrence.of(int count,
PlainTimestamp start,
PlainTimestamp end)
Creates a recurrent sequence of timestamp intervals having the duration
of first timestamp interval in years, months, days, hours, minutes, seconds and nanoseconds.
|
static TimestampInterval |
TimestampInterval.since(PlainTimestamp start)
Creates an infinite half-open interval since given start
timestamp.
|
static Stream<PlainTimestamp> |
TimestampInterval.stream(Duration<?> duration,
PlainTimestamp start,
PlainTimestamp end)
Obtains a stream iterating over every timestamp which is the result of addition of given duration
to start until the end is reached.
|
static TimestampInterval |
TimestampInterval.until(PlainTimestamp end)
Creates an infinite open interval until given end timestamp.
|
| Modifier and Type | Method and Description |
|---|---|
static TimestampInterval |
TimestampInterval.from(ChronoInterval<PlainTimestamp> interval)
Converts an arbitrary timestamp interval to an interval of this type.
|
static TimestampInterval |
TimestampInterval.parse(CharSequence text,
ChronoParser<PlainTimestamp> parser,
BracketPolicy policy)
Interpretes given text as interval.
|
static TimestampInterval |
TimestampInterval.parse(CharSequence text,
ChronoParser<PlainTimestamp> startFormat,
char separator,
ChronoParser<PlainTimestamp> endFormat,
BracketPolicy policy,
ParseLog status)
Interpretes given text as interval.
|
static TimestampInterval |
TimestampInterval.parse(CharSequence text,
ChronoParser<PlainTimestamp> startFormat,
char separator,
ChronoParser<PlainTimestamp> endFormat,
BracketPolicy policy,
ParseLog status)
Interpretes given text as interval.
|
static TimestampInterval |
TimestampInterval.parse(String text,
ChronoParser<PlainTimestamp> parser)
Interpretes given text as interval using a localized interval pattern.
|
static TimestampInterval |
TimestampInterval.parse(String text,
ChronoParser<PlainTimestamp> parser,
String intervalPattern)
Interpretes given text as interval using given interval pattern.
|
Copyright © 2014–2021. All rights reserved.