Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

millisecondsToHours

import { millisecondsToHours } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Convert 7200000 milliseconds to hours:
const result = millisecondsToHours(7200000)
//=> 2
@example
// It uses floor rounding:
const result = millisecondsToHours(7199999)
//=> 1
function millisecondsToHours(milliseconds: number): number;
§
millisecondsToHours(milliseconds: number): number
[src]

§Parameters

§
milliseconds: number
[src]
  • The number of milliseconds to be converted

§Return Type

§
number
[src]

The number of milliseconds converted in hours