UNPKG

637 BTypeScriptView Raw
1/**
2 * @name hoursToSeconds
3 * @category Conversion Helpers
4 * @summary Convert hours to seconds.
5 *
6 * @description
7 * Convert a number of hours to a full number of seconds.
8 *
9 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
10 *
11 * @param hours - The number of hours to be converted
12 *
13 * @returns The number of hours converted in seconds
14 *
15 * @example
16 * // Convert 2 hours to seconds:
17 * const result = hoursToSeconds(2)
18 * //=> 7200
19 */
20export declare function hoursToSeconds(hours: number): number;