mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 01:45:11 +00:00
chore: Follow up use 24 hour format
This commit is contained in:
parent
fc867b33a1
commit
e88afdd357
3 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@locale": "de",
|
||||||
"@@last_modified": "2021-08-14 12:41:10.119255",
|
"@@last_modified": "2021-08-14 12:41:10.119255",
|
||||||
|
"alwaysUse24HourFormat": "true",
|
||||||
|
"@alwaysUse24HourFormat": {
|
||||||
|
"description": "Set to true to always display time of day in 24 hour format."
|
||||||
|
},
|
||||||
"about": "Über",
|
"about": "Über",
|
||||||
"@about": {
|
"@about": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
"@@last_modified": "2021-08-14 12:38:37.885451",
|
"@@last_modified": "2021-08-14 12:38:37.885451",
|
||||||
|
"alwaysUse24HourFormat": "false",
|
||||||
|
"@alwaysUse24HourFormat": {
|
||||||
|
"description": "Set to true to always display time of day in 24 hour format."
|
||||||
|
},
|
||||||
"repeatPassword": "Repeat password",
|
"repeatPassword": "Repeat password",
|
||||||
"@repeatPassword": {},
|
"@repeatPassword": {},
|
||||||
"notAnImage": "Not an image file.",
|
"notAnImage": "Not an image file.",
|
||||||
|
|
|
@ -35,7 +35,7 @@ extension DateTimeExtension on DateTime {
|
||||||
|
|
||||||
/// Returns a simple time String.
|
/// Returns a simple time String.
|
||||||
String localizedTimeOfDay(BuildContext context) =>
|
String localizedTimeOfDay(BuildContext context) =>
|
||||||
MediaQuery.of(context).alwaysUse24HourFormat
|
L10n.of(context)!.alwaysUse24HourFormat == 'true'
|
||||||
? DateFormat('HH:mm', L10n.of(context)!.localeName).format(this)
|
? DateFormat('HH:mm', L10n.of(context)!.localeName).format(this)
|
||||||
: DateFormat('h:mm a', L10n.of(context)!.localeName).format(this);
|
: DateFormat('h:mm a', L10n.of(context)!.localeName).format(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue