I want to set the format for the current date automatically depending on where you are. For example: Germany: day.month.year //Today: 22.12.2015
And if you are in america: month.day.year (Im not sure if its this format but I know its different from others) //Today: 12.22.2015
So the output shall find the right format itself!
What Ive got so far:
private Calendar currentCalender = Calendar.getInstance(Locale.getDefault());
currentCalender.set(Calendar.HOUR_OF_DAY, 0);
currentCalender.set(Calendar.MINUTE, 0);
currentCalender.set(Calendar.SECOND, 0);
currentCalender.set(Calendar.MILLISECOND, 0);
System.out.println(currentCalendar.getTime());
In other forums they said I shall use SimpleFormat with yyyy-MM-dd but thats not what I want because its static and shows the same format for every country.