You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now one project that uses SHDateFormatter has a format that defines a special order of date components in SHDateformatter+Extensions.swift, like:
For these cases Apple has defined a method that uses template date format strings and changes (reorders) them for the specified language. To make that work we have to either add a custom date format to SHDateFormatter which takes a string OR put that special date format in the enum and handle the custom format in SHDateFormatter, like:
Actual behaviour
Right now one project that uses
SHDateFormatter
has a format that defines a special order of date components in SHDateformatter+Extensions.swift, like:This doesn't work in other languages like Arabic.
Expected behaviour
For these cases Apple has defined a method that uses template date format strings and changes (reorders) them for the specified language. To make that work we have to either add a
custom
date format to SHDateFormatter which takes a string OR put that special date format in the enum and handle the custom format in SHDateFormatter, like:SHDateFormatter/Source/SHDateFormatter/Classes/SHDateFormatter.swift
Lines 58 to 62 in 33b6741
I guess the latter is the better option!
Don't forget to update the tests…
The text was updated successfully, but these errors were encountered: