Contents

setLocalizedDateFormatFromTemplate(_:)

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

Declaration

func setLocalizedDateFormatFromTemplate(_ dateFormatTemplate: String)

Parameters

  • dateFormatTemplate:

    A string containing date format patterns (such as “MM” or “h”).

    For full details, see 10000039i.

Discussion

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

Calling this method is equivalent to, but not necessarily implemented as, setting the dateFormat property to the result of calling the dateFormat(fromTemplate:options:locale:) method, passing no options and the locale property value.

See Also

Related Documentation

Managing Formats and Styles