UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

31 lines (30 loc) 865 B
import { CellContext } from '@tanstack/react-table'; import { Nil } from '../../utils/misc'; /** * Column cell formatter that formats date to include just the day, month and year. * The exact date format is based on locale. * * @example * ```ts * // for US - 2/12/2019 * columnHelper.accessor("updatedAt", { * header: "Date", * cell: dateColumn, * }) * ``` */ export declare const dateColumn: <T>(props: CellContext<T, Nil<string | Date>>) => string; /** * Column cell formatter that formats date to include both day, month, year and time. * The exact date format is based on locale. * * @example * ```ts * // for US - 2/12/2019 11:31 PM * columnHelper.accessor("updatedAt", { * header: "Date Time", * cell: dateTimeColumn, * }) * ``` */ export declare const dateTimeColumn: <T>(props: CellContext<T, Nil<string | Date>>) => string;