Skip to content

Instance Property

calendar

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.9+ tvOS 9.0+ watchOS 2.0+
The calendar used to interpret the other values in this structure.
var calendar: Calendar? { get set }

Discussion

Note

API which uses DateComponents may have different behavior if this value is nil. For example, assuming the current calendar or ignoring certain values.