Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.0.0-alpha.34/startOfDecade/index.js";

Examples

// The start of a decade for 21 October 2015 00:00:00: var result = startOfDecade(new Date(2015, 9, 21, 00, 00, 00)) //=> Jan 01 2010 00:00:00

Parameters

dirtyDate
  • the original date