LocalDateTime class final
Calendar date and wall-clock time, with no timezone or implied UTC instant.
- Implemented types
Constructors
- LocalDateTime(LocalDate date, LocalTime time)
-
Combines a date and time, normalizing 24:00 to the next midnight.
factory
- LocalDateTime.parse(String text)
-
Parses a date and time separated by a space or
T, without a timezone.factory
Properties
- date → LocalDate
-
Calendar date after normalizing a 24:00 input to the next day.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- time → LocalTime
-
Wall-clock time, always earlier than 24:00 after normalization.
final
Methods
-
add(
Duration duration) → LocalDateTime - Adds elapsed calendar microseconds without applying timezone rules.
-
compareTo(
LocalDateTime other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
withPrecision(
int digits) → LocalDateTime - Match PostgreSQL TIMESTAMP(p): exact halves round away from 2000-01-01.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
tryParse(
String text) → LocalDateTime? - Returns null for invalid or out-of-range local timestamps.
Constants
- maxJulianDay → const int
- Last supported Julian day for a finite PostgreSQL local timestamp.