I searched stackoverflow but did not find a solution to my problem.
I have a specific date say 2014-05-20
and I want to get the Day of the week for the mentioned date.
I tried the following
var date = new Date();
console.log(date.getDay());
But this return the Current Day. What I require is the day based on the given date!
I also tried
var givendate = '2014-05-20';
new Date(givendate)
But the above does not generate anything.