Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/date_fns/index.js>getYear

date-fns Deno package
Go to Latest
function getYear
import { getYear } from "https://deno.land/x/date_fns@v2.0.0-alpha.34/index.js";

Examples

// Which year is 2 July 2014? var result = getYear(new Date(2014, 6, 2)) //=> 2014

Parameters

dirtyDate
  • the given date