(Actually)Fix wrong message time
Forgot to account for 0:XX am in previous commit
This commit is contained in:
parent
896e8ce2b3
commit
ebb0453d56
|
@ -34,7 +34,7 @@ extension DateTimeExtension on DateTime {
|
||||||
/// Returns a simple time String.
|
/// Returns a simple time String.
|
||||||
/// TODO: Add localization
|
/// TODO: Add localization
|
||||||
String localizedTimeOfDay(BuildContext context) {
|
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');
|
_z(hour), _z(minute), hour > 11 ? 'pm' : 'am');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue