TomlTimeZoneOffset class
A time-zone offset that is used for the representation of TOML date-time values.
time-offset = "Z" / time-numoffset
time-numoffset = ( "+" / "-" ) time-hour ":" time-minute
- Annotations
-
- @immutable
Constructors
- TomlTimeZoneOffset.fromDuration(Duration offset)
-
Creates a time-zone offset from the given duration.
factory
- TomlTimeZoneOffset.local()
-
Creates a time-zone offset for the local time-zone at the current instant.
factory
- TomlTimeZoneOffset.localAtInstant(DateTime instant)
-
Creates a time-zone offset for the local time-zone at the given
instant
.factory - TomlTimeZoneOffset.negative(int hours, int minutes)
-
Creates a negative time-zone offset.
factory
- TomlTimeZoneOffset.positive(int hours, int minutes)
-
Creates a positive time-zone offset.
factory
- TomlTimeZoneOffset.utc()
-
Creates the time-zone offset of the UTC time-zone.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- hours → int
-
The difference of the time-zone offset to UTC in full hours as a number
from
0
to23
.final - isNegative → bool
-
Whether the time-zone is behind (
false
) or ahead of UTC (true
).final - isUtc → bool
-
Whether this offset identifies the UTC time-zone.
final
- minutes → int
-
The remaining minutes to the difference of the time-zone offset to UTC
in minutes as a number from
0
to59
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDuration(
) → Duration - Converts this time-zone offset to a Duration.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
-
parser
→ Parser<
TomlTimeZoneOffset> -
Parser for a time-zone offset.
final