import { default } from "https://deno.land/x/date_fns@v2.22.1/getYear/index.ts";
Examples
// Which year is 2 July 2014?
const result = getYear(new Date(2014, 6, 2))
//=> 2014
// Which year is 2 July 2014? const result = getYear(new Date(2014, 6, 2)) //=> 2014
Parameters
dirtyDate: Date | number
- the given date