Returns the full year from a given date.
The date object to extract the year from.
Full year (e.g., 2025).
getYear(new Date(2025, 6, 23)); // 2025 Copy
getYear(new Date(2025, 6, 23)); // 2025
Returns the full year from a given date.