var a = new Date("19-06-2018");
var b = new Date("19-07-2018");
var c = a.getTime();
var d = b.getTime();
e = new Date(c);
e.getYear();
O/p: 2019
While working with sorting of date in javascript,I came across that in the above code segment for date operations,when I convert date string to date object and get the time and get back the year using date object I m getting different yeari.e 2019 instead of 2018.How is this possible?