import { tDate } from '../../../logical/data-type.js';
import { columnManager } from '../manager.js';
export const datePureColumnConfig = columnManager.register('date', {
    name: 'Date',
    type: () => tDate.create(),
    defaultData: () => ({}),
    cellToString: data => data?.toString() ?? '',
    cellFromString: data => {
        const isDateFormat = !isNaN(Date.parse(data));
        return {
            value: isDateFormat ? +new Date(data) : null,
        };
    },
    cellToJson: data => data ?? null,
});
//# sourceMappingURL=define.js.map