Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.0.0-alpha.28/setHours/index.js";

Examples

// Set 4 hours to 1 September 2014 11:30:00: var result = setHours(new Date(2014, 8, 1, 11, 30), 4) //=> Mon Sep 01 2014 04:30:00

Parameters

dirtyDate
  • the date to be changed
dirtyHours
  • the hours of the new date