DateTimeFormatExtensions extension

DateTime common format extensions, returns formatted date strings.

on

Properties

dayMonth → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'dd-MM' format.
no setter
dmy → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'dd-MM-yyyy' format.
no setter
fullDateTime → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into a full date and time string 'yyyy-MM-dd HH:mm:ss'.
no setter
fullDateTimeDmY → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'dd/MM/yyyy HH:mm:ss' format.
no setter
fullDateTimeDmy → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'dd-MM-yyyy HH:mm:ss' format.
no setter
fullDateTimeMdy → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'MM/dd/yyyy HH:mm:ss' format.
no setter
hm → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'HH:mm' format.
no setter
hms → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'HH:mm:ss' format.
no setter
iso8601 → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into ISO 8601 standard format 'yyyy-MM-ddTHH:mm:ss'.
no setter
longDate → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into a long date format, which is locale dependent.
no setter
mdy → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'MM/dd/yyyy', American style date format.
no setter
monthYear → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into a string only containing the month and year.
no setter
shortDate → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into a short date format, which is locale dependent.
no setter
time → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into a time format string 'HH:mm:ss'.
no setter
yearMonth → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into 'yyyy-MM' format.
no setter
ymd → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Quick access to the 'yyyy-MM-dd' date format string.
no setter
zonedDateTime → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime into a complete date-time string with timezone information.
no setter

Methods

format({String pattern = 'yyyy-MM-dd'}) → String

Available on DateTime, provided by the DateTimeFormatExtensions extension

Formats the DateTime object into a string using the provided pattern. If no pattern is provided, 'yyyy-MM-dd' is used by default.