javascript method to extract the year (four digits) out of a date object. code example
Example 1: how to get the year in javascript
new Date().getFullYear(); // This will get you the current year
Example 2: javascript get current day of month
new Date().getDate();//gets day of month (1-31)