mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
Merge branch 'hour12' into 'master'
Fix wrong message time(12:XX pm showing as 00:XX pm) See merge request ChristianPauly/fluffychat-flutter!111
This commit is contained in:
commit
45fe44daad
@ -34,8 +34,8 @@ 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(
|
return L10n.of(context).timeOfDay(_z(hour == 12 ? hour : hour % 12),
|
||||||
_z(hour % 12), _z(hour), _z(minute), hour > 11 ? 'pm' : 'am');
|
_z(hour), _z(minute), hour > 11 ? 'pm' : 'am');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns [localizedTimeOfDay()] if the ChatTime is today, the name of the week
|
/// Returns [localizedTimeOfDay()] if the ChatTime is today, the name of the week
|
||||||
|
Loading…
Reference in New Issue
Block a user