Is there a way to format a day and month (in compact form), but not year, in the locale-correct order in Java/Kotlin? So for English it should be \"Sep 20\" but for Swedish
You can do it in Java using LocalDate:
LocalDate dt = LocalDate.parse("2019-09-20"); System.out.println(dt); DateTimeFormatter ft = DateTimeFormatter.ofPattern("dd MMM", new Locale("sv","SE")); System.out.println(ft.format(dt));