Commits

Bill Garrison committed defda0c Merge

Merge pull request #3 from tenthbitinc/master

Performance improvement for default now return

  • Participants
  • Parent commits 3fc3056, 41b2046

Comments (0)

Files changed (1)

SORelativeDateTransformer/SORelativeDateTransformer.m

 		return SORelativeDateLocalizedString(@"now", @"label for current date-time");
 	}
 	
-	// Default return value is "now".
-	
-	id transformedValue = SORelativeDateLocalizedString(@"now", @"label for current date-time");
+	id transformedValue = nil;
 	
 	// Obtain the date components for the relative difference between the input date and now.
 	
 		
 	} // for loop
 	
+	// Default return value is "now".
+	if (!transformedValue) {
+		transformedValue = SORelativeDateLocalizedString(@"now", @"label for current date-time");
+	}
 	
 	return transformedValue;
 }