Commits

Michael Petrov  committed 41b2046

performance improvement for default now return

  • Participants
  • Parent commits 3fc3056

Comments (0)

Files changed (1)

File 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;
 }