flexidate library
Classes
- DatePart
- DateParts
- DefaultFlexiDateParser
- FlexiDate
- FlexiDateData
- A flexible container for date components that provides a robust parsing/building mechanism. If the input type is known to be a String, Map or DateTime, then use the corresponding constructors.
- FlexiDateParser
- InvalidFlexiDate
- Represents a date that's couldn't be parsed.
- TimeSpan
- Represents a user-defined duration. Unlike Duration, this class does not normalize down to microseconds value, but preserves the original precision.
Enums
Extensions
Constants
- kday → const String
- kmonth → const String
- kyear → const String
- 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 -
hasTime(
DateTime time) → bool -
isFuture(
DateTime? time) → bool -
isPast(
DateTime? time) → bool -
parseTimeSpans(
String query) → List< TimeSpan> -
timeSpanUnitOf(
dynamic input) → TimeSpanUnit? -
tryParseTimeSpanUnit(
dynamic input) → List< TimeSpanUnit> -
withoutTime(
DateTime time) → DateTime
Typedefs
- TimeSpanValue = num Function(TimeSpan span)