Note that there are some explanatory texts on larger screens.

plurals
  1. POObjective C / iPhone - How does the Date Time Picker format its dates (e.g. strips YYYY) AND how do I retrieve these formats?
    primarykey
    data
    text
    <p>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.</p> <p>How does it accomplish this based on the default unicode formats stored by the region format?</p> <p>The formats do not necessarily match any of the following: NSDateFormatterLongStyle NSDateFormatterShortStyle NSDateFormatterMediumStyle NSDateFormatterFullStyle</p> <p>Take the Bulgarian region format for instance. The formats are (respectively): dd MMMM y dd.MM.yy dd.MM.yyyy dd MM y, EEE</p> <p>And United States: MMMM d, y M/d/yy MMM d, y EEEE, MMMM d, y</p> <p>A Bulgarian date time picker displays: e.g. 06 10 cp</p> <p>Where the United states display: e.g. Wed Oct 06</p> <p>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.</p> <ul> <li>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?</li> <li>Are there other date formats stored in the operating system (based on the user-selected region) that the date time picker retrieves?</li> </ul> <p><strong>Most importantly, how do I retrieve these dates formats from the locale?</strong></p> <p>I do not want to just throw in some ad-hoc format string - I need to extract the existing ones.</p> <p>Thanks!</p> <p>This is a follow up question after find out how to retrieve the actual unicode formats: <a href="https://stackoverflow.com/questions/3835882/objective-c-iphone-how-do-i-extract-the-actual-unicode-date-format-strings-for">Objective C / iPhone: How do I extract the actual unicode date format strings for the current region?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload