Skip to main content
Very Popular
Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.22.1/setISODay/index.ts";

Examples

// Set Sunday to 1 September 2014: const result = setISODay(new Date(2014, 8, 1), 7) //=> Sun Sep 07 2014 00:00:00

Parameters

dirtyDate: Date | number
  • the date to be changed
dirtyDay: number
  • the day of the ISO week of the new date

Returns

the new date with the day of the ISO week set