Create a new Date instance to get the current date, use getFullYear to get the year from that, and create a Date intance with the year, month 0 (January), and date 1:
var d = new Date(new Date().getFullYear(), 0, 1);
Create a new Date instance to get the current date, use getFullYear to get the year from that, and create a Date intance with the year, month 0 (January), and date 1:
var d = new Date(new Date().getFullYear(), 0, 1);