Lesson

Format a Date Relative to the Current Date Using react-intl FormattedRelative

Given a date, we’ll use the react-intl FormattedRelative component to render a date in a human readable format, such as “2 days ago”, in various languages. We'll also see how to set the frequency of this component's rendering to make our app update the text...

Duration
2 min
Access
Pro
Transcript
Available

Given a date, we’ll use the react-intl FormattedRelative component to render a date in a human readable format, such as “2 days ago”, in various languages.

We'll also see how to set the frequency of this component's rendering to make our app update the text in real-time.