Provides a relative date string for resolutions ranging from seconds up through years. Should be used when absolute date and time is unnecessarily specific.
We can pass a date as either an ISO 8601 string, a Date object, or a UNIX Epoch time.
Normally, the component compares your
date with today’s date. If you want to compare it to some specific date
you need to provide
The component will display
in a day
You can set isRelativeToCurrentWeek to true if you want to indicate that the date is relative only within a week.
And if the difference is more than one week, just show the date without relativeness.
It will compare the date to today or
baseDate if provided.