forked from cwtch.im/cwtch-ui
FIX #546 - Force Canadian Locale for Full Date Format
We want a consistent YYYY-mm-dd HH::MM format here so setting.locale isn't desirable (e.g. en_US outputs mm-dd-YY)
This commit is contained in:
parent
a48422cf5f
commit
6b6c60d9e5
|
@ -39,5 +39,7 @@ String prettyDateString(BuildContext context, DateTime date) {
|
|||
// }
|
||||
return AppLocalizations.of(context)!.now;
|
||||
}
|
||||
return DateFormat.yMd(Platform.localeName).add_jm().format(date.toLocal());
|
||||
// note: explicitly overriding the 'locale' here to force
|
||||
// a consistent YYYY-mm-dd HH::MM format.
|
||||
return DateFormat.yMd('en_CA').add_jm().format(date.toLocal());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue