Merge branch 'hour12' into 'master'
(Actually)Fix wrong message time Closes #30 See merge request ChristianPauly/fluffychat-flutter!114
This commit is contained in:
commit
fe74f9638a
|
@ -34,7 +34,7 @@ extension DateTimeExtension on DateTime {
|
|||
/// Returns a simple time String.
|
||||
/// TODO: Add localization
|
||||
String localizedTimeOfDay(BuildContext context) {
|
||||
return L10n.of(context).timeOfDay(_z(hour == 12 ? hour : hour % 12),
|
||||
return L10n.of(context).timeOfDay(_z(hour % 12 == 0 ? 12 : hour % 12),
|
||||
_z(hour), _z(minute), hour > 11 ? 'pm' : 'am');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue