Formats the chat modal's dates, in the interface's locale, for its day separators and the times beside grouped messages.
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(): boolean
a: Date,
b: Date
Checks whether a and b fall on the same local day.
Usage
import * as mod from "src/utils/chat/time.ts";