Formats a Date into "relative date". For example, a date that is today would be formatted as "Today".
formatAsRelativeDate(new Date(2020, 10, 21), new Date(2020, 10, 21)) // TodayformatAsRelativeDate(new Date(2020, 10, 20), new Date(2020, 10, 21)) // YesterdayformatAsRelativeDate(new Date(2020, 10, 19), new Date(2020, 10, 21)) // October 19
The formatted string.
The date.
The date from which to calculate the relative formatting.
Generated using TypeDoc
Formats a Date into "relative date". For example, a date that is today would be formatted as "Today".
Example
Returns
The formatted string.