---
title: "CFCalendarCreateWithIdentifier(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfcalendarcreatewithidentifier(_:_:)"
---

# CFCalendarCreateWithIdentifier(_:_:)

Returns a calendar object for the calendar identified by a calendar identifier.

## Declaration

```swift
func CFCalendarCreateWithIdentifier(_ allocator: CFAllocator!, _ identifier: CFCalendarIdentifier!) -> CFCalendar!
```

## Parameters

- `allocator`: The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `identifier`: A calendar identifier. Calendar identifier constants are given in doc://com.apple.corefoundation/documentation/CoreFoundation/CFLocale.

## Return Value

Return Value A calendar object for the calendar identified by ident. 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), returns NULL. Ownership follows the The Create Rule.

## See Also

### Creating a Calendar

- [CFCalendarCopyCurrent()](corefoundation/cfcalendarcopycurrent().md)
