Instance Property


The date format string used by the receiver.


@property(copy) NSString *dateFormat;


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


The date style of the receiver.


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.


The capitalization formatting context used when formatting a date.