I have LocalDate
which contains date 2012-12-28 and I want to print it with localized month name (i.e. December in Polish) in genitive which in
Do you really need to use Joda? Replacing the month names is trivial using the date formatters in the standard Java API:
SimpleDateFormat sdf = new SimpleDateFormat("'z dnia' dd MMMM yyyy 'r.'");
DateFormatSymbols dfs = sdf.getDateFormatSymbols();
dfs.setMonths(
new String[] {
"stycznia", "lutego", "marca", "kwietnia", "maja", "czerwca",
"lipca", "sierpnia", "września", "października", "listopada",
"grudnia"
});
sdf.setDateFormatSymbols(dfs);
System.out.println(
sdf.format(new GregorianCalendar(2012, Calendar.DECEMBER, 28).getTime()));