A formatted string that conveys a date without any time information.
- watchOS 2.0+
Use a date provider for strings that contain day, month, and year information. The text provider formats the date information consistently and in a way that makes the best use of the available space. It also takes into account the user’s region and locale settings.
When creating the formatted string, the date text provider creates the longest string that fits in the given space. it includes as many of the requested date elements as it can, but may truncate elements or use abbreviations as needed.
Date Format Options
When creating a
CLKDate object, you must specify which calendar units you want included in the resulting date. Only the following calendar units are supported:
All other calendar units are ignored.
When formatting the date, the date text provider drops units starting at the end of the preceding list and working up. In other words, it drops the year first, followed by the weekday information, followed by the month. For example, a text provider configured to display all units for the date December 28, 2014 in the English-US locale would remove elements as follows until it encountered a string that fit the available space:
Saturday, December 28, 2015
Saturday, December 28
Saturday, Dec 28
Sat, Dec 28