Time class

A time during the day, in the format hh:mm:ss (a subset of ISO8601 icon). There is no date specified. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored at receiver discretion. The time "24:00" SHALL NOT be used. A timezone offset SHALL NOT be present. Times can be converted to a Duration since midnight.

Constructors

Time({required int hour, required int minute, int second = 0})
Creates a Time instance

Properties

hashCode → int
The hash code for this object.
no setteroverride
hour → int
The hour of the time
final
minute → int
The minute of the time
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
second → int
The second of the time
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

tryParse(String timeString) → Time?
Returns the Time by parsing a time string in the format hh:mm:ss or null if the string does not match