---
title: "init(identifier:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nscalendar/init(identifier:)"
---

# init(identifier:)

Creates a new calendar specified by a given identifier.

## Declaration

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

## Parameters

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

## Return Value

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

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

## See Also

### Related Documentation

- [calendarIdentifier](foundation/nscalendar/calendaridentifier.md)
- [autoupdatingCurrent](foundation/nscalendar/autoupdatingcurrent.md)

### Creating and Initializing Calendars

- [init(calendarIdentifier:)](foundation/nscalendar/init(calendaridentifier:).md)
- [NSCalendar.Identifier](foundation/nscalendar/identifier.md)
