Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
branchadium-1.5.9
changeset 5749 1521cab508bf
parent 5722 4ae85ad012cd
child 5754 d605bb303e32
equal deleted inserted replaced
5726:44b2eacffae5 5749:1521cab508bf
   332 	[timeStampFormatter release];
   332 	[timeStampFormatter release];
   333 
   333 
   334 	if ([format rangeOfString:@"%"].location != NSNotFound) {
   334 	if ([format rangeOfString:@"%"].location != NSNotFound) {
   335 		/* Support strftime-style format strings, which old message styles may use */
   335 		/* Support strftime-style format strings, which old message styles may use */
   336 		timeStampFormatter = [[NSDateFormatter alloc] initWithDateFormat:format allowNaturalLanguage:NO];
   336 		timeStampFormatter = [[NSDateFormatter alloc] initWithDateFormat:format allowNaturalLanguage:NO];
   337 		[timeStampFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
       
   338 	} else {
   337 	} else {
   339 		timeStampFormatter = [[NSDateFormatter alloc] init];
   338 		timeStampFormatter = [[NSDateFormatter alloc] init];
   340 		[timeStampFormatter setDateFormat:format];
   339 		[timeStampFormatter setDateFormat:format];
   341 	}
   340 	}
   342 }
   341 }
   851 					NSDateFormatter *dateFormatter = [timeFormatterCache objectForKey:timeFormat];
   850 					NSDateFormatter *dateFormatter = [timeFormatterCache objectForKey:timeFormat];
   852 					if (!dateFormatter) {
   851 					if (!dateFormatter) {
   853 						if ([timeFormat rangeOfString:@"%"].location != NSNotFound) {
   852 						if ([timeFormat rangeOfString:@"%"].location != NSNotFound) {
   854 							/* Support strftime-style format strings, which old message styles may use */
   853 							/* Support strftime-style format strings, which old message styles may use */
   855 							dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:timeFormat allowNaturalLanguage:NO];
   854 							dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:timeFormat allowNaturalLanguage:NO];
   856 							[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
       
   857 						} else {
   855 						} else {
   858 							dateFormatter = [[NSDateFormatter alloc] init];
   856 							dateFormatter = [[NSDateFormatter alloc] init];
   859 							[dateFormatter setDateFormat:timeFormat];
   857 							[dateFormatter setDateFormat:timeFormat];
   860 						}
   858 						}
   861 						[timeFormatterCache setObject:dateFormatter forKey:timeFormat];
   859 						[timeFormatterCache setObject:dateFormatter forKey:timeFormat];
  1271 				
  1269 				
  1272 				NSDateFormatter *dateFormatter;
  1270 				NSDateFormatter *dateFormatter;
  1273 				if ([timeFormat rangeOfString:@"%"].location != NSNotFound) {
  1271 				if ([timeFormat rangeOfString:@"%"].location != NSNotFound) {
  1274 					/* Support strftime-style format strings, which old message styles may use */
  1272 					/* Support strftime-style format strings, which old message styles may use */
  1275 					dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:timeFormat allowNaturalLanguage:NO];
  1273 					dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:timeFormat allowNaturalLanguage:NO];
  1276 					[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
       
  1277 				} else {
  1274 				} else {
  1278 					dateFormatter = [[NSDateFormatter alloc] init];
  1275 					dateFormatter = [[NSDateFormatter alloc] init];
  1279 					[dateFormatter setDateFormat:timeFormat];
  1276 					[dateFormatter setDateFormat:timeFormat];
  1280 				}
  1277 				}
  1281 				
  1278