title: How to get the current year using typescript in angular6
body: <p>How to get the current year using typescript in angular6  </p>
  
  <pre><code>currentYear:Date;
  this.currentYear=new Date("YYYY");
  alert(this.currentYear);
  </code></pre>
  
  <blockquote>
    <p>It shows Invalid Date</p>
  </blockquote>