When using the Date/Time picker on the iPhone/iPad, the year (yyyy) is stripped from the Date formatting in order to make room for the time.
How does it accomplish this based on the default unicode formats stored by the region format?
The formats do not necessarily match any of the following: NSDateFormatterLongStyle NSDateFormatterShortStyle NSDateFormatterMediumStyle NSDateFormatterFullStyle
Take the Bulgarian region format for instance. The formats are (respectively): dd MMMM y dd.MM.yy dd.MM.yyyy dd MM y, EEE
And United States: MMMM d, y M/d/yy MMM d, y EEEE, MMMM d, y
A Bulgarian date time picker displays: e.g. 06 10 cp
Where the United states display: e.g. Wed Oct 06
There is no Bulgarian format where the day name comes last, neither is there a format where the day name comes first in the US formats. This makes me wonder about languages where there are character following years and months.
- How the heck does the date picker parse out the year properly given the formatting information available? And how does it know where to stick the day name?
- Are there other date formats stored in the operating system (based on the user-selected region) that the date time picker retrieves?
Most importantly, how do I retrieve these dates formats from the locale?
I do not want to just throw in some ad-hoc format string - I need to extract the existing ones.
Thanks!
This is a follow up question after find out how to retrieve the actual unicode formats: http://stackoverflow.com/questions/3835882/objective-c-iphone-how-do-i-extract-the-actual-unicode-date-format-strings-for