moment show only year code example
Example 1: moment js year only
moment().year(Number);
moment().year(); // Number
moment().years(Number);
moment().years(); // Number
Example 2: getFullYear within moment in angular
alert((new Date()).getFullYear());