import { DurationInput } from './types'; import { UNITS_META_MAP } from './lib/units'; /** * Convert the input value to milliseconds represented by a duration object. * If a number is passed this is returned verbatim as the number * of milliseconds. * * @example toMilliseconds({ days: 1 }) // 86400000 */ export declare const toMilliseconds: (duration: DurationInput) => number; /** * Convert the input value to the specificed unit. * @example toUnit({ minutes: 2 }, 'seconds') // 120 */ export declare const toUnit: (duration: DurationInput, unit: keyof typeof UNITS_META_MAP) => number; /** * Convert the input value to seconds. * @example toSeconds({ minutes: 2 }) // 120 */ export declare const toSeconds: (duration: DurationInput) => number; /** * Convert the input value to minutes. * @example toMinutes({ hours: 1, minutes: 10 }) // 70 */ export declare const toMinutes: (duration: DurationInput) => number; /** * Convert the input value to hours. * @example toHours({ days: 1 }) // 24 */ export declare const toHours: (duration: DurationInput) => number; /** * Convert the input value to days. * @example toDays({ hours: 12 }) // 0.5 */ export declare const toDays: (duration: DurationInput) => number; /** * Convert the input value to weeks. * @example toWeeks({ days: 14 }) // 2 */ export declare const toWeeks: (duration: DurationInput) => number; /** * Convert the input value to months. * Note, this is a rough approximation as the length of a month is variable. * * @example toMonths({ months: 10, days: 365 }) // 11 */ export declare const toMonths: (duration: DurationInput) => number; /** * Convert the input value to years. * Note, this is a rough approximation as the length of a year is variable. * * @example toYears({ years: 10, days: 365 }) // 11 */ export declare const toYears: (duration: DurationInput) => number;