hy-vue-gantt
Version:
Evolution of vue-ganttastic package
21 lines • 1.06 kB
TypeScript
import dayjs, { type Dayjs } from "dayjs";
import type { GanttBarObject, GGanttChartConfig } from "../types";
/**
* Default date format used throughout the Gantt chart
* Format includes both date and time components
*/
export declare const DEFAULT_DATE_FORMAT = "YYYY-MM-DD HH:mm";
/**
* A composable that provides date manipulation utilities using dayjs
* Centralizes date handling logic for consistency across the Gantt chart
* @param config - Optional Gantt chart configuration. If not provided, uses default config
* @returns Object containing date manipulation methods and computed properties
*/
export default function useDayjsHelper(config?: GGanttChartConfig): {
chartStartDayjs: import("vue").ComputedRef<dayjs.Dayjs>;
chartEndDayjs: import("vue").ComputedRef<dayjs.Dayjs>;
toDayjs: (input: string | Date | GanttBarObject, startOrEnd?: "start" | "end") => dayjs.Dayjs;
format: (input: string | Date | Dayjs, pattern?: string | false) => string | Date;
diffDates: () => number;
};
//# sourceMappingURL=useDayjsHelper.d.ts.map