hoursToMilliseconds.d.ts 672 B

1234567891011121314151617181920
  1. /**
  2. * @name hoursToMilliseconds
  3. * @category Conversion Helpers
  4. * @summary Convert hours to milliseconds.
  5. *
  6. * @description
  7. * Convert a number of hours to a full number of milliseconds.
  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 - number of hours to be converted
  12. *
  13. * @returns The number of hours converted to milliseconds
  14. *
  15. * @example
  16. * // Convert 2 hours to milliseconds:
  17. * const result = hoursToMilliseconds(2)
  18. * //=> 7200000
  19. */
  20. export declare function hoursToMilliseconds(hours: number): number;