adium/adium

Parents bf3a2a2ee96e
Children a97531ed5130
It is recommended to use a NSDateFormatter instead of -descriptionWithCalendarFormat:.
--- a/Other/Adium Spotlight Importer/GetMetadataForFile.m Mon Jun 25 02:57:36 2012 +0200
+++ b/Other/Adium Spotlight Importer/GetMetadataForFile.m Mon Jun 25 03:04:00 2012 +0200
@@ -242,10 +242,12 @@
//pick the first author for this. likely a bad idea
if (startDate && [otherAuthors count]) {
NSString *toUID = [otherAuthors objectAtIndex:0];
- [attributes setObject:[NSString stringWithFormat:@"%@ on %@",toUID,[startDate descriptionWithCalendarFormat:@"%Y-%m-%d"
- timeZone:nil
- locale:nil]]
+ NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d" allowNaturalLanguage:NO];
+
+ [attributes setObject:[NSString stringWithFormat:@"%@ on %@",toUID,[dateFormatter stringFromDate:startDate]]
forKey:(NSString *)kMDItemDisplayName];
+
+ [dateFormatter release];
}
[otherAuthors release];