When using the date / time picker on iPhone / iPad, the year (yyyy) is removed from date formatting to make room for time.
How to do this based on the default unicode formats stored in the region format?
Formats do not necessarily correspond to one of the following: NSDateFormatterLongStyle NSDateFormatterShortStyle NSDateFormatterMediumStyle NSDateFormatterFullStyle
Take, for example, the format of the Bulgarian region. Formats (respectively): dd MMMM y DD.MM.YY dd.MM.YYYY dd MM y, EEE
And the United States: MMMM d, y M / d / yy MMM d, y EEEE, MMMM d, y
Bulgarian choice of time is displayed: e.g. 06 10 cp
If the United States displays: e.g. Wed October 06
There is no Bulgarian format where the last name of the day is, and there is no format in which the name of the day will be the first in US formats. It makes me think about languages โโthat have the character of the following years and months.
- How did the date picker choose the right year formatting information? And how does he know where to stick the name of the day?
- Are there other date formats in the operating system (based on the region selected by the user) so that the date picker selects the time?
Most importantly, how to get these date formats from the locale?
I don't want to just insert any ad-hoc format string - I need to extract the existing ones.
Thank!
This is the next question after finding out how to get the actual Unicode formats:
C / iPhone goal: how to extract the current format unicode format strings for the current region?