Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Performance improvement for default now return #3

Merged
merged 1 commit into from
Jun 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions SORelativeDateTransformer/SORelativeDateTransformer.m
Original file line number Diff line number Diff line change
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