import { getYear } from "https://deno.land/x/date_fns@v2.12.0/index.js";
Examples
// Which year is 2 July 2014?
var result = getYear(new Date(2014, 6, 2))
//=> 2014
// Which year is 2 July 2014? var result = getYear(new Date(2014, 6, 2)) //=> 2014