/**
 * @type
 * @description Format date or time to a specific format.
 */
type FormatDateTimePropsType = {
    /**
     * @description The date to format.
     * @type unknown
     * @default new Date()
     * @optional
     * @summary I have allowed unknown type here, because if the given data is not of a supported type, it will return Invalid Date. So you can use the function even if you are not sure about the data type and you will not have to deal with TypeScript error.
     */
    date?: unknown;
    /**
     * @description The format to convert the date to.
     * @type string
     * @default 'HH:mm:ss | dd/MM/yyyy'
     * @optional
     * @format 'h', 'hh', 'H', 'HH', 'm', 'mm', 's', 'ss', 'S', 'SS', 'SSS', 'EEE', 'EEEE', 'd', 'dd', 'M', 'MM', 'MMM', 'MMMM', 'yy', 'yyyy', 'aa', 'full', 'UTC', 'ISO', 'dateString', 'timeString', 'locale', 'localeDate', 'localeTime'.
     */
    format?: string;
    /**
     * @description Format as UTC instead of local time.
     * @type boolean
     * @default false
     * @optional
     */
    useUTC?: boolean;
};

/**
 * @function
 * @description Format date or time to a specific format.
 * @param {Object} props { date, format, useUTC }
 * @property date - The date to format; type: unknown; default: new Date(); optional
 * @property format - The format of the date; type: string; default: 'HH:mm:ss | dd/MM/yyyy'; optional
 * @property useUTC - Use UTC date; type: boolean; default: false; optional
 * @returns { string } The formatted date; type: string
 */
declare const formatDateTime: (props?: FormatDateTimePropsType) => string;

type DateTimeDifferenceFormatType = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'full' | 'full-short-unit' | 'object' | 'object-total';
/**
 * @type
 * @description Calculate the difference between two dates.
 */
type DateTimeDifferencePropsType<T> = {
    /**
     * @description The starting time to calculate the difference from.
     * @type unknown
     * @default new Date()
     * @optional
     * @summary I have allowed unknown type here, because if the given data is not of a supported type, it will return Invalid Date. So you can use the function even if you are not sure about the data type and you will not have to deal with TypeScript error.
     */
    timeFrom?: unknown;
    /**
     * @description The end time to calculate the difference to.
     * @type unknown
     * @default new Date()
     * @optional
     * @summary I have allowed unknown type here, because if the given data is not of a supported type, it will return Invalid Date. So you can use the function even if you are not sure about the data type and you will not have to deal with TypeScript error.
     */
    timeTo?: unknown;
    /**
     * @description The format to convert the difference to.
     * @type string
     * @default 'full'
     * @optional
     * @format 'millisecond', 'second', 'minute', 'hour', 'day', 'month', 'year', 'full', 'object', 'object-total'
     */
    format?: T;
};
type NumberFormatType = Exclude<DateTimeDifferenceFormatType, 'full' | 'full-short-unit' | 'object' | 'object-total'>;
type DateTimeDifferenceReturnType<T> = T extends 'object' | 'object-total' ? object : T extends NumberFormatType ? number : string;

declare function dateTimeDifference(): string;
/**
 * @function
 * @description Calculate the difference between two dates.
 * @param {Object} props { timeFrom, timeTo, format }
 * @property timeFrom - The starting date/time; type: unknown; default: new Date(); optional
 * @property timeTo - The ending date/time; type: unknown; default: new Date(); optional
 * @property format - The format of the difference; type: 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'full' | 'full-short-unit' | 'object' | 'object-total'; default: 'full'; optional
 * @returns { string | number | object } The difference; type: string | number | object
 */
declare function dateTimeDifference<T extends DateTimeDifferenceFormatType>(props: DateTimeDifferencePropsType<T>): DateTimeDifferenceReturnType<T>;

/**
 * @function
 * @description Get the day name from the day index.
 * @param index - Index of the day; type: number
 * @param format - Format of the day name; type: 'short' | 'long'; default: 'long'; optional
 * @returns { string } The day name; type: string
 */
declare const indexToDay: (index: number, format?: "short" | "long") => string;
/**
 * @function
 * @description Get the month name from the month index.
 * @param index - Index of the month; type: number
 * @param format - Format of the month name; type: 'short' | 'long'; default: 'long'; optional
 * @returns { string } The month name; type: string
 */
declare const indexToMonth: (index: number, format?: "short" | "long") => string;

/**
 * @type
 * @description Add/Subtract time value from a given time and get the new value in different formats.
 */
type AddSubtractTimePropsType = {
    /**
     * @description The base date.
     * @type unknown
     * @default new Date()
     * @optional
     * @summary I have allowed unknown type here, because if the given data is not of a supported type, it will return Invalid Date. So you can use the function even if you are not sure about the data type and you will not have to deal with TypeScript error.
     */
    date?: unknown;
    /**
     * @description The value to add/subtract.
     * @type number
     */
    value: number;
    /**
     * @description The type of value that is provided to be added/subtracted.
     * @type 'year' | 'month' | 'day' | 'hour' | 'min' | 'sec'
     */
    type: 'year' | 'month' | 'day' | 'hour' | 'min' | 'sec' | 'msec';
    /**
     * @description The format to convert the date to.
     * @type string
     * @default 'full'
     * @optional
     * @format 'h', 'hh', 'H', 'HH', 'm', 'mm', 's', 'ss', 'S', 'SS', 'SSS', 'EEE', 'EEEE', 'd', 'dd', 'M', 'MM', 'MMM', 'MMMM', 'yy', 'yyyy', 'aa', 'full', 'UTC', 'ISO', 'date-string', 'time-string', 'local', 'local-date', 'local-time'.
     */
    format?: string;
    /**
     * @description Format as UTC instead of local time.
     * @type boolean
     * @default false
     * @optional
     */
    useUTC?: boolean;
};

/**
 * @function
 * @description Add/Subtract time value from a given time and get the new value in different formats.
 * @param {Object} props { date, value, type, format }
 * @property date - The date to format; type: unknown; default: new Date(); optional
 * @property value - The value to add/subtract; type: number
 * @property type - The type of value that is provided to be added/subtracted; type: 'year' | 'month' | 'day' | 'hour' | 'min' | 'sec' | 'msec'
 * @property format - The format of the date; type: string; default: 'full'; optional
 * @returns { string } The formatted date; type: string
 */
declare const addSubtractTime: (props: AddSubtractTimePropsType) => string;

/**
 * @function
 * @description - Check if the given date is valid or not.
 * @param date - The date to check; type: unknown
 * @param format - Format of the date in string format; values - 'EEE', 'EEEE', 'day', 'dd', 'MM', 'MMM', 'MMMM', 'month', 'yy', 'yyyy', 'year'; optional
 * @returns { boolean } True if the date is valid, otherwise false; type: boolean
 */
declare const isValidDate: (date: unknown, format?: string) => boolean;

/**
 * @function
 * @description - Check if the given year is a leap year.
 * @param year - The year to check; type: number | string; optional
 * @returns { boolean } True if the year is leap year, otherwise false; type: boolean
 */
declare const isLeapYear: (year?: number | string) => boolean;

type DayType = 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday';
/**
 * @function
 * @description - Find the next occurrence of the given day.
 * @param day - The day to find the next occurrence of; type: 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday'
 * @param startDate - The date to start checking from; type: Date | string | number; default: current date; optional
 * @returns { string } Returns UTC value of the result date; type: string
 */
declare const getNextOccurrence: (day: DayType, startDate?: Date | string | number) => string;

export { addSubtractTime, dateTimeDifference, formatDateTime, getNextOccurrence, indexToDay, indexToMonth, isLeapYear, isValidDate };
