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

x/date_fns/index.js>setQuarter

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

Examples

// Set the 2nd quarter to 2 July 2014: var result = setQuarter(new Date(2014, 6, 2), 2) //=> Wed Apr 02 2014 00:00:00

Parameters

dirtyDate
  • the date to be changed
dirtyQuarter
  • the quarter of the new date