get the year form full date javascript code example
Example 1: how to get the year in javascript
new Date().getFullYear(); // This will get you the current year
Example 2: js get day month year
const d = new Date();
d.getMonth() + 1; // Month [mm] (1 - 12)
d.getDate(); // Day [dd] (1 - 31)
d.getFullYear(); // Year [yyyy]