Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

nextSunday

import { nextSunday } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// When is the next Sunday after Mar, 22, 2020?
const result = nextSunday(new Date(2020, 2, 22))
//=> Sun Mar 29 2020 00:00:00
function nextSunday<DateType extends Date>(date: DateType | number | string): DateType;
§
nextSunday<DateType extends Date>(date: DateType | number | string): DateType
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
date: DateType | number | string
[src]
  • The date to start counting from

§Return Type

§
DateType
[src]

The next Sunday