function dayLabel
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.

Parameters

date: Date

Return Type

string

Usage

import { dayLabel } from "src/utils/chat/time.ts";