From 0e724858bd1dbcd8af841aa1b25605dfc6fa99e0 Mon Sep 17 00:00:00 2001 From: Rahul Dev Garg <34365102+rahuldevgarg@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:25:33 +0530 Subject: [PATCH] fixed date month localization --- frontend/mgramseva/lib/utils/date_formats.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/mgramseva/lib/utils/date_formats.dart b/frontend/mgramseva/lib/utils/date_formats.dart index 7007c13b1..ef1844984 100644 --- a/frontend/mgramseva/lib/utils/date_formats.dart +++ b/frontend/mgramseva/lib/utils/date_formats.dart @@ -119,7 +119,7 @@ class DateFormats { static String getMonthAndYearFromDateTime(DateTime date) { try { - return '${DateFormat.MMM().format(date)}-${DateFormat.y().format(date)}'; + return '${ApplicationLocalizations.of(navigatorKey.currentContext!).translate(Constants.MONTHS[date.month-1])}-${DateFormat.y().format(date)}'; } catch (e) { return ''; }