DateUtils.formatDateRange does not respect Locale for Formatter

Viewed 136

I am trying to display text for my date using DateUtils.formatDateRange() method with below option:

DateTime time = new DateTime().withYear(year).withMonthOfYear(month).withTimeAtStartOfDay();
Locale locale = new Locale("pl");
Formatter formatter = new Formatter(locale);

String title = DateUtils.formatDateRange(getContext(), formatter, time.getMillis(), time.getMillis(),
                    DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NO_MONTH_DAY | DateUtils.FORMAT_SHOW_YEAR).toString();

I expect to have below results (in Polish):

Czerwiec 2020

but I am getting:

June 2020

Anyone have an idea what can be the problem?

0 Answers
Related