react-intl translate relative time (like 3 minutes and 50 seconds)

Viewed 435

I use a react-intl for translating an application. I got a time in seconds which repesents how long did it take to complete a task and I want to show this time as a relative time. ("2 minutes" instead of pure 120 seconds)

But when I use

<FormattedRelative value={0} initialNow={1248341} />

the react-intl returns "21 minutes ago" instead of "2 weeks" is there any way to get rid of that "ago" phrase and show only the translated phrase for given time value?

1 Answers
Related