adium 4879:b552a65ccb58: It is recommended to use a NSDateFormat...
commits at adium.im
commits at adium.im
Mon Jun 25 01:04:09 UTC 2012
details: http://hg.adium.im/adium/rev/b552a65ccb58
revision: 4879:b552a65ccb58
branch: adium-1.5.2
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Mon Jun 25 03:04:00 2012 +0200
It is recommended to use a NSDateFormatter instead of -descriptionWithCalendarFormat:.
diffs (19 lines):
diff -r bf3a2a2ee96e -r b552a65ccb58 Other/Adium Spotlight Importer/GetMetadataForFile.m
--- 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];
More information about the commits
mailing list