time_span library

Classes

TimeSpan
Represents a user-defined duration. Unlike Duration, this class does not normalize down to microseconds value, but preserves the original precision.

Enums

TimeSpanUnit

Constants

numberPattern → const String
spanPattern → const String

Properties

dateUnits List<TimeSpanUnit>
final
defaultLabels Map<TimeSpanUnit, String>
final
durationPattern String
final
durationRegex RegExp
final
equalsChecker → DeepCollectionEquality
final
knownSpans Map<String, TimeSpan>
final
knownSpanUnits Map<String, TimeSpanUnit>
final
shortLabels Map<TimeSpanUnit, String?>
final
spanRegex RegExp
Not used for the ISO parsing, but this helps us in our parsing to find tokens like "3y"
final
timeUnits List<TimeSpanUnit>
final

Functions

cloneDate(DateTime orig, {int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) DateTime
timeSpanUnitOf(dynamic input) TimeSpanUnit?
tryParseTimeSpanUnit(dynamic input) List<TimeSpanUnit>

Typedefs

TimeSpanValue = num Function(TimeSpan span)