<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCalendar/init(identifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCalendar(cm)calendarWithIdentifier:"
  },
  "title" : "init(identifier:)"
}
-->

# init(identifier:)

Creates a new calendar specified by a given identifier.

```
init?(identifier calendarIdentifierConstant: NSCalendar.Identifier)
```

## Parameters

`calendarIdentifierConstant`

The identifier for the new calendar. For valid identifiers, see `Calendar Identifiers`.

## Return Value

The initialized calendar, or `nil` if the identifier is unknown (if, for example, it is either an unrecognized string or the calendar is not supported by the current version of the operating system).

## Discussion

The returned calendar defaults to the current locale and default time zone.

## See Also

[`calendarIdentifier`](/documentation/Foundation/NSCalendar/calendarIdentifier)

An identifier for the calendar.

[`autoupdatingCurrentCalendar`](/documentation/Foundation/NSCalendar/autoupdatingCurrent)

A calendar that tracks changes to user’s preferred calendar.



---

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)