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.35/addHours/index.js";

Examples

// Add 2 hours to 10 July 2014 23:00:00: var result = addHours(new Date(2014, 6, 10, 23, 0), 2) //=> Fri Jul 11 2014 01:00:00

Parameters

dirtyDate
  • the date to be changed
dirtyAmount
  • the amount of hours to be added