export declare function getCurrentTimestamp(): number;
export declare const sleep: (ms: number) => Promise<unknown>;
/**
 * Timespan types for date filtering
 */
export type TimespanType = "hourly" | "daily" | "weekly" | "monthly" | "quarterly" | "yearly" | "custom" | "lifetime";
/**
 * Get date range based on timespan type
 * @param timespan - The timespan type
 * @param customStartDate - Optional custom start date for "custom" timespan
 * @param customEndDate - Optional custom end date for "custom" timespan
 * @returns Object with startDate and endDate
 */
export declare function getDateRangeByTimespan(timespan: TimespanType, customStartDate?: Date, customEndDate?: Date): {
    startDate: Date;
    endDate: Date;
};
/**
 * Create database where conditions for timespan-based filtering
 * @param table - The database table object
 * @param timeColumn - The time column name (e.g., 'createdAt', 'updatedAt')
 * @param orgId - The organization ID
 * @param timespan - The timespan type
 * @param customStartDate - Optional custom start date for "custom" timespan
 * @param customEndDate - Optional custom end date for "custom" timespan
 * @returns Database where conditions for filtering
 */
export declare function createTimespanWhereConditions({ table, timeColumn, orgId, timespan, customStartDate, customEndDate, extraConditions }: {
    table: any;
    timeColumn: string;
    orgId: string;
    timespan: TimespanType;
    customStartDate?: Date;
    customEndDate?: Date;
    extraConditions?: any;
}): any;
/**
 * Format date using date-fns
 * @param date - The date to format
 * @param formatString - The format string (default: 'yyyy-MM-dd HH:mm:ss')
 * @returns Formatted date string
 */
export declare function formatDate(date: Date, formatString?: string): string;
/**
 * Parse ISO date string using date-fns
 * @param dateString - ISO date string
 * @returns Parsed Date object
 */
export declare function parseISODate(dateString: string): Date;
/**
 * Check if a date is valid using date-fns
 * @param date - The date to validate
 * @returns True if date is valid
 */
export declare function isValidDate(date: Date): boolean;
/**
 * Get start of day for a given date
 * @param date - The date
 * @returns Start of day Date object
 */
export declare function getStartOfDay(date: Date): Date;
/**
 * Get start of week for a given date
 * @param date - The date
 * @param weekStartsOn - Day of week to start on (0 = Sunday, 1 = Monday, etc.)
 * @returns Start of week Date object
 */
export declare function getStartOfWeek(date: Date, weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6): Date;
//# sourceMappingURL=time.d.ts.map