@ -34,8 +34,8 @@ extension DateTimeExtension on DateTime {
/// Returns a simple time String.
/// TODO: Add localization
String localizedTimeOfDay(BuildContext context) {
return L10n.of(context).timeOfDay(
_z(hour % 12), _z(hour), _z(minute), hour > 11 ? 'pm' : 'am');
return L10n.of(context).timeOfDay(_z(hour == 12 ? hour : hour % 12),
_z(hour), _z(minute), hour > 11 ? 'pm' : 'am');
}
/// Returns [localizedTimeOfDay()] if the ChatTime is today, the name of the week