formatjs/formatjs-site

Figure out why Relative Format example aren't formatting numbers

ericf opened this issue · 2 comments

I noticed that the relative format examples that display "1,320" minutes aren't formatting the number according to the locale.

screenshot 2014-10-10 17 07 41

Whereas when I try to use IntlRelativeFormat directly it works fine; e.g., in French:

var rf = new IntlRelativeFormat('fr', {units: 'minute'})
rf.format(Date.now() - (1000*60*1320)); // => "il y a 1 320 minutes"

This is a manifestation of this bug: formatjs/intl-relativeformat#17

This has now been fixed.