Commits

Anonymous committed 8abebd8

Changed from stringFromDate: to stringForObjectValue:. We should be able to run on pre-Tiger now.

  • Participants
  • Parent commits 30fb998

Comments (0)

Files changed (1)

File NSCalendarDate+ISO8601Unparsing.m

 
 - (NSString *)ISO8601DateStringWithTime:(BOOL)includeTime {
 	NSDateFormatter *formatter = [[NSDateFormatter alloc] initWithDateFormat:(includeTime ? @"%Y-%m-%dT%H:%M:%S%z" : @"%Y-%m-%d") allowNaturalLanguage:NO];
-	NSString *str = [formatter stringFromDate:self];
+	NSString *str = [formatter stringForObjectValue:self];
 	[formatter release];
 	return str;
 }
 	NSString *timeString;
 	if(includeTime) {
 		NSDateFormatter *formatter = [[NSDateFormatter alloc] initWithDateFormat:@"T%H:%M:%S%z" allowNaturalLanguage:NO];
-		timeString = [formatter stringFromDate:self];
+		timeString = [formatter stringForObjectValue:self];
 		[formatter release];
 	} else
 		timeString = @"";
 	NSString *timeString;
 	if(includeTime) {
 		NSDateFormatter *formatter = [[NSDateFormatter alloc] initWithDateFormat:@"T%H:%M:%S%z" allowNaturalLanguage:NO];
-		timeString = [formatter stringFromDate:self];
+		timeString = [formatter stringForObjectValue:self];
 		[formatter release];
 	} else
 		timeString = @"";