I'm trying to figure how you can add a birthday to an ABRecordRef without a year (i.e May 5 instead of May 5 1985). Is this possible?
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"MM/dd/yyyy"];
NSDate *date = [df dateFromString:[result valueForKey:@"birthday"]];
if(date == nil)
{
df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"MM/dd"];
date = [df dateFromString:[result valueForKey:@"birthday"]];
}
ABRecordSetValue(person, kABPersonBirthdayProperty, (__bridge CFDateRef)date, nil);
If there's no year attached to the date string it defaults to 1970 but I want it to put it without a year in the address book if that's at all possible.
Anyone knows?