DateFormats extension

Extension on DateFormat to provide easy access to common date formats. Dart expands static variables and needs to be called with the extended name

example:

DateFormats.ymd
on
  • DateFormat

Static Properties

dayMonth → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for "dd-MM" format, suitable for day and month representation.
no setter
dmy → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for "dd-MM-yyyy" format.
no setter
fullDateTime → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for full date and time format "yyyy-MM-dd HH:mm:ss", commonly used in many countries.
no setter
fullDateTimeDmy → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for full date and time format "dd-MM-yyyy HH:mm:ss", commonly used in some European countries.
no setter
fullDateTimeDmY → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for full date and time format "dd/MM/yyyy HH:mm:ss", commonly used in some Asian countries.
no setter
fullDateTimeMdy → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for full date and time format "MM/dd/yyyy HH:mm:ss", commonly used in the United States.
no setter
hm → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for time format "HH:mm:ss". The same as DateFormat.Hm()
no setter
hms → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for time format "HH:mm:ss". The same as DateFormat.Hms()
no setter
iso8601 → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for ISO 8601 standard format "yyyy-MM-ddTHH:mm:ss".
no setter
longDate → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for long date format, which is locale dependent.
no setter
mdy → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for "MM/dd/yyyy" format, commonly used in the US.
no setter
monthYear → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for a format including only the month and year "MMMM yyyy".
no setter
shortDate → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for short date format, which is locale dependent.
no setter
time → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for time format "HH:mm:ss".
no setter
yearMonth → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for "yyyy-MM" format, suitable for month and year representation.
no setter
ymd → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for "yyyy-MM-dd" format. The same as DateFormat.yMd()
no setter
zonedDateTime → DateFormat

Available on DateFormat, provided by the DateFormats extension

Provides a DateFormat instance for a complete date-time format with timezone information "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'".
no setter