Uses of Class
org.threeten.bp.LocalDateTime
Packages that use LocalDateTime
Package
Description
The main API for dates, times, instants, and durations.
Support for calendar systems other than the default ISO.
Support for time-zones and their rules.
-
Uses of LocalDateTime in org.threeten.bp
Fields in org.threeten.bp declared as LocalDateTimeModifier and TypeFieldDescriptionprivate final LocalDateTimeOffsetDateTime.dateTimeThe local date-time.private final LocalDateTimeZonedDateTime.dateTimeThe local date-time.static final LocalDateTimeLocalDateTime.MAXThe maximum supportedLocalDateTime, '+999999999-12-31T23:59:59.999999999'.static final LocalDateTimeLocalDateTime.MINThe minimum supportedLocalDateTime, '-999999999-01-01T00:00:00'.Fields in org.threeten.bp with type parameters of type LocalDateTimeModifier and TypeFieldDescriptionstatic final TemporalQuery<LocalDateTime>LocalDateTime.FROMSimulate JDK 8 method reference LocalDateTime::from.Methods in org.threeten.bp that return LocalDateTimeModifier and TypeMethodDescriptionCombines this time with a date to create aLocalDateTime.LocalDate.atStartOfDay()Combines this date with the time of midnight to create aLocalDateTimeat the start of this date.LocalDate.atTime(int hour, int minute) Combines this date with a time to create aLocalDateTime.LocalDate.atTime(int hour, int minute, int second) Combines this date with a time to create aLocalDateTime.LocalDate.atTime(int hour, int minute, int second, int nanoOfSecond) Combines this date with a time to create aLocalDateTime.Combines this date with a time to create aLocalDateTime.static LocalDateTimeLocalDateTime.from(TemporalAccessor temporal) Obtains an instance ofLocalDateTimefrom a temporal object.LocalDateTime.minus(long amountToSubtract, TemporalUnit unit) Returns a copy of this date-time with the specified period subtracted.LocalDateTime.minus(TemporalAmount amount) Returns a copy of this date-time with the specified period subtracted.LocalDateTime.minusDays(long days) Returns a copy of thisLocalDateTimewith the specified period in days subtracted.LocalDateTime.minusHours(long hours) Returns a copy of thisLocalDateTimewith the specified period in hours subtracted.LocalDateTime.minusMinutes(long minutes) Returns a copy of thisLocalDateTimewith the specified period in minutes subtracted.LocalDateTime.minusMonths(long months) Returns a copy of thisLocalDateTimewith the specified period in months subtracted.LocalDateTime.minusNanos(long nanos) Returns a copy of thisLocalDateTimewith the specified period in nanoseconds subtracted.LocalDateTime.minusSeconds(long seconds) Returns a copy of thisLocalDateTimewith the specified period in seconds subtracted.LocalDateTime.minusWeeks(long weeks) Returns a copy of thisLocalDateTimewith the specified period in weeks subtracted.LocalDateTime.minusYears(long years) Returns a copy of thisLocalDateTimewith the specified period in years subtracted.static LocalDateTimeLocalDateTime.now()Obtains the current date-time from the system clock in the default time-zone.static LocalDateTimeObtains the current date-time from the specified clock.static LocalDateTimeObtains the current date-time from the system clock in the specified time-zone.static LocalDateTimeLocalDateTime.of(int year, int month, int dayOfMonth, int hour, int minute) Obtains an instance ofLocalDateTimefrom year, month, day, hour and minute, setting the second and nanosecond to zero.static LocalDateTimeLocalDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second) Obtains an instance ofLocalDateTimefrom year, month, day, hour, minute and second, setting the nanosecond to zero.static LocalDateTimeLocalDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond) Obtains an instance ofLocalDateTimefrom year, month, day, hour, minute, second and nanosecond.static LocalDateTimeObtains an instance ofLocalDateTimefrom year, month, day, hour and minute, setting the second and nanosecond to zero.static LocalDateTimeObtains an instance ofLocalDateTimefrom year, month, day, hour, minute and second, setting the nanosecond to zero.static LocalDateTimeLocalDateTime.of(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond) Obtains an instance ofLocalDateTimefrom year, month, day, hour, minute, second and nanosecond.static LocalDateTimeObtains an instance ofLocalDateTimefrom a date and time.static LocalDateTimeLocalDateTime.ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset) Obtains an instance ofLocalDateTimeusing seconds from the epoch of 1970-01-01T00:00:00Z.static LocalDateTimeObtains an instance ofLocalDateTimefrom anInstantand zone ID.static LocalDateTimeLocalDateTime.parse(CharSequence text) Obtains an instance ofLocalDateTimefrom a text string such as2007-12-23T10:15:30.static LocalDateTimeLocalDateTime.parse(CharSequence text, DateTimeFormatter formatter) Obtains an instance ofLocalDateTimefrom a text string using a specific formatter.LocalDateTime.plus(long amountToAdd, TemporalUnit unit) Returns a copy of this date-time with the specified period added.LocalDateTime.plus(TemporalAmount amount) Returns a copy of this date-time with the specified period added.LocalDateTime.plusDays(long days) Returns a copy of thisLocalDateTimewith the specified period in days added.LocalDateTime.plusHours(long hours) Returns a copy of thisLocalDateTimewith the specified period in hours added.LocalDateTime.plusMinutes(long minutes) Returns a copy of thisLocalDateTimewith the specified period in minutes added.LocalDateTime.plusMonths(long months) Returns a copy of thisLocalDateTimewith the specified period in months added.LocalDateTime.plusNanos(long nanos) Returns a copy of thisLocalDateTimewith the specified period in nanoseconds added.LocalDateTime.plusSeconds(long seconds) Returns a copy of thisLocalDateTimewith the specified period in seconds added.LocalDateTime.plusWeeks(long weeks) Returns a copy of thisLocalDateTimewith the specified period in weeks added.private LocalDateTimeLocalDateTime.plusWithOverflow(LocalDate newDate, long hours, long minutes, long seconds, long nanos, int sign) Returns a copy of thisLocalDateTimewith the specified period added.LocalDateTime.plusYears(long years) Returns a copy of thisLocalDateTimewith the specified period in years added.(package private) static LocalDateTimeLocalDateTime.readExternal(DataInput in) static LocalDateTimeDateTimeUtils.toLocalDateTime(Timestamp sqlTimestamp) Converts ajava.sql.Timestampto aLocalDateTime.OffsetDateTime.toLocalDateTime()Gets theLocalDateTimepart of this offset date-time.ZonedDateTime.toLocalDateTime()Gets theLocalDateTimepart of this date-time.LocalDateTime.truncatedTo(TemporalUnit unit) Returns a copy of thisLocalDateTimewith the time truncated.private LocalDateTimeReturns 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(TemporalAdjuster adjuster) Returns an adjusted copy of this date-time.LocalDateTime.with(TemporalField field, long newValue) Returns a copy of this date-time with the specified field set to a new value.LocalDateTime.withDayOfMonth(int dayOfMonth) Returns a copy of thisLocalDateTimewith the day-of-month altered.LocalDateTime.withDayOfYear(int dayOfYear) Returns a copy of thisLocalDateTimewith the day-of-year altered.LocalDateTime.withHour(int hour) Returns a copy of thisLocalDateTimewith the hour-of-day value altered.LocalDateTime.withMinute(int minute) Returns a copy of thisLocalDateTimewith the minute-of-hour value altered.LocalDateTime.withMonth(int month) Returns a copy of thisLocalDateTimewith the month-of-year altered.LocalDateTime.withNano(int nanoOfSecond) Returns a copy of thisLocalDateTimewith the nano-of-second value altered.LocalDateTime.withSecond(int second) Returns a copy of thisLocalDateTimewith the second-of-minute value altered.LocalDateTime.withYear(int year) Returns a copy of thisLocalDateTimewith the year altered.Methods in org.threeten.bp with parameters of type LocalDateTimeModifier and TypeMethodDescriptionprivate intLocalDateTime.compareTo0(LocalDateTime other) static OffsetDateTimeOffsetDateTime.of(LocalDateTime dateTime, ZoneOffset offset) Obtains an instance ofOffsetDateTimefrom a date-time and offset.static ZonedDateTimeZonedDateTime.of(LocalDateTime localDateTime, ZoneId zone) Obtains an instance ofZonedDateTimefrom a local date-time.static ZonedDateTimeZonedDateTime.ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) Obtains an instance ofZonedDateTimefrom the instant formed by combining the local date-time and offset.private static ZonedDateTimeZonedDateTime.ofLenient(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) Obtains an instance ofZonedDateTimeleniently, for advanced use cases, allowing any combination of local date-time, offset and zone ID.static ZonedDateTimeZonedDateTime.ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferredOffset) Obtains an instance ofZonedDateTimefrom a local date-time using the preferred offset if possible.static ZonedDateTimeZonedDateTime.ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) Obtains an instance ofZonedDateTimestrictly validating the combination of local date-time, offset and zone ID.private ZonedDateTimeZonedDateTime.resolveInstant(LocalDateTime newDateTime) Resolves the new local date-time using the offset to identify the instant.private ZonedDateTimeZonedDateTime.resolveLocal(LocalDateTime newDateTime) Resolves the new local date-time using this zone ID, retaining the offset if possible.static TimestampDateTimeUtils.toSqlTimestamp(LocalDateTime dateTime) Converts aLocalDateTimeto ajava.sql.Timestamp.private OffsetDateTimeOffsetDateTime.with(LocalDateTime dateTime, ZoneOffset offset) Returns a new date-time based on this one, returningthiswhere possible.Constructors in org.threeten.bp with parameters of type LocalDateTimeModifierConstructorDescriptionprivateOffsetDateTime(LocalDateTime dateTime, ZoneOffset offset) Constructor.privateZonedDateTime(LocalDateTime dateTime, ZoneOffset offset, ZoneId zone) Constructor. -
Uses of LocalDateTime in org.threeten.bp.chrono
Methods in org.threeten.bp.chrono that return LocalDateTimeModifier and TypeMethodDescriptionIsoChronology.localDateTime(TemporalAccessor temporal) Obtains an ISO local date-time from another date-time object. -
Uses of LocalDateTime in org.threeten.bp.zone
Fields in org.threeten.bp.zone declared as LocalDateTimeModifier and TypeFieldDescriptionprivate final LocalDateTime[]StandardZoneRules.savingsLocalTransitionsThe transitions between local date-times, sorted.private final LocalDateTimeZoneOffsetTransition.transitionThe local transition date-time at the transition.private final LocalDateTimeZoneRulesBuilder.TZWindow.windowEndThe end local time, not null.Methods in org.threeten.bp.zone that return LocalDateTimeModifier and TypeMethodDescriptionZoneOffsetTransitionRule.TimeDefinition.createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset) Converts the specified local date-time to the local date-time actually seen on a wall clock.ZoneOffsetTransition.getDateTimeAfter()Gets the local transition date-time, as would be expressed with the 'after' offset.ZoneOffsetTransition.getDateTimeBefore()Gets the local transition date-time, as would be expressed with the 'before' offset.private LocalDateTimeTzdbZoneRulesCompiler.TZDBZone.toDateTime(int year) Methods in org.threeten.bp.zone with parameters of type LocalDateTimeModifier and TypeMethodDescriptionZoneRulesBuilder.addRuleToWindow(LocalDateTime transitionDateTime, ZoneOffsetTransitionRule.TimeDefinition timeDefinition, int savingAmountSecs) Adds a single transition rule to the current window.ZoneRulesBuilder.addWindow(ZoneOffset standardOffset, LocalDateTime until, ZoneOffsetTransitionRule.TimeDefinition untilDefinition) Adds a window to the builder that can be used to filter a set of rules.ZoneOffsetTransitionRule.TimeDefinition.createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset) Converts the specified local date-time to the local date-time actually seen on a wall clock.private ObjectStandardZoneRules.findOffsetInfo(LocalDateTime dt, ZoneOffsetTransition trans) Finds the offset info for a local date-time and transition.StandardZoneRules.getOffset(LocalDateTime localDateTime) ZoneRules.Fixed.getOffset(LocalDateTime localDateTime) abstract ZoneOffsetZoneRules.getOffset(LocalDateTime localDateTime) Gets a suitable offset for the specified local date-time in these rules.private ObjectStandardZoneRules.getOffsetInfo(LocalDateTime dt) StandardZoneRules.getTransition(LocalDateTime localDateTime) ZoneRules.Fixed.getTransition(LocalDateTime localDateTime) abstract ZoneOffsetTransitionZoneRules.getTransition(LocalDateTime localDateTime) Gets the offset transition applicable at the specified local date-time in these rules.StandardZoneRules.getValidOffsets(LocalDateTime localDateTime) ZoneRules.Fixed.getValidOffsets(LocalDateTime localDateTime) abstract List<ZoneOffset>ZoneRules.getValidOffsets(LocalDateTime localDateTime) Gets the offset applicable at the specified local date-time in these rules.booleanStandardZoneRules.isValidOffset(LocalDateTime localDateTime, ZoneOffset offset) booleanZoneRules.Fixed.isValidOffset(LocalDateTime dateTime, ZoneOffset offset) abstract booleanZoneRules.isValidOffset(LocalDateTime localDateTime, ZoneOffset offset) Checks if the offset date-time is valid for these rules.static ZoneOffsetTransitionZoneOffsetTransition.of(LocalDateTime transition, ZoneOffset offsetBefore, ZoneOffset offsetAfter) Obtains an instance defining a transition between two offsets.Constructors in org.threeten.bp.zone with parameters of type LocalDateTimeModifierConstructorDescription(package private)TZWindow(ZoneOffset standardOffset, LocalDateTime windowEnd, ZoneOffsetTransitionRule.TimeDefinition timeDefinition) Constructor.(package private)ZoneOffsetTransition(LocalDateTime transition, ZoneOffset offsetBefore, ZoneOffset offsetAfter) Creates an instance defining a transition between two offsets.