2 つの日付の違いを比較したいのですが、以下のコードを使用すると、「[NSCFString timeIntervalSinceReferenceDate]: 認識されないセレクターがインスタンスに送信されました」というエラーが発生しました。コードの何が問題になっていますか?
NSDate *dateAdded=[eventDictionary objectForKey:@"dateAdded"];
NSDate *validUntilDate=[eventDictionary objectForKey:@"validUntilDate"];
NSDateComponents *sometimeAgo = [[NSCalendar currentCalendar] components:(NSSecondCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit) fromDate:dateAdded toDate:validUntilDate options:0];