How can I know what date format user prefers? Is there a way to read it from phone’s local settings? Does the user prefer to read date in format “dd/mm/yyyy” or “mm/dd/yyyy”?
Thank you in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use NSDateFormatter, but set the style (not the format) so it uses the user’s locale formats.
e.g. create an NSDateFormatter and configure it thusly
(for mm/dd/yy type dates, which are dd/mm/yy in other countries)