LocalTime class

Represents a 'wall-clock' time, without any associated date or timezone.

Inheritance

Constructors

LocalTime([int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0])
LocalTime.fromDateTime(DateTime date)
Creates a new LocalTime from the hour, minute, second, millisecond and microsecond properties of the given DateTime.

Properties

hashCode int
The hash code for this object.
no setteroverride
hour int
The hour of the day, expressed as in a 24-hour clock [0..23].
no setter
microsecond int
The microsecond [0...999].
no setter
millisecond int
The millisecond [0...999].
no setter
minute int
The minute [0...59].
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
second int
The second [0...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
Returns the time in the format HH:MM:SS[.ssssss].
override

Operators

operator ==(Object other) bool
Returns true if other is a LocalTime with the same time.
override

Static Methods

parse(String formattedString) LocalTime
Creates a new LocalTime from a formattedString.
tryParse(String formattedString) LocalTime?
Creates a new LocalTime from a formattedString, or null if the string is not a valid time.