Android Question timedate format change??

drgottjr

Expert
Licensed User
Longtime User
these are the date formats in question:
DateTime.DateFormat = "HH:mm z MMMMM dd"
DateTime.DateFormat = "EEEEE"

on the emulator, they work as expected:
Sunny at 15:53 EST June 11
Forecast for Sunday

on the device (galaxy nexus):
Sunny at 15:53 EDT J 11
Forecast for S

same output on moto e II as on nexus.
the little help balloons for datetime.dateformat point to a link which gave me the formatting. is there a different link now?? tks
 

drgottjr

Expert
Licensed User
Longtime User
on device: (in this case moto e, but output is the same with nexus galaxy)
** Activity (main) Create, isFirst = true **
M
** Activity (main) Resume **

on emulator:
LogCat connected to: emulator-5554
** Activity (main) Resume **--------- beginning of /dev/log/main
--------- beginning of /dev/log/system~i:**
Activity (main) Create, isFirst = true **
Wednesday
** Activity (main) Resume **
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
if it could help, if I put DateTime.DateFormat = "EEEEEE", I get "mon."
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
thanks. dateutils uses "EEEE". i could have used "EEEE", but i used "EEEEE". according to the documentation it should have worked. this is the documentation:

Text:For formatting, if the number of pattern letters is 4 or more, the full form is used; otherwise a short or abbreviated form is used if available. For parsing, both forms are accepted, independent of the number of pattern letters.

4 or more "E"'s is supposed to spell out in full (and, presumably, in "your" language) the day of the week. so:
EEE gets you "Mon"
EEEE gets you "Monday"
EEEEE (on my devices, at least) gets you "M"
EEEEEE gets you "Mon" (on lemonisdead's device or emulator)

the last 2 cases don't follow the documentation as i read it. am i reading it wrong? or has there been a change? or are the only 2 options "EEE" and "EEEE"?
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
i suppose if you want to get technical about it, yes, EEEE works. thanks. i'll take up my documentation issue with mr ellison directly.
 
Upvote 0
Top