LocalTime class final

A wall-clock time at microsecond resolution, including the endpoint 24:00. The fourth constructor argument is the full fractional second (0..999999).

Implemented types

Constructors

LocalTime(int hour, [int minute = 0, int second = 0, int microsecond = 0])
Creates a valid wall-clock time or throws RangeError.
factory
LocalTime.fromMicroseconds(int value)
Creates a time from microseconds since midnight, including 24:00.
factory
LocalTime.parse(String text)
Parses HH:mm[:ss[.ffffff]] without a timezone.
factory

Properties

hashCode → int
The hash code for this object.
no setteroverride
hour → int
Hour from 0 through 24; 24 is allowed only at the end-of-day endpoint.
no setter
microsecond → int
Full fractional second, from 0 through 999999.
no setter
microseconds → int
Microseconds since midnight, including the endpoint 86400000000.
final
minute → int
Minute within the hour, from 0 through 59.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
second → int
Second within the minute, from 0 through 59.
no setter

Methods

compareTo(LocalTime 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) → LocalTime
Round fractional seconds, with exact halves toward the next second.

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

tryParse(String text) → LocalTime?
Returns null when text is not a supported wall-clock time.