Is there an actual, comprehensive list of supported date format patterns/tokens? I've been looking at the API docs, and they mention a few of them, such as MM
, but where's the rest?
A formatter that converts between dates and their textual representations.
Your dateFormat in ListViewRow is E, dd MMM yyyy , whereas your date is in format E, dd MMM yyyy HH:mm:ss z . You must convert your date using this dateFormat. You can then use the date object to get a string in your desired format.
Get current time in “YYYY-MM–DD HH:MM:SS +TIMEZONE” format in Swift. This is the easiest way to show the current date-time.
Apple imports the Unicode standard so the appendix that summarises date format fields is here.
If you follow the links to the "Data Formatting Guide", you will see this information:
The format string uses the format patterns from the Unicode Technical Standard #35. The version of the standard varies with release of the operating system:
- Formatters in iOS 5.0-5.1 use version tr35-19.
- Formatters in iOS 4.0-4.2 use version tr35-15.
- Formatters in iOS 3.2 use version tr35-12.
- Formatters in OS X v10.8 and iOS 6.0 use version tr35-25.
- Formatters in OS X v10.7 and iOS 4.3 use version tr35-17.
- Formatters in OS X v10.6 and iOS 3.0-3.1 use version tr35-10.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With