I have the following string that represents a date like this "20190123" and I want to to convert it into this format "25 Dic 2019" the month name should be in Spanish and the first letter should be in uppercase so far I have this
String input = "12252013";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern( "MMddyyyy" );
LocalDate localDate = LocalDate.parse( input , formatter );
Locale spanishLocale=new Locale("es", "ES");
String dateInSpanish=localDate.format(DateTimeFormatter.ofPattern("dd MMM, yyyy",spanishLocale));
System.out.println("'2016-01-01' in Spanish: "+dateInSpanish);
this prints "25 dic, 2013"
I want it to be like this "25 Dic 2019"