/** * Formats a date according to the provided format string. * * @param {Date} date - The date to format. * @param {string} format - The format string. * @returns {string} - The formatted date string. */ export declare function formatDate(date: Date, format: string): string; /** * Adds a specified number of days to a date. * * @param {Date} date - The original date. * @param {number} days - The number of days to add. * @returns {Date} - The new date. */ export declare function addDays(date: Date, days: number): Date; /** * Subtracts a specified number of days from a date. * * @param {Date} date - The original date. * @param {number} days - The number of days to subtract. * @returns {Date} - The new date. */ export declare function subtractDays(date: Date, days: number): Date; /** * Adds a specified number of months to a date. * * @param {Date} date - The original date. * @param {number} months - The number of months to add. * @returns {Date} - The new date. */ export declare function addMonths(date: Date, months: number): Date; /** * Subtracts a specified number of months from a date. * * @param {Date} date - The original date. * @param {number} months - The number of months to subtract. * @returns {Date} - The new date. */ export declare function subtractMonths(date: Date, months: number): Date; /** * Adds a specified number of years to a date. * * @param {Date} date - The original date. * @param {number} years - The number of years to add. * @returns {Date} - The new date. */ export declare function addYears(date: Date, years: number): Date; /** * Subtracts a specified number of years from a date. * * @param {Date} date - The original date. * @param {number} years - The number of years to subtract. * @returns {Date} - The new date. */ export declare function subtractYears(date: Date, years: number): Date; /** * Adds a specified number of weeks to a date. * * @param date - The original date. * @param weeks - The number of weeks to add. * @returns The new date. */ export declare function addWeeks(date: Date, weeks: number): Date; /** * Subtracts a specified number of weeks from a date. * * @param date - The original date. * @param weeks - The number of weeks to subtract. * @returns The new date. */ export declare function subtractWeeks(date: Date, weeks: number): Date; /** * Adds a specified number of quarters to a date. * * @param date - The original date. * @param quarters - The number of quarters to add. * @returns The new date. */ export declare function addQuarters(date: Date, quarters: number): Date; /** * Subtracts a specified number of quarters from a date. * * @param date - The original date. * @param quarters - The number of quarters to subtract. * @returns The new date. */ export declare function subtractQuarters(date: Date, quarters: number): Date; /** * Returns the start of the day for the given date. * * @param {Date} date - The original date. * @returns {Date} - The start of the day. */ export declare function startOfDay(date: Date): Date; /** * Returns the end of the day for the given date. * * @param {Date} date - The original date. * @returns {Date} - The end of the day. */ export declare function endOfDay(date: Date): Date; /** * Returns the start of the week for the given date. * * @param {Date} date - The original date. * @param {number} startDayOfWeek - The day the week starts on (0 for Sunday, 1 for Monday, etc.). * @returns {Date} - The start of the week. */ export declare function startOfWeek(date: Date, startDayOfWeek?: number): Date; /** * Returns the end of the week for the given date. * * @param {Date} date - The original date. * @param {number} startDayOfWeek - The day the week starts on (0 for Sunday, 1 for Monday, etc.). * @returns {Date} - The end of the week. */ export declare function endOfWeek(date: Date, startDayOfWeek?: number): Date; /** * Returns the start of the month for the given date. * * @param {Date} date - The original date. * @returns {Date} - The start of the month. */ export declare function startOfMonth(date: Date): Date; /** * Returns the end of the month for the given date. * * @param {Date} date - The original date. * @returns {Date} - The end of the month. */ export declare function endOfMonth(date: Date): Date; /** * Returns the start of the year for the given date. * * @param {Date} date - The original date. * @returns {Date} - The start of the year. */ export declare function startOfYear(date: Date): Date; /** * Returns the end of the year for the given date. * * @param {Date} date - The original date. * @returns {Date} - The end of the year. */ export declare function endOfYear(date: Date): Date; /** * Checks if the given date is today. * * @param {Date} date - The date to check. * @returns {boolean} - True if the date is today, otherwise false. */ export declare function isToday(date: Date): boolean; /** * Checks if the given date is tomorrow. * * @param {Date} date - The date to check. * @returns {boolean} - True if the date is tomorrow, otherwise false. */ export declare function isTomorrow(date: Date): boolean; /** * Checks if the given date is yesterday. * * @param {Date} date - The date to check. * @returns {boolean} - True if the date is yesterday, otherwise false. */ export declare function isYesterday(date: Date): boolean; /** * Calculates the difference in days between two dates. * * @param {Date} a - The first date. * @param {Date} b - The second date. * @returns {number} - The difference in days. */ export declare function dateDiffInDays(a: Date, b: Date): number; /** * Calculates the difference in months between two dates. * * @param {Date} a - The first date. * @param {Date} b - The second date. * @returns {number} - The difference in months. */ export declare function dateDiffInMonths(a: Date, b: Date): number; /** * Calculates the difference in years between two dates. * * @param {Date} a - The first date. * @param {Date} b - The second date. * @returns {number} - The difference in years. */ export declare function dateDiffInYears(a: Date, b: Date): number; /** * Gets the number of days in a month. * * @param year - The year. * @param month - The month (0-based, e.g., January is 0, February is 1, etc.). * @returns The number of days in the month. */ export declare function getDaysInMonth(year: number, month: number): number; /** * Checks if a year is a leap year. * * @param year - The year to check. * @returns True if the year is a leap year, false otherwise. */ export declare function isLeapYear(year: number): boolean;