|
|
|
@ -35,7 +35,9 @@ extension DateTimeExtension on DateTime {
|
|
|
|
|
|
|
|
|
|
/// Returns a simple time String.
|
|
|
|
|
String localizedTimeOfDay(BuildContext context) =>
|
|
|
|
|
DateFormat.Hm(L10n.of(context)!.localeName).format(this);
|
|
|
|
|
MediaQuery.of(context).alwaysUse24HourFormat
|
|
|
|
|
? DateFormat('HH:mm', L10n.of(context)!.localeName).format(this)
|
|
|
|
|
: DateFormat('h:mm a', L10n.of(context)!.localeName).format(this);
|
|
|
|
|
|
|
|
|
|
/// Returns [localizedTimeOfDay()] if the ChatTime is today, the name of the week
|
|
|
|
|
/// day if the ChatTime is this week and a date string else.
|
|
|
|
|