/** * Utility functions for time picker component */ export type TimePickerType = 'minutes' | 'seconds' | 'hours' | '12hours'; export type Period = 'AM' | 'PM'; export type Granularity = 'day' | 'hour' | 'minute' | 'second'; /** * Regular expression to check for valid hour format (00-23) */ export declare function isValidHour(value: string): boolean; /** * Regular expression to check for valid 12 hour format (01-12) */ export declare function isValid12Hour(value: string): boolean; /** * Regular expression to check for valid minute or second format (00-59) */ export declare function isValidMinuteOrSecond(value: string): boolean; type GetValidNumberConfig = { max: number; min?: number; loop?: boolean; }; /** * Get a valid number within specified range */ export declare function getValidNumber(value: string, { max, min, loop }: GetValidNumberConfig): string; export declare function getValidHour(value: string): string; export declare function getValid12Hour(value: string): string; export declare function getValidMinuteOrSecond(value: string): string; type GetValidArrowNumberConfig = { min: number; max: number; step: number; }; /** * Get valid number when using arrow keys */ export declare function getValidArrowNumber(value: string, { min, max, step }: GetValidArrowNumberConfig): string; export declare function getValidArrowHour(value: string, step: number): string; export declare function getValidArrow12Hour(value: string, step: number): string; export declare function getValidArrowMinuteOrSecond(value: string, step: number): string; /** * Set minutes on a date object */ export declare function setMinutes(date: Date, value: string): Date; /** * Set seconds on a date object */ export declare function setSeconds(date: Date, value: string): Date; /** * Set hours on a date object (24-hour format) */ export declare function setHours(date: Date, value: string): Date; /** * Set hours on a date object (12-hour format) */ export declare function set12Hours(date: Date, value: string, period: Period): Date; /** * Set date by time picker type */ export declare function setDateByType(date: Date, value: string, type: TimePickerType, period?: Period): Date; /** * Get date value by time picker type */ export declare function getDateByType(date: Date | null, type: TimePickerType): string; /** * Get arrow value by time picker type */ export declare function getArrowByType(value: string, step: number, type: TimePickerType): string; /** * Convert 12-hour format to 24-hour format * 12:00 PM is 12:00 * 12:00 AM is 00:00 */ export declare function convert12HourTo24Hour(hour: number, period: Period): number; /** * Display 24-hour format in 12-hour representation */ export declare function display12HourValue(hours: number): string; export {}; //# sourceMappingURL=time-utils.d.ts.map