DateTimeFormatter extension

Adds DateTimeFormat's format and relative methods to the DateTime class.

on

Methods

format([String format = DateTimeFormats.iso8601]) String
Formats this according to the notation format.
relative({DateTime? to, Duration? formatAfter, String format = AmericanDateTimeFormats.abbrWithComma, bool round = true, bool abbr = false, Map<UnitOfTime, String>? abbreviations, int levelOfPrecision = 0, UnitOfTime minUnitOfTime = UnitOfTime.second, UnitOfTime maxUnitOfTime = UnitOfTime.year, bool excludeWeeks = false, String? ifNow, String? prependIfBefore, String? appendIfAfter}) String
Formats this to a human-readable relative time format, relative to to.