Formats the chat modal's dates, in the interface's locale, for its day separators and the times beside grouped messages.

Functions

f
clockTime(date: Date): string

Returns the hours and minutes of date, without the day period ("PM") so it fits the narrow space beside a grouped message. Its tooltip shows the full time.

f
dayLabel(date: Date): string

Returns the label of the day separator for date. It is "Today", "Yesterday", or the full date, with the year only when it isn't this one.

f
isSameDay(
a: Date,
b: Date
): boolean

Checks whether a and b fall on the same local day.