Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/date_fns/index.js>setSeconds

date-fns Deno package
Very Popular
Go to Latest
function setSeconds
import { setSeconds } from "https://deno.land/x/date_fns@v2.0.0-alpha.34/index.js";

Examples

// Set 45 seconds to 1 September 2014 11:30:40: var result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45) //=> Mon Sep 01 2014 11:30:45

Parameters

dirtyDate
  • the date to be changed
dirtySeconds
  • the seconds of the new date