Contents

description(with:)

Returns a string representation of the receiver using the given locale.

Declaration

func description(with locale: Locale?) -> String

Parameters

  • locale:

    A Locale. If you pass nil, Date formats the date in the same way as the description property.

Return Value

A string representation of the Date, using the given locale, or if the locale argument is nil, in the international format YYYY-MM-DD HH:MM:SS ±HHMM, where ±HHMM represents the time zone offset in hours and minutes from UTC (for example, “2001-03-24 10:45:32 +0600”).

See Also

Describing Dates