How can create text representation of some date, that takes locale into account and contains only day and month (no year)?
Following code gives me s
I did it this way:
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault());
if (dateFormat instanceof SimpleDateFormat) {
SimpleDateFormat simpleDateFormat = (SimpleDateFormat) dateFormat;
String pattern = simpleDateFormat.toPattern();
// I modified the pattern here so that dd.MM.yyyy would result to dd.MM
simpleDateFormat.applyPattern(modifiedPattern);
... etc
}