import type { DateValue, RangeValue } from "../types/general.js"; /** * Returns a Date object representing 1970-01-01T00:00:00.000Z. * * @return {Date} A Date object representing 1970-01-01T00:00:00.000Z. */ export declare const getZeroDate: () => Date; /** * Returns true if the given Date object represents the date 1970-01-01T00:00:00.000Z, false otherwise. * * @param {Date} date - The date to check. * @return {boolean} True if the date is 1970-01-01T00:00:00.000Z, false otherwise. */ export declare const isZeroDate: (date: Date) => boolean; /** * Returns a new Date object representing the month before the given date. * * @param {Date} fnDate - The date from which to calculate the previous month. * @return {Date} A new Date object representing the first day of the previous month. */ export declare const prevMonth: (fnDate: Date) => Date; /** * Returns a new Date object representing the month after the given date. * * @param {Date} fnDate - The date from which to calculate the next month. * @return {Date} A new Date object representing the first day of the next month. */ export declare const nextMonth: (fnDate: Date) => Date; /** * Returns the first and last day of the month for a given date. * * @param {Date} date - The date object from which to derive the month and year. * @return {[Date, Date]} An array containing the first and last day of the month. */ export declare const getFirstAndLastDay: (date: Date) => [Date, Date]; /** * Returns the first and last day of the month for a given date, using UTC date calculations. * * @param {Date} date - The date object from which to derive the month and year. * @return {[Date, Date]} An array containing the first and last day of the month. */ export declare const getFirstAndLastDayUTC: (date: Date) => [Date, Date]; /** * Generates an array of numbers over a specified range. * * @param {number} [start=0] - The starting number of the range (inclusive). * @param {number} [end=0] - The ending number of the range (exclusive). * @param {number} [step=1] - The difference between each number in the range. * @return {number[]} An array of numbers from `start` to `end` with the specified `step`. */ export declare const arrayRange: (start?: number, end?: number, step?: number) => number[]; /** * Generates an array of objects representing the days in a month. * * @param {Date} dateProp - The date object from which to derive the month and year. * @param {Date} monthEnd - The date object representing the last day of the month. * @return {Object[]} An array of objects containing the day of the month and a corresponding date object. */ export declare const getMonthDateRange: (dateProp: Date, monthEnd: Date) => { day: number; dateObj: Date; }[]; /** * Generates an array of objects representing the days in a month, using UTC date calculations. * * @param {Date} dateProp - The date object from which to derive the month and year. * @param {Date} monthEnd - The date object representing the last day of the month. * @return {Object[]} An array of objects containing the day of the month and a corresponding date object. */ export declare const getMonthDateRangeUTC: (dateProp: Date, monthEnd: Date) => { day: number; dateObj: Date; }[]; /** * Generates a calendar array based on the provided date list. * * @param {Array} dateList - A list of objects containing the day and date object. * @return {Array} An array of objects representing the days in a calendar format. */ export declare const generateCalendar: (dateList: { day: number; dateObj: Date; }[]) => Array<{ day: number | string; dateObj: Date; }>; /** * Returns true if the given dates have the same time. * * @param first - The first date to compare. * @param second - The second date to compare. * @return True if the given dates have the same time, false otherwise. */ export declare const isTimeEqual: (first: Date, second: Date) => boolean; /** * Returns true if the given start date is greater that the end date. * * @param start - The start date to compare. * @param end - The end date to compare. * @return True if the given start date is greater than the end date. */ export declare const isStartDateGreaterThanEndDate: (start: Date, end: Date) => boolean; /** * Returns true if the given date falls within the given start and end dates, * ignoring the time component of the dates. * * @param date - The date to check. * @param startDate - The start date of the range. * @param endDate - The end date of the range. * @return True if the given date is in the given range, false otherwise. */ export declare const isInDateRange: (date: Date, startDate: Date, endDate: Date) => boolean; /** * Returns true if the given date falls within the given start and end dates, * ignoring the time component of the dates and using UTC date calculations. * * @param date - The date to check. * @param startDate - The start date of the range. * @param endDate - The end date of the range. * @return True if the given date is in the given range, false otherwise. */ export declare const isInDateRangeUTC: (date: Date, startDate: Date, endDate: Date) => boolean; /** * Returns true if the given date is a Saturday or Sunday. * * @param date - The date to check. * @returns True if the given date is a Saturday or Sunday. */ export declare const isWeekend: (date: Date) => boolean; /** * Formats a date range into a string, handling different cases for single day, * same month, and different month/year. * * @param startDate - The start date of the range. * @param endDate - The end date of the range. * @return A string representing the date range. */ export declare const formatDateRange: (startDate: Date, endDate: Date) => string; /** * Returns the value of the date selection. * * If the start and end dates are the same, the function returns the DateValue. * If the start and end dates are different, the function returns the RangeValue. * * @param startDate - The start date of the range. * @param endDate - The end date of the range. * @return The value of the date range selection. */ export declare const selectedValue: (startDate: Date, endDate: Date) => DateValue | RangeValue;