Skip to main content
Deno 2 is finally here 🎉️
Learn more
Very Popular
Go to Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.0.0-alpha.15/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
dirtyOptions