Instance Property

dates

An array containing labeled Gregorian dates.

Declaration

iOS, Mac Catalyst, watchOS
@property(readonly, copy, nonatomic) NSArray<CNLabeledValue<NSDateComponents *> *> *dates;
macOS
@property(readonly, copy, atomic) NSArray<CNLabeledValue<NSDateComponents *> *> *dates;

Discussion

This property is an array of CNLabeledValue objects, each of which has an NSString label and NSDateComponents value. You can use this property to store Gregorian dates such as anniversaries. Day and month components are required and year is optional. The calendar component can be nil or NSCalendarIdentifierGregorian. All other date components are invalid and including them results in an NSError object that includes the key paths of the invalid components and the error code CNErrorCodeValidationConfigurationError.

See Also

Getting Birthday Information

birthday

A date component for the Gregorian birthday of the contact.

nonGregorianBirthday

A date component for the non-Gregorian birthday of the contact.