When i'm setting up date object using the below statement the output showing different in nodejs. Can you please help me to understand why it is like this. And how i need to pass to print right value.
var date1= new Date(2017,01,01);
var date2= new Date(2017,01,31);
console.log("2017-01-01 is printed as ==>",date1);
console.log("2017-01-31 is printed as ==>",date2);
Output
2017-01-01 is printed as ==> 2017-01-31T18:30:00.000Z
2017-01-31 is printed as ==> 2017-03-02T18:30:00.000Z