Skip to content

Commit

Permalink
performance improvement for default now return
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpetrov committed Jun 3, 2013
1 parent cbdc4c4 commit 1b640c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SORelativeDateTransformer/SORelativeDateTransformer.m
Expand Up @@ -76,9 +76,7 @@ - (id) transformedValue:(id)value
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.

Expand Down Expand Up @@ -142,6 +140,10 @@ - (id) transformedValue:(id)value

} // for loop

// Default return value is "now".
if (!transformedValue) {
transformedValue = SORelativeDateLocalizedString(@"now", @"label for current date-time");
}

return transformedValue;
}
Expand Down

0 comments on commit 1b640c5

Please sign in to comment.