Pick the fix
You show a date as "\(day)/\(month)/\(year)". What is better?
Hint 1 of 1
Who should decide the order?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A date.formatted(date: .abbreviated, time: .omitted), which follows the user's locale
Correct. Order, separators and month names adapt.
Why not the others?
- B Translate the slash in the String Catalog. The order of day and month still differs by region.
- C Always use ISO 8601 in the UI. ISO dates suit machines, not most readers.
- D Use a DateFormatter with a fixed dateFormat. A fixed format ignores locale conventions.