Uses of Class
javax.time.calendar.LocalDateTime
Packages that use LocalDateTime
Package
Description
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
Provides classes to implement time-zones and their rules.
-
Uses of LocalDateTime in javax.time.calendar
Fields in javax.time.calendar declared as LocalDateTimeModifier and TypeFieldDescriptionprivate final LocalDateTime
OffsetDateTime.dateTime
The local date-time.Fields in javax.time.calendar with type parameters of type LocalDateTimeModifier and TypeFieldDescriptionprivate static final CalendricalRule<LocalDateTime>
LocalDateTime.Rule.INSTANCE
Methods in javax.time.calendar that return LocalDateTimeModifier and TypeMethodDescriptionLocalDate.atMidnight()
Returns a local date-time formed from this date at the time of midnight.LocalDate.atTime
(int hourOfDay, int minuteOfHour) Returns a local date-time formed from this date at the specified time.LocalDate.atTime
(int hourOfDay, int minuteOfHour, int secondOfMinute) Returns a local date-time formed from this date at the specified time.LocalDate.atTime
(int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond) Returns a local date-time formed from this date at the specified time.Returns a local date-time formed from this date at the specified time.(package private) static LocalDateTime
LocalDateTime.create
(long localSeconds, int nanoOfSecond) Obtains an instance ofLocalDateTime
using seconds from the local epoch of 1970-01-01T00:00:00.Clock.dateTime()
Gets the current date-time with maximum resolution of up to nanoseconds.Clock.dateTimeToMinute()
Gets the current date-time with a resolution of minutes.Clock.dateTimeToSecond()
Gets the current date-time with a resolution of seconds.protected LocalDateTime
LocalDateTime.Rule.derive
(Calendrical calendrical) LocalDateTime.minus
(PeriodProvider periodProvider) Returns a copy of thisLocalDateTime
with the specified period subtracted.Returns a copy of thisLocalDateTime
with the specified duration subtracted.LocalDateTime.minusDays
(long days) Returns a copy of thisLocalDateTime
with the specified period in days subtracted.LocalDateTime.minusHours
(long hours) Returns a copy of thisLocalDateTime
with the specified period in hours subtracted.LocalDateTime.minusMinutes
(long minutes) Returns a copy of thisLocalDateTime
with the specified period in minutes subtracted.LocalDateTime.minusMonths
(long months) Returns a copy of thisLocalDateTime
with the specified period in months subtracted.LocalDateTime.minusMonths
(long months, DateResolver dateResolver) Returns a copy of thisLocalDateTime
with the specified period in months subtracted.LocalDateTime.minusNanos
(long nanos) Returns a copy of thisLocalDateTime
with the specified period in nanoseconds subtracted.LocalDateTime.minusSeconds
(long seconds) Returns a copy of thisLocalDateTime
with the specified period in seconds subtracted.LocalDateTime.minusWeeks
(long weeks) Returns a copy of thisLocalDateTime
with the specified period in weeks subtracted.LocalDateTime.minusYears
(long years) Returns a copy of thisLocalDateTime
with the specified period in years subtracted.LocalDateTime.minusYears
(long years, DateResolver dateResolver) Returns a copy of thisLocalDateTime
with the specified period in years subtracted.static LocalDateTime
LocalDateTime.now()
Obtains the current date-time from the system clock in the default time-zone.static LocalDateTime
Obtains the current date-time from the specified clock.static LocalDateTime
LocalDateTime.of
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour) Obtains an instance ofLocalDateTime
from year, month, day, hour and minute, setting the second and nanosecond to zero.static LocalDateTime
LocalDateTime.of
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute) Obtains an instance ofLocalDateTime
from year, month, day, hour, minute and second, setting the nanosecond to zero.static LocalDateTime
LocalDateTime.of
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond) Obtains an instance ofLocalDateTime
from year, month, day, hour, minute, second and nanosecond.static LocalDateTime
LocalDateTime.of
(int year, MonthOfYear monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour) Obtains an instance ofLocalDateTime
from year, month, day, hour and minute, setting the second and nanosecond to zero.static LocalDateTime
LocalDateTime.of
(int year, MonthOfYear monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute) Obtains an instance ofLocalDateTime
from year, month, day, hour, minute and second, setting the nanosecond to zero.static LocalDateTime
LocalDateTime.of
(int year, MonthOfYear monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond) Obtains an instance ofLocalDateTime
from year, month, day, hour, minute, second and nanosecond.static LocalDateTime
LocalDateTime.of
(DateProvider dateProvider, TimeProvider timeProvider) Obtains an instance ofLocalDateTime
from a date and time.static LocalDateTime
LocalDateTime.of
(DateTimeProvider dateTimeProvider) Obtains an instance ofLocalTime
from a date-time provider.static LocalDateTime
LocalDateTime.ofMidnight
(int year, int monthOfYear, int dayOfMonth) Obtains an instance ofLocalDateTime
from year, month and day with the time set to midnight at the start of day.static LocalDateTime
LocalDateTime.ofMidnight
(int year, MonthOfYear monthOfYear, int dayOfMonth) Obtains an instance ofLocalDateTime
from year, month and day with the time set to midnight at the start of day.static LocalDateTime
LocalDateTime.ofMidnight
(DateProvider dateProvider) Obtains an instance ofLocalDateTime
from a date with the time set to midnight at the start of day.static LocalDateTime
Obtains an instance ofLocalDateTime
from a text string such as2007-12-03T10:15:30
.static LocalDateTime
LocalDateTime.parse
(String text, DateTimeFormatter formatter) Obtains an instance ofLocalDateTime
from a text string using a specific formatter.LocalDateTime.plus
(PeriodProvider periodProvider) Returns a copy of thisLocalDateTime
with the specified period added.Returns a copy of thisLocalDateTime
with the specified duration added.LocalDateTime.plusDays
(long days) Returns a copy of thisLocalDateTime
with the specified period in days added.LocalDateTime.plusHours
(long hours) Returns a copy of thisLocalDateTime
with the specified period in hours added.LocalDateTime.plusMinutes
(long minutes) Returns a copy of thisLocalDateTime
with the specified period in minutes added.LocalDateTime.plusMonths
(long months) Returns a copy of thisLocalDateTime
with the specified period in months added.LocalDateTime.plusMonths
(long months, DateResolver dateResolver) Returns a copy of thisLocalDateTime
with the specified period in months added.LocalDateTime.plusNanos
(long nanos) Returns a copy of thisLocalDateTime
with the specified period in nanoseconds added.LocalDateTime.plusSeconds
(long seconds) Returns a copy of thisLocalDateTime
with the specified period in seconds added.LocalDateTime.plusWeeks
(long weeks) Returns a copy of thisLocalDateTime
with the specified period in weeks added.LocalDateTime.plusYears
(long years) Returns a copy of thisLocalDateTime
with the specified period in years added.LocalDateTime.plusYears
(long years, DateResolver dateResolver) Returns a copy of thisLocalDateTime
with the specified period in years added.DateTimeProvider.toLocalDateTime()
Returns an instance ofLocalDateTime
initialized from the state of this object.LocalDateTime.toLocalDateTime()
Converts this date-time to aLocalDateTime
, trivially returningthis
.LocalTime.Overflow.toLocalDateTime
(LocalDate date) Creates aLocalDateTime
from the specified date and this instance.OffsetDateTime.toLocalDateTime()
Converts this date-time to aLocalDateTime
.ZonedDateTime.toLocalDateTime()
Converts thisZonedDateTime
to aLocalDateTime
.LocalDateTime.with
(DateAdjuster adjuster) Returns a copy of thisLocalDateTime
with the date altered using the adjuster.private LocalDateTime
Returns a copy of this date-time with the new date and time, checking to see if a new object is in fact required.LocalDateTime.with
(MonthOfYear monthOfYear) Returns a copy of thisLocalDateTime
with the month-of-year altered.LocalDateTime.with
(MonthOfYear monthOfYear, DateResolver dateResolver) Returns a copy of thisLocalDateTime
with the month-of-year altered.LocalDateTime.with
(TimeAdjuster adjuster) Returns a copy of thisLocalDateTime
with the time altered using the adjuster.LocalDateTime.withDate
(int year, int monthOfYear, int dayOfMonth) Returns a copy of thisLocalDateTime
with the date values altered.LocalDateTime.withDate
(int year, MonthOfYear monthOfYear, int dayOfMonth) Returns a copy of thisLocalDateTime
with the date values altered.LocalDateTime.withDayOfMonth
(int dayOfMonth) Returns a copy of thisLocalDateTime
with the day-of-month altered.LocalDateTime.withDayOfMonth
(int dayOfMonth, DateResolver dateResolver) Returns a copy of thisLocalDateTime
with the day-of-month altered.LocalDateTime.withDayOfYear
(int dayOfYear) Returns a copy of thisLocalDateTime
with the day-of-year altered.LocalDateTime.withHourOfDay
(int hourOfDay) Returns a copy of thisLocalDateTime
with the hour-of-day value altered.LocalDateTime.withMinuteOfHour
(int minuteOfHour) Returns a copy of thisLocalDateTime
with the minute-of-hour value altered.LocalDateTime.withMonthOfYear
(int monthOfYear) Returns a copy of thisLocalDateTime
with the month-of-year altered.LocalDateTime.withMonthOfYear
(int monthOfYear, DateResolver dateResolver) Returns a copy of thisLocalDateTime
with the month-of-year altered.LocalDateTime.withNanoOfSecond
(int nanoOfSecond) Returns a copy of thisLocalDateTime
with the nano-of-second value altered.LocalDateTime.withSecondOfMinute
(int secondOfMinute) Returns a copy of thisLocalDateTime
with the second-of-minute value altered.LocalDateTime.withTime
(int hourOfDay, int minuteOfHour) Returns a copy of thisLocalDateTime
with the time values altered.LocalDateTime.withTime
(int hourOfDay, int minuteOfHour, int secondOfMinute) Returns a copy of thisLocalDateTime
with the time values altered.LocalDateTime.withTime
(int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond) Returns a copy of thisLocalDateTime
with the time values altered.LocalDateTime.withYear
(int year) Returns a copy of thisLocalDateTime
with the year altered.LocalDateTime.withYear
(int year, DateResolver dateResolver) Returns a copy of thisLocalDateTime
with the year altered.Methods in javax.time.calendar that return types with arguments of type LocalDateTimeModifier and TypeMethodDescriptionstatic CalendricalRule<LocalDateTime>
LocalDateTime.rule()
Gets the rule forLocalDateTime
.Methods in javax.time.calendar with parameters of type LocalDateTimeModifier and TypeMethodDescriptionint
LocalDateTime.compareTo
(LocalDateTime other) Compares thisLocalDateTime
to another date-time.protected abstract OffsetDateTime
ZoneResolver.handleGap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition gapInfo, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line gap.protected OffsetDateTime
ZoneResolvers.Combination.handleGap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line gap.protected OffsetDateTime
ZoneResolvers.PostGapPreOverlap.handleGap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line gap.protected OffsetDateTime
ZoneResolvers.PostTransition.handleGap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line gap.protected OffsetDateTime
ZoneResolvers.PreTransition.handleGap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line gap.protected OffsetDateTime
ZoneResolvers.PushForward.handleGap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line gap.protected OffsetDateTime
ZoneResolvers.RetainOffset.handleGap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line gap.protected OffsetDateTime
ZoneResolvers.Strict.handleGap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line gap.protected abstract OffsetDateTime
ZoneResolver.handleOverlap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition overlapInfo, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line overlap.protected OffsetDateTime
ZoneResolvers.Combination.handleOverlap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line overlap.protected OffsetDateTime
ZoneResolvers.PostGapPreOverlap.handleOverlap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line overlap.protected OffsetDateTime
ZoneResolvers.PostTransition.handleOverlap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line overlap.protected OffsetDateTime
ZoneResolvers.PreTransition.handleOverlap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line overlap.protected OffsetDateTime
ZoneResolvers.PushForward.handleOverlap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line overlap.protected OffsetDateTime
ZoneResolvers.RetainOffset.handleOverlap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line overlap.protected OffsetDateTime
ZoneResolvers.Strict.handleOverlap
(TimeZone zone, ZoneRules rules, ZoneOffsetTransition discontinuity, LocalDateTime newDateTime, OffsetDateTime oldDateTime) Defines the strategy for selecting an offset to use for a local date-time when the local date-time is in a local time-line overlap.boolean
LocalDateTime.isAfter
(LocalDateTime other) Checks if thisLocalDateTime
is after the specified date-time.boolean
LocalDateTime.isBefore
(LocalDateTime other) Checks if thisLocalDateTime
is before the specified date-time.private static ZonedDateTime
ZonedDateTime.resolve
(LocalDateTime dateTime, ZonedDateTime oldDateTime, TimeZone zone, ZoneResolver resolver) Obtains an instance ofZonedDateTime
.final OffsetDateTime
ZoneResolver.resolve
(TimeZone zone, LocalDateTime newDateTime, ZonedDateTime oldDateTime) Resolves the new local date-time to an offset date-time using the zone.private OffsetDateTime
OffsetDateTime.with
(LocalDateTime dateTime, ZoneOffset offset) Returns a new date-time based on this one, returningthis
where possible.Constructors in javax.time.calendar with parameters of type LocalDateTimeModifierConstructorDescriptionprivate
OffsetDateTime
(LocalDateTime dateTime, ZoneOffset offset) Constructor. -
Uses of LocalDateTime in javax.time.calendar.zone
Fields in javax.time.calendar.zone declared as LocalDateTimeModifier and TypeFieldDescriptionprivate final LocalDateTime
ZoneOffsetInfo.dateTime
The date-time that this info applies to.private static final LocalDateTime
ZoneRulesBuilder.MAX_DATE_TIME
The maximum date-time.private final LocalDateTime[]
StandardZoneRules.savingsLocalTransitions
The transitions between local date-times, sorted.private final LocalDateTime
ZoneRulesBuilder.TZWindow.windowEnd
The end local time, not null.Methods in javax.time.calendar.zone that return LocalDateTimeModifier and TypeMethodDescriptionZoneOffsetTransition.getLocal()
Gets the local date-time at the transition which is expressed relative to the 'before' offset.ZoneOffsetInfo.getLocalDateTime()
Gets the local date-time that this info is applicable to.private LocalDateTime
TZDBZoneRulesCompiler.TZDBZone.toDateTime
(int year) Methods in javax.time.calendar.zone with parameters of type LocalDateTimeModifier and TypeMethodDescriptionZoneRulesBuilder.addRuleToWindow
(LocalDateTime dateTime, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAmount) Adds a single transition rule to the current window.ZoneRulesBuilder.addWindow
(ZoneOffset standardOffset, LocalDateTime until, ZoneRulesBuilder.TimeDefinition untilDefinition) Adds a window to the builder that can be used to filter a set of rules.ZoneRulesBuilder.TimeDefinition.createDateTime
(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset) Creates the offset date-time from the specified local date-time.private ZoneOffsetInfo
StandardZoneRules.findOffsetInfo
(LocalDateTime dt, ZoneOffsetTransition trans) Finds the offset info for a local date-time and transition.FixedZoneRules.getOffsetInfo
(LocalDateTime dateTime) Gets the offset information for a local date-time in this zone.StandardZoneRules.getOffsetInfo
(LocalDateTime dt) Gets the offset information for a local date-time in this zone.abstract ZoneOffsetInfo
ZoneRules.getOffsetInfo
(LocalDateTime dateTime) Gets the offset information for a local date-time in this zone.static ZoneOffsetInfo
ZoneOffsetInfo.of
(LocalDateTime dateTime, ZoneOffset offset, ZoneOffsetTransition transition) Creates an instance representing a simple single offset or a transition.Constructors in javax.time.calendar.zone with parameters of type LocalDateTimeModifierConstructorDescription(package private)
TZWindow
(ZoneOffset standardOffset, LocalDateTime windowEnd, ZoneRulesBuilder.TimeDefinition timeDefinition) Constructor.(package private)
ZoneOffsetInfo
(LocalDateTime dateTime, ZoneOffset offset, ZoneOffsetTransition transition) Creates an instance handling a simple single offset.