Instance Property


A textual description of the date value.


var description: String { get }


The representation is useful for debugging only.

There are a number of options to acquire a formatted string for a date including: date formatters (see DateFormatter and Converting Between Swift Data Types and Strings), and the Date function description(locale:).


See Also

Describing Dates

func description(with: Locale?) -> String

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

var debugDescription: String

A textual description of the date suitable for debugging.

var customMirror: Mirror

A mirror that reflects the date.

var hashValue: Int

The computed hash value of the date.

var customPlaygroundQuickLook: PlaygroundQuickLook

A custom playground Quick Look for the date.