Uses of Class
net.time4j.Moment
Packages that use Moment
Package
Description
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment.Support for various regional calendars.
Contains classes related to calendrical astronomy.
Contains miscellaneous clock implementations.
This package contains the expert-level format- and parse engine of Time4J.
Temporal formatters which access the platform specific resources.
Interval support.
Bridge to JDBC.
-
Uses of Moment in net.time4j
Fields in net.time4j declared as MomentModifier and TypeFieldDescriptionstatic MomentMoment.UNIX_EPOCHStart of UNIX-era = [1970-01-01T00:00:00,000000000Z].Fields in net.time4j with type parameters of type MomentModifier and TypeFieldDescriptionstatic TemporalType<Instant,Moment>TemporalType.INSTANTBridge between the JSR-310-classjava.time.Instantand the classMoment.static TemporalType<Date,Moment>TemporalType.JAVA_UTIL_DATEBridge between a traditional Java timestamp of typejava.util.Dateand the classMoment.static TemporalType<Long,Moment>TemporalType.MILLIS_SINCE_UNIXBridge between a traditional Java timestamp as count of milliseconds since UNIX-epoch and the classMoment.Methods in net.time4j that return MomentModifier and TypeMethodDescriptionGeneralTimestamp.at(ZonalOffset offset, StartOfDay startOfDay)Combines this general timestamp with given timezone offset to a global UTC-moment.PlainTimestamp.at(ZonalOffset offset)Combines this local timestamp with the given timezone offset to a global UTC-moment.PlainDate.atFirstMoment(String tzid)Creates a new moment which corresponds to this date at earliest valid time at the begin of associated day in given timezone.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.atUTC()Combines this local timestamp with the timezone offset UTC+00:00 to a global UTC-moment.static MomentSystemClock.currentMoment()Equivalent toSystemClock.INSTANCE.currentTime().SystemClock.currentTime()static MomentShort cut forTemporalType.INSTANT.translate(instant).static MomentCommon conversion method.GeneralTimestamp.in(Timezone tz, StartOfDay startOfDay)Combines this general timestamp with given timezone to a global UTC-moment.Combines this local timestamp with given timezone to a global UTC-moment.PlainTimestamp.inStdTimezone()Combines this local timestamp with the system timezone to a global UTC-moment.PlainTimestamp.inTimezone(TZID tzid)Combines this local timestamp with given timezone to a global UTC-moment.Subtracts an amount of given SI-unit from this timestamp on the UTC time scale.Moment.minus(MachineTime<SI> realTime)Subtracts given real time from this timestamp on the UTC time scale.static MomentMoment.nowInSystemTime()Obtains the current time using the system clock.static MomentCreates a new UTC-timestamp by given time coordinates on given time scale.static MomentEquivalent toMoment.of(elapsedTime, 0, scale).static MomentMoment.parse(String text, TemporalFormatter<Moment> parser)Parses given text to an instance of this class.Adds an amount of given SI-unit to this timestamp on the UTC time scale.Moment.plus(MachineTime<SI> realTime)Adds given real time to this timestamp on the UTC time scale.ZonalDateTime.toMoment()Converts this object to a global UTC-moment.Methods in net.time4j that return types with arguments of type MomentModifier and TypeMethodDescriptionElementOperator.at(ZonalOffset offset)Creates an operator which can adjust aMomentat the given timezone offset.ZonalElement.at(ZonalOffset offset)Creates a function which can query aMomentat the given timezone offset.ElementOperator.atUTC()Equivalent toat(ZonalOffset.UTC).ZonalElement.atUTC()Equivalent toat(ZonalOffset.UTC).Moment.axis()Provides a static access to the associated time axis respective chronology which contains the chronological rules.Creates an operator which can adjust aMomentin the given timezone.Creates a function which can query aMomentin the given timezone.ElementOperator.inStdTimezone()Creates an operator which can adjust aMomentin the system timezone.ZonalElement.inStdTimezone()Creates a function which can query aMomentin the system timezone.ElementOperator.inTimezone(TZID tzid)Creates an operator which can adjust aMomentin the given timezone.ZonalElement.inTimezone(TZID tzid)Creates a function which can query aMomentin the given timezone.static ChronoOperator<Moment>Moment.nextLeapSecond()Tries to determine the next coming leap second.Methods in net.time4j with parameters of type MomentModifier and TypeMethodDescriptionlongCalculates the time distance between given time points in SI-units.intlongCalculates the time distance between this timestamp and given end timestamp in given SI-unit on the UTC time scale.Method parameters in net.time4j with type arguments of type MomentModifier and TypeMethodDescriptionstatic <S> Chronology<S>Provides a static access to the associated time axis using the foreign type S.static MomentMoment.parse(String text, TemporalFormatter<Moment> parser)Parses given text to an instance of this class.static ZonalDateTimeZonalDateTime.parse(String text, TemporalFormatter<Moment> parser)Parses given text to aZonalDateTime.Moment.print(TemporalFormatter<Moment> printer)Creates a formatted output of this instance.ZonalDateTime.print(TemporalFormatter<Moment> printer)Creates a formatted output of this instance.PrettyTime.printRelativeOrDateTime(UnixTime moment, Timezone tz, TimeUnit precision, long maxdelta, TemporalFormatter<Moment> formatter)Formats given time point relative to the current time ofPrettyTime.getReferenceClock()as duration in given precision or as absolute date-time.PrettyTime.printRelativeOrDateTime(UnixTime moment, Timezone tz, TimeUnit precision, CalendarUnit maxRelativeUnit, TemporalFormatter<Moment> formatter)Formats given time point relative to the current time ofPrettyTime.getReferenceClock()as duration in given precision or as absolute date-time. -
Uses of Moment in net.time4j.calendar
Methods in net.time4j.calendar that return MomentModifier and TypeMethodDescriptionHebrewTime.on(HebrewCalendar date, Timezone tz)Obtains the moment at this simplified Hebrew time on given date using a fixed 24-hour-scale.Methods in net.time4j.calendar that return types with arguments of type MomentModifier and TypeMethodDescriptionstatic ChronoFunction<Moment,Optional<HebrewTime>>Obtains the Hebrew time dependent on given moment and location related to solar time.static ChronoFunction<Moment,HebrewTime>Obtains the simplified Hebrew time dependent on given moment and a 24-hour-fixed scale.HebrewTime.on(HebrewCalendar date, SolarTime geoLocation)Obtains the moment at this Hebrew time on given date at the given geographical position.Methods in net.time4j.calendar with parameters of type Moment -
Uses of Moment in net.time4j.calendar.astro
Methods in net.time4j.calendar.astro that return MomentModifier and TypeMethodDescriptionObtains the first moon phase which is after given moment.MoonPhase.atLunation(int n)Obtains the time of n-th lunation based on this type of phase.Zodiac.Event.atMomentOfEntry(Moment start)Calculates the moment when the celestial body enters the associated zodiac.Zodiac.Event.atMomentOfExit(Moment start)Calculates the moment when the celestial body leaves the associated zodiac.Obtains the first moon phase which is at or after given moment.Obtains the last moon phase which is still before given moment.SolarTime.Sunshine.endUTC()Obtains the moment of sunset if it exists.static MomentMoonPosition.inNextApogeeAfter(Moment moment)Obtains the time of next apogee after given moment.static MomentMoonPosition.inNextPerigeeAfter(Moment moment)Obtains the time of next perigee after given moment.AstronomicalSeason.inYear(int year)Determines the moment of this astronomical event in given year.SolarTime.Sunshine.startUTC()Obtains the moment of sunrise if it exists.JulianDay.toMoment()Converts this Julian day to aMoment.Methods in net.time4j.calendar.astro that return types with arguments of type MomentModifier and TypeMethodDescriptionstatic 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.LunarTime.Moonlight.moonrise()Obtains the moment of moonrise if it exists.LunarTime.Moonlight.moonset()Obtains the moment of moonset 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.SolarTime.Calculator.sunrise(CalendarDate date, double latitude, double longitude, double zenith)Calculates the moment of sunrise.SolarTime.sunrise()Calculates the moment of sunrise at the location of this instance.Calculates the time of given twilight at sunrise and the location of this instance.SolarTime.Calculator.sunset(CalendarDate date, double latitude, double longitude, double zenith)Calculates the moment of sunset.SolarTime.sunset()Calculates the moment of sunset at the location of this instance.Calculates the time of given twilight at sunset and the location of this instance.SolarTime.timeOfShadowAfterNoon(double objectHeight, double shadowLength)Calculates the moment after noon when the given shadow occurs on given date at the location of this instance.SolarTime.timeOfShadowBeforeNoon(double objectHeight, double shadowLength)Calculates the moment before noon when the given shadow occurs on given date at the location of this instance.SolarTime.transitAtMidnight()Calculates the moment of midnight at the location of this instance (lowest position of sun).SolarTime.transitAtNoon()Calculates the moment of noon at the location of this instance (solar transit).Methods in net.time4j.calendar.astro with parameters of type MomentModifier and TypeMethodDescriptionObtains the first moon phase which is after given moment.static MoonPositionMoonPosition.at(Moment moment, GeoLocation location)Calculates the position of moon at given moment and geographical location.static SunPositionSunPosition.at(Moment moment, GeoLocation location)Calculates the position of sun at given moment and geographical location.Zodiac.Event.atMomentOfEntry(Moment start)Calculates the moment when the celestial body enters the associated zodiac.Zodiac.Event.atMomentOfExit(Moment start)Calculates the moment when the celestial body leaves the associated zodiac.Obtains the first moon phase which is at or after given moment.Obtains the last moon phase which is still before given moment.static ZodiacZodiac.constellationPassedByMoon(Moment moment)Determines the zodiac constellation passed by the moon at given moment.static ZodiacZodiac.constellationPassedBySun(Moment moment)Determines the zodiac constellation passed by the sun at given moment.static doubleSolarTime.equationOfTime(Moment moment)Determines the difference between apparent and mean solar time at given moment.static doubleSolarTime.equationOfTime(Moment moment, String calculator)Determines the difference between apparent and mean solar time at given moment.static doubleMoonPhase.getIllumination(Moment moment)Determines the degree of illumination of the moon at given moment.static doubleMoonPhase.getIllumination(Moment moment, int precision)Determines the degree of illumination of the moon at given moment.static MomentMoonPosition.inNextApogeeAfter(Moment moment)Obtains the time of next apogee after given moment.static MomentMoonPosition.inNextPerigeeAfter(Moment moment)Obtains the time of next perigee after given moment.booleanIs the moon above the horizon at given moment?booleanIs there any sunshine at given moment?static AstronomicalSeasonDetermines the astronomical season related to given moment.static JulianDayJulianDay.ofEphemerisTime(Moment moment)Creates a Julian day on the time scaleTimeScale.TT, sometimes also called Julian Ephemeris Day.static JulianDayJulianDay.ofMeanSolarTime(Moment moment)Creates a Julian day on the time scaleTimeScale.UT, hence related to the mean solar time.static JulianDayJulianDay.ofSimplifiedTime(Moment moment)Creates a Julian day on the time scaleTimeScale.POSIX.static ZodiacZodiac.signPassedByMoon(Moment moment)Determines the zodiac sign passed by the moon at given moment.static ZodiacZodiac.signPassedBySun(Moment moment)Determines the zodiac sign passed by the sun at given moment.booleanTests if this event happens at given moment. -
Uses of Moment in net.time4j.clock
Methods in net.time4j.clock that return MomentModifier and TypeMethodDescriptionAdjustableClock.currentTime()FixedClock.currentTime()NetTimeConnector.currentTime()Yields the current time after a connection has been established at least once.NetTimeConnector.getLastConnectionTime()Yields the time of last connection.Constructor parameters in net.time4j.clock with type arguments of type MomentModifierConstructorDescriptionDaytimeClock(String server, ChronoParser<Moment> parser)Creates a new instance which uses the given time server on the port 13. -
Uses of Moment in net.time4j.format.expert
Fields in net.time4j.format.expert with type parameters of type MomentModifier and TypeFieldDescriptionstatic ChronoFormatter<Moment>Iso8601Format.BASIC_DATE_TIME_OFFSETDefines the basic ISO-8601-format for a composition of calendar date, wall time and timezone offset using the pattern "uuuuMMdd'T'HH[mm[ss[,SSSSSSSSS]]]{offset}".static ChronoFormatter<Moment>Iso8601Format.EXTENDED_DATE_TIME_OFFSETDefines the extended ISO-8601-format for a composition of calendar date, wall time and timezone offset using the pattern "uuuu-MM-dd'T'HH[:mm[:ss[,SSSSSSSSS]]]{offset}".static ChronoFormatter<Moment>ChronoFormatter.RFC_1123Special formatter for printing or parsing moments according to the RFC-1123-specification.Methods in net.time4j.format.expert that return types with arguments of type MomentModifier and TypeMethodDescriptionstatic ChronoFormatter<Moment>ChronoFormatter.ofGenericMomentPattern(String pattern, Locale locale)Constructs a CLDR-pattern-based formatter for universal timestamps with calendar override derived from given locale.static ChronoPrinter<Moment>Iso8601Format.ofMoment(IsoDateStyle dateStyle, IsoDecimalStyle decimalStyle, ClockUnit precision, ZonalOffset offset)Obtains a printer with given styles for printing a moment.static ChronoParser<Moment>ChronoFormatter.ofMomentPattern(String pattern, PatternType type, Locale locale)Constructs a pattern-based parser for global timestamp objects.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(FormatStyle dateStyle, FormatStyle timeStyle, Locale locale, TZID tzid)Constructs a style-based formatter for moments.static ChronoFormatter<Moment>ChronoFormatter.ofMomentStyle(DisplayMode dateStyle, DisplayMode timeStyle, Locale locale, TZID tzid)Deprecated.static <C extends CalendarVariant<C>>
ChronoFormatter.Builder<Moment>ChronoFormatter.setUpWithOverride(Locale locale, CalendarFamily<C> overrideCalendar)Constructs a builder for creating global formatters with usage of given calendar type.static <C extends Calendrical<?, C>>
ChronoFormatter.Builder<Moment>ChronoFormatter.setUpWithOverride(Locale locale, Chronology<C> overrideCalendar)Constructs a builder for creating global formatters with usage of given calendar type. -
Uses of Moment in net.time4j.format.platform
Fields in net.time4j.format.platform with type parameters of type MomentModifier and TypeFieldDescriptionstatic SimpleFormatter<Moment>SimpleFormatter.RFC_1123Defines the RFC-1123-format which is for example used in mail headers (technical internet-timestamp).Methods in net.time4j.format.platform that return types with arguments of type MomentModifier and TypeMethodDescriptionstatic 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(FormatStyle dateStyle, FormatStyle timeStyle, Locale locale, TZID tzid)Constructs a style-based formatter for global timestamp objects (moments).static SimpleFormatter<Moment>SimpleFormatter.ofMomentStyle(DisplayMode dateStyle, DisplayMode timeStyle, Locale locale, TZID tzid) -
Uses of Moment in net.time4j.range
Methods in net.time4j.range with type parameters of type MomentModifier and TypeMethodDescriptionstatic <I extends ChronoInterval<Moment>>
IntervalTree<Moment,I>IntervalTree.onMomentAxis(Collection<I> intervals)Creates an interval tree on the moment axis (UTC) filled with given moment intervals.Methods in net.time4j.range that return MomentModifier and TypeMethodDescriptionMomentInterval.getEndAsMoment()Yields the end time point.MomentInterval.getStartAsMoment()Yields the start time point.MomentInterval.random()Obtains a random moment within this interval.Methods in net.time4j.range that return types with arguments of type MomentModifier and TypeMethodDescriptionstatic Comparator<ChronoInterval<Moment>>MomentInterval.comparator()Defines a comparator which sorts intervals first by start boundary and then by length.static IntervalCollection<Moment>IntervalCollection.onMomentAxis()Yields an empty instance on the UTC-axis.static <I extends ChronoInterval<Moment>>
IntervalTree<Moment,I>IntervalTree.onMomentAxis(Collection<I> intervals)Creates an interval tree on the moment axis (UTC) filled with given moment intervals.MomentInterval.stream(MachineTime<?> duration)Obtains a stream iterating over every moment which is the result of addition of given duration to start until the end of this interval is reached.MomentInterval.stream(MachineTime<?> duration, Moment start, Moment end)Obtains a stream iterating over every moment which is the result of addition of given duration to start until the end is reached.Methods in net.time4j.range with parameters of type MomentModifier and TypeMethodDescriptionstatic MomentIntervalCreates a finite half-open interval between given time points.static IsoRecurrence<MomentInterval>IsoRecurrence.of(int count, Duration<?> duration, Moment end, ZonalOffset offset)Creates a recurrent backward sequence of moment intervals having given duration.static IsoRecurrence<MomentInterval>IsoRecurrence.of(int count, Moment start, Duration<?> duration, ZonalOffset offset)Creates a recurrent sequence of moment intervals having given duration.static IsoRecurrence<MomentInterval>IsoRecurrence.of(int count, Moment start, Moment end, ZonalOffset offset)Creates a recurrent sequence of moment intervals having the duration of first timestamp interval in years, months, days, hours, minutes, seconds and nanoseconds.static MomentIntervalCreates an infinite half-open interval since given start.MomentInterval.stream(MachineTime<?> duration, Moment start, Moment end)Obtains a stream iterating over every moment which is the result of addition of given duration to start until the end is reached.static MomentIntervalMomentInterval.surrounding(Moment moment, MachineTime<?> duration, double alignment)Creates an interval surrounding given moment.static MomentIntervalCreates an infinite open interval until given end.Method parameters in net.time4j.range with type arguments of type MomentModifier and TypeMethodDescriptionstatic MomentIntervalMomentInterval.from(ChronoInterval<Moment> interval)Converts an arbitrary moment interval to an interval of this type.static MomentIntervalMomentInterval.parse(CharSequence text, ChronoParser<Moment> startFormat, char separator, ChronoParser<Moment> endFormat, BracketPolicy policy, ParseLog status)Interpretes given text as interval.static MomentIntervalMomentInterval.parse(CharSequence text, ChronoParser<Moment> parser, BracketPolicy policy)Interpretes given text as interval.static MomentIntervalMomentInterval.parse(String text, ChronoParser<Moment> parser)Interpretes given text as interval using a localized interval pattern.static MomentIntervalMomentInterval.parse(String text, ChronoParser<Moment> parser, String intervalPattern)Interpretes given text as interval using given interval pattern. -
Uses of Moment in net.time4j.sql
Fields in net.time4j.sql with type parameters of type MomentModifier and TypeFieldDescriptionstatic JDBCAdapter<Timestamp,Moment>JDBCAdapter.SQL_TIMESTAMP_WITH_ZONEBridge between a JDBC-Timestamp and the classMoment.
ChronoFormatter.ofMomentStyle(FormatStyle, FormatStyle, Locale, TZID)