Skip to main content
Module

x/date_fns/index.js>addHours

date-fns Deno package
Very Popular
Go to Latest
function addHours
import { addHours } from "https://deno.land/x/date_fns@v2.2.1/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