Instance Property

locale

The locale to use when formatting date and time values.

Declaration

@property(copy) NSLocale *locale;

Discussion

The default value of this property is the current user’s locale, which is accessible from the currentLocale method of NSLocale. You can change this value to a different locale to generate strings based on that locale.

See Also

Configuring the Formatter Options

dateStyle

The style to use when formatting day, month, and year information.

timeStyle

The style to use when formatting hour, minute, and second information.

dateTemplate

The template for formatting one date and time value.

calendar

The calendar to use for date values.

timeZone

The time zone with which to specify time values.

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