mattt/FormatterKit — pull request #30 by bcapps (2013-01-19 23:41:08+00:00)
Title: Handles Nil and Empty String Deictic Expressions

When setting a dietetic expression to `nil` or `@""`, there will be an extra space or `(null)` returned at the end of a formatted time interval. This happens because the default `deicticExpressionFormat` is `@"%@ %@"`, and so will have a trailing space or `(null)` if the second argument is an empty string or nil.

We saw this come into play with this configuration:

``` objc
timeIntervalFormatter.presentDeicticExpression = NSLocalizedString(@"no time", @"FormatterKit present deictic expression. E.g. You ran 10 feet in no time");
timeIntervalFormatter.futureDeicticExpression = @"";
```

For future times we chose to display no `futureDeicticExpression` because we want it to read `You ran 10 miles in 200 minutes.`, but we end up getting `You ran 10 miles in 200 minutes .`.

This change only returns the formatted string with the deictic expression when that expression is non-nil and non-empty.