/** * DatePicker Utility Functions * * Common utility functions for date manipulation and formatting * used with the DatePicker component. */ /** * Get the start of day (00:00:00) */ export declare function startOfDay(date: Date): Date; /** * Get the end of day (23:59:59) */ export declare function endOfDay(date: Date): Date; /** * Get the start of week (Monday) */ export declare function startOfWeek(date: Date): Date; /** * Get the end of week (Sunday) */ export declare function endOfWeek(date: Date): Date; /** * Get the start of month */ export declare function startOfMonth(date: Date): Date; /** * Get the end of month */ export declare function endOfMonth(date: Date): Date; /** * Get the start of year */ export declare function startOfYear(date: Date): Date; /** * Get the end of year */ export declare function endOfYear(date: Date): Date; /** * Add days to a date */ export declare function addDays(date: Date, days: number): Date; /** * Add months to a date */ export declare function addMonths(date: Date, months: number): Date; /** * Add years to a date */ export declare function addYears(date: Date, years: number): Date; /** * Check if date is today */ export declare function isToday(date: Date): boolean; /** * Check if date is in the past */ export declare function isPast(date: Date): boolean; /** * Check if date is in the future */ export declare function isFuture(date: Date): boolean; /** * Check if date is weekend (Saturday or Sunday) */ export declare function isWeekend(date: Date): boolean; /** * Check if date is weekday (Monday to Friday) */ export declare function isWeekday(date: Date): boolean; /** * Get the difference in days between two dates */ export declare function diffInDays(date1: Date, date2: Date): number; /** * Get the difference in months between two dates */ export declare function diffInMonths(date1: Date, date2: Date): number; /** * Get the difference in years between two dates */ export declare function diffInYears(date1: Date, date2: Date): number; /** * Format date to string */ export declare function formatDate(date: Date, format?: string): string; /** * Parse date string to Date object */ export declare function parseDate(dateString: string): Date | null; /** * Get an array of dates between two dates */ export declare function getDateRange(startDate: Date, endDate: Date): Date[]; /** * Check if a date is within a range */ export declare function isDateInRange(date: Date, startDate: Date, endDate: Date): boolean; /** * Get week number of the year */ export declare function getWeekNumber(date: Date): number; /** * Get the date from week number */ export declare function getDateFromWeekNumber(week: number, year: number): Date; /** * Get business days between two dates (excluding weekends) */ export declare function getBusinessDays(startDate: Date, endDate: Date): number; /** * Add business days (excluding weekends) */ export declare function addBusinessDays(date: Date, days: number): Date; /** * Common date disable functions for flatpickr */ export declare const dateDisableFunctions: { disableWeekends: (date: Date) => boolean; disableWeekdays: (date: Date) => boolean; disablePast: (date: Date) => boolean; disableFuture: (date: Date) => boolean; disableDaysOfWeek: (days: number[]) => (date: Date) => boolean; disableBefore: (beforeDate: Date) => (date: Date) => boolean; disableAfter: (afterDate: Date) => (date: Date) => boolean; disableRange: (startDate: Date, endDate: Date) => (date: Date) => boolean; }; /** * Common date presets for quick selection */ export declare const datePresets: { today: () => Date; yesterday: () => Date; tomorrow: () => Date; startOfWeek: () => Date; endOfWeek: () => Date; startOfMonth: () => Date; endOfMonth: () => Date; startOfYear: () => Date; endOfYear: () => Date; lastWeek: () => { start: Date; end: Date; }; lastMonth: () => { start: Date; end: Date; }; lastYear: () => { start: Date; end: Date; }; next30Days: () => { start: Date; end: Date; }; next90Days: () => { start: Date; end: Date; }; }; //# sourceMappingURL=utils.d.ts.map