/** * Determines the user's preferred time format (12-hour or 24-hour) * based on the system's locale settings. * * Credits: https://www.reddit.com/r/webdev/comments/1azu87y/comment/ks3mtci/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button * * @returns {12|24} Returns 12 if the user's locale uses a 12-hour cycle, otherwise returns 24. */ export declare function getUserTimeFormat(): 12 | 24; /** * Calculates the time duration between the current time and a given time offset. * * @param {Date} timeData - The target time as a Date object. * @param {'asMilliseconds'|'asSeconds'|'asMinutes'|'asHours'|'asDays'} [durationType='asSeconds'] - The type of duration to return. * @param {Date|null} [now=null] - The current time as a Date object. Defaults to the current date and time if not provided. * @returns {number} The calculated duration in the specified unit, or `null` if `timeData` is not provided. */ export declare function getTimeDuration(timeData?: Date, durationType?: 'asMilliseconds' | 'asSeconds' | 'asMinutes' | 'asHours' | 'asDays', now?: Date | null): number; /** * Formats a custom timer string based on total seconds and a detail level. * Includes proper reallocation of lower units into higher ones, ensuring consistent hierarchy. * * @param {number} totalSeconds - The total amount of seconds to convert. * @param {'seconds'|'minutes'|'hours'|'days'|'months'|'years'} [level] - The highest level to calculate and display. * @param {string} [format='{time}'] - Output template with placeholders like {years}, {months}, {days}, {hours}, {minutes}, {seconds}, {time}, {total}. * @returns {string} The formatted timer string. */ export declare function formatCustomTimer(totalSeconds: number, level?: 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'years', format?: string): string; /** * Formats a duration (in seconds) into a timer string showing only hours, minutes, and seconds. * * Example output: "05:32:10" * * @param {number} seconds - The total number of seconds to format. * @returns {string} The formatted timer string in "HH:MM:SS" format. */ export declare function formatTimer(seconds: number): string; /** * Formats a duration (in seconds) into a timer string including days, hours, minutes, and seconds. * * Example output: "2d 05:32:10" * * @param {number} seconds - The total number of seconds to format. * @returns {string} The formatted timer string in "Xd HH:MM:SS" format. */ export declare function formatDayTimer(seconds: number): string; /** * Breaks down a duration in milliseconds into its time components. * * @param {number} totalMs - The total duration in milliseconds. * @param {'milliseconds'|'seconds'|'minutes'|'hours'|'days'|'months'|'years'} [level='milliseconds'] - The highest level to calculate and display. * @returns {{ * years: number, * months: number, * days: number, * hours: number, * minutes: number, * seconds: number, * milliseconds: number, * total: number * }} */ export declare function breakdownDuration(totalMs: number, level?: 'milliseconds' | 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'years'): { years: number; months: number; days: number; hours: number; minutes: number; seconds: number; milliseconds: number; total: number; }; //# sourceMappingURL=clock.d.mts.map