<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSDate/description(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDate(im)descriptionWithLocale:"
  },
  "title" : "description(with:)"
}
-->

# description(with:)

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

```
func description(with locale: Any?) -> String
```

## Parameters

`locale`

An `NSLocale` object.

    If you pass     `nil`    ,     `NSDate`     formats the date in the same way as the [`description`](/documentation/Foundation/NSDate/description)     property.

    In OS X v10.4 and earlier, this parameter was an     `NSDictionary`     object. If you pass in an     `NSDictionary`     object in OS X v10.5,     `NSDate`     uses the default user locale—the same as if you passed in     `[NSLocale currentLocale].`

## Return Value

A string representation of the receiver, 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`”)

## Discussion

In OS X v10.4 and earlier, `localeDictionary` is an `NSDictionary` object containing locale data. To use the user’s preferences, you can use `[[NSUserDefaults standardUserDefaults] dictionaryRepresentation].`

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)