import type { Dayjs } from 'dayjs'; export declare type RelativeDay = 'today' | 'yesterday' | 'tomorrow'; /** * 判断日期相对于参考日期是今天、昨天还是明天 * * @param date 要展示的日期 * @param reference 参考日期(通常为「当前」dayjs()) * @returns 'today' | 'yesterday' | 'tomorrow' | null * * @example * getRelativeDay(dayjs(), dayjs()) // => 'today' * getRelativeDay(dayjs().add(1,'day'), dayjs()) // => 'tomorrow' * getRelativeDay(dayjs().subtract(1,'day'), dayjs()) // => 'yesterday' */ export declare function getRelativeDay(date: Dayjs, reference: Dayjs): RelativeDay | null; /** * 根据 locale 返回相对日期的展示文案 * 未传 locale 时使用 getDayjsLocale()(与 locales.getLocale 同源) * * @param day 'today' | 'yesterday' | 'tomorrow' * @param locale dayjs locale,如 'zh-cn'、'en' * @returns 如 '今天'、'Today' */ export declare function getRelativeDayLabel(day: RelativeDay, locale?: string): string;