DurationExtension extension

extension for Duration.

on

Properties

inYears int
The number of entire years (365 days) spanned by this Duration.
no setter
inYearsAsDouble double
The number of entire years (365 days) spanned by this Duration. Returns a double, with the partial year as decimal.
no setter

Methods

toStringUnit({bool days = true, bool hours = true, bool minutes = true, bool seconds = true, bool milliseconds = true, bool microseconds = true, bool decimal = false}) String
Format this Duration instance to a String with the best time unit for the value.