Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Very Popular
Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.22.1/setQuarter/index.ts";

Examples

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

Parameters

dirtyDate: Date | number
  • the date to be changed
dirtyQuarter: number
  • the quarter of the new date

Returns

the new date with the quarter set