Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.22.0/isSameYear/index.ts";

Examples

// Are 2 September 2014 and 25 September 2014 in the same year? var result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25)) //=> true

Parameters

dirtyDateLeft: Date | number
  • the first date to check
dirtyDateRight: Date | number
  • the second date to check

Returns

boolean

the dates are in the same year