DateTimeExtension extension

on

Methods

ageInYears({DateTime? at}) int

Available on DateTime, provided by the DateTimeExtension extension

formatDateFromDateTime({bool hasHours = false}) String

Available on DateTime, provided by the DateTimeExtension extension

Formats the DateTime as dd/MM/yyyy or dd/MM/yyyy HH:mm depending on hasHours.
formatDateTimeToIso() String

Available on DateTime, provided by the DateTimeExtension extension

Formats the DateTime as simplified ISO format yyyy-MM-ddTHH:mm:ss.
formatDateTimeToIsoWithTimezone() String

Available on DateTime, provided by the DateTimeExtension extension

Formats the DateTime as ISO with timezone: yyyy-MM-ddTHH:mm:ss+HHMM Works without intl package.
formatShortDateFromDateTime() String

Available on DateTime, provided by the DateTimeExtension extension

Formats the DateTime as a short date dd/MM.