Quick question, SimpleDateFormat is not performing as I would expect. I am looking to get a date string that look like Thursday 29 November 13:43.
Here is my format:
Calendar c = Calendar.getInstance();
_clockDateFormat = new SimpleDateFormat("cccc dd MMMM kk:mm");
_clockDateFormat.format(c.getTime());
Here is the output:
5 29 11 13:43
What am I doing wrong?
Turns out the device I am working with doesn’t have a default locale when it gets here from the factory. As a workaround I used the
Localespecific overload forSimpleDateFormat:_clockDateFormat = new SimpleDateFormat("EEEE dd MMMM HH:mm", Locale.US);