DateTimeIntlDateDisplayExtensions extension
Locale-correct calendar-date renderings (no clock). locale is an intl
locale string (e.g. 'en_US', 'fr_FR'); null lets intl use its default.
- on
Methods
-
dateDisplay(
{String monthFormat = 'MMM', bool showDayOrdinal = false, bool showCurrentYear = true, String? locale, DateTime? now}) → String -
Available on DateTime, provided by the DateTimeIntlDateDisplayExtensions extension
Display date likeJan 15, 1945(orJan 15th, 1945withshowDayOrdinal). WhenshowCurrentYearis false, the year is omitted for dates in the current year (determined againstnow, injectable for tests). -
formatByLocale(
{String? locale, bool ddMMyyFormat = false}) → String? -
Available on DateTime, provided by the DateTimeIntlDateDisplayExtensions extension
Locale short date: en_US08/16/2023, en_GB/fr_FR16/08/2023. -
fullDateDisplay(
{String? locale}) → String -
Available on DateTime, provided by the DateTimeIntlDateDisplayExtensions extension
Locale-ordered full month name, day, year:January 15, 1945(en_US),15 janvier 1945(fr_FR),1945年1月15日(ja_JP). -
makeDisplayDate(
{bool showYear = true, bool showCurrentYear = false, bool showWeekday = true, String? locale, DateTime? now}) → String? -
Available on DateTime, provided by the DateTimeIntlDateDisplayExtensions extension
Display date with weekday likeThu, Jul 21, 2020(locale-ordered).