compote-ui
Version:
An opinionated UI component library for Svelte, built on top of [Ark UI](https://ark-ui.com) with additional components and features not available in the core Ark UI library.
14 lines (13 loc) • 806 B
TypeScript
export type DateCellType = 'date' | 'time' | 'date-time';
export declare const TYPE_DATE_FORMAT_DEFAULTS: Record<DateCellType, Intl.DateTimeFormatOptions>;
/**
* The zone a date column is shown — and therefore filtered — in: `formatOptions.timeZone`
* when the column sets one, otherwise the viewer's local zone.
*/
export declare function dateCellTimeZone(formatOptions: Intl.DateTimeFormatOptions | undefined): string;
/**
* A date cell value formatted for display, or undefined when it can't be read. Reads the
* value with `readDateInZone`, exactly as the date range filter does, so a cell always shows
* the day it is filtered by.
*/
export declare function formatDateCell(value: unknown, type: DateCellType, locale: string, formatOptions?: Intl.DateTimeFormatOptions): string | undefined;