Instance Property

dateFormat

The date format string used by the receiver.

Declaration

@property(copy) NSString *dateFormat;

Discussion

See Data Formatting Guide for a list of the conversion specifiers permitted in date format strings.

You should only set this property when working with fixed format representations, as discussed in Working With Fixed Format Date Representations. For user-visible representations, you should use the dateStyle and timeStyle properties, or the setLocalizedDateFormatFromTemplate: method if your desired format cannot be achieved using the predefined styles; both of these properties and this method provide a localized date representation appropriate for display to the user.

See Also

Managing Formats and Styles

dateStyle

The date style of the receiver.

timeStyle

The time style of the receiver.

- setLocalizedDateFormatFromTemplate:

Sets the date format from a template using the specified locale for the receiver.

+ dateFormatFromTemplate:options:locale:

Returns a localized date format string representing the given date format components arranged appropriately for the specified locale.

formattingContext

The capitalization formatting context used when formatting a date.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software