← You're installing date-fns for 'X hours ago'. `Intl.RelativeTimeFormat` does it natively.Quiz
Intl.RelativeTimeFormat — relative timestamps without a library
Intl.RelativeTimeFormat formats a numeric duration and unit into natural-language relative time like '3 hours ago' or 'yesterday'. These questions cover how the constructor and format() method work, what numeric: 'auto' gives you, how locale support compares to shipping your own translations, what the API does not do (date arithmetic, unit picking), and when browser support landed.
questions9
pass mark70%
resultsat the end
No account needed. Answer all 9 questions, then see your score with every answer explained and a reference to the spec or MDN — pass and you can claim a certificate.