I want to create a Date object in javascript, which represents the year 0001, 2014 years ago.
I tried with
d = new Date(); d.setYear(1); console.log
when handling JavaScript date objects you have to specify the full year for ex, 1950 and not 50. It is mentioned in the doc. So the code should be as Daniel has said also,
d = new Date(); d.setFullYear(1); console.log(d);