When I use the \"HH\" flag in android.text.format.DateFormat, it is interpreted as a literal \"HH\". But when I use java.text.SimpleDateFormat it
I have never programmed for Android. I googled the DateFormat javadoc and saw there the following examples:
Examples for April 6, 1970 at 3:23am:
"MM/dd/yy h:mmaa" -> "04/06/70 3:23am"
"MMM dd, yyyy h:mmaa" -> "Apr 6, 1970 3:23am"
"MMMM dd, yyyy h:mmaa" -> "April 6, 1970 3:23am"
"E, MMMM dd, yyyy h:mmaa" -> "Mon, April 6, 1970 3:23am&
"EEEE, MMMM dd, yyyy h:mmaa" -> "Monday, April 6, 1970 3:23am"
"'Noteworthy day: 'M/d/yy" -> "Noteworthy day: 4/6/70"
The "hour" is marked using small letter h in opposite to SimpleDateFormat where capital letter is used for this purpose.