For example:
DateTimeFormatter dtfr = DateTimeFormatter.ofPattern("EEEE, MMMM d", locale);
return dtfr.format(localDate);
The result is (locale is Germany):
Expected :Samstag, 28. Mai
Actual :Samstag, Mai 28
If I use
DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);
return dtf
.withLocale(locale)
.format(localDate1);
The result is:
Expected :Samstag, 28. Mai
Actual :Samstag, 28. Mai 2016
I can't replace the year to "" simply, because the other language may have different word to describe year.
So how could I use DateTimeFormatter(not SimpleDateFormat) to make it to work?