Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
fixed date month localization
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldevgarg committed Feb 1, 2024
1 parent 2260d60 commit 0e72485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/mgramseva/lib/utils/date_formats.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}
Expand Down

0 comments on commit 0e72485

Please sign in to comment.