import dayjs from 'dayjs';
export declare type AvailableDate = Date | string | dayjs.Dayjs | number;
export declare function isValidDate(obj?: Date): obj is Date;
export declare function toValidDate(from?: AvailableDate, defaultDate?: Date): Date;
export declare function toDate(from?: AvailableDate): Date;
export declare function toDay(from: AvailableDate): dayjs.Dayjs;
export declare function cloneDate(d: Date): Date;
declare type DateNumType = 'y' | 'm' | 'd' | 'h' | 'i' | 's';
export declare function getDateNum(type: DateNumType, d: Date): number;
export declare function isTypeSame(type: DateNumType, d1: Date, d2: Date): boolean;
export declare enum RANGE_CHECK_RESULT {
    IN_RANGE = 0,
    SMALL_THAN_HOUR = 1,
    BIGGER_THAN_HOUR = 2,
    SMALL_THAN_MIN = 3,
    BIGGER_THAN_MIN = 4,
    SMALL_THAN_SEC = 5,
    BIGGER_THAN_SEC = 6,
    SMALL_THAN_YEAR = 7,
    BIGGER_THAN_YEAR = 8,
    SMALL_THAN_MONTH = 9,
    BIGGER_THAN_MONTH = 10,
    SMALL_THAN_DAY = 11,
    BIGGER_THAN_DAY = 12
}
export interface TimeOptions {
    hasHour?: boolean;
    hasMinute?: boolean;
    hasSecond?: boolean;
}
export interface DateCheckOptions {
    date?: {
        hasYear: boolean;
        hasMonth: boolean;
        hasDay: boolean;
    };
    time?: TimeOptions;
}
export declare function checkDateRange(d: Date, options: DateCheckOptions, validRange?: [Date, Date]): RANGE_CHECK_RESULT;
export declare function getRangeDate(d: Date, options: DateCheckOptions, validRange?: [Date, Date]): Date;
interface TimeExtraOptions {
    hourStep?: number;
    minuteStep?: number;
    secondStep?: number;
}
export declare function getNearestDate(options: TimeOptions, extra: TimeExtraOptions, d: Date, calcType: 'auto' | 'plus' | 'minus'): Date;
export declare function getRealRange(options: TimeOptions, extra: TimeExtraOptions, validRange?: [Date, Date]): [Date, Date] | undefined;
export {};
