yahoo/intl-relativeformat — pull request #2 by ericf (2014-09-19 05:16:26+00:00)
Title: Add support for relative units: "yesterday"

This adds support for selecting common used relative units for each locale; e.g., instead of outputting "1 day ago" these changes will now output "yesterday".

This also adds support for a `units` option, to _always_ force the output to be in the specified units, the following example forces the output into hours:

```js
var rf = new IntlRelativeFormat('en', {units: 'hour'});

// Generate a timestamp that's two days ago.
var output = rf.format(Date.now() - (2 * 24 * 60 * 60 * 1000));

// Outputs hours _instead_ of "2 days ago".
console.log(output); // => "48 hours ago"
```