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

isPast

import { isPast } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// If today is 6 October 2014, is 2 July 2014 in the past?
const result = isPast(new Date(2014, 6, 2))
//=> true
function isPast<DateType extends Date>(date: DateType | number | string): boolean;
§
isPast<DateType extends Date>(date: DateType | number | string): boolean
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
date: DateType | number | string
[src]
  • The date to check

§Return Type

§
boolean
[src]

The date is in the past