javascript: fetch day of the week based on a specific date -
i searched stackoverflow did not find solution problem.
i have specific date 2014-05-20 , want day of week mentioned date.
i tried following
var date = new date(); console.log(date.getday()); but return current day. require day based on given date!
i tried
var givendate = '2014-05-20'; new date(givendate) but above not generate anything.
your question both code combine , check answer on without answer still show code,
check demo jsfiddle
javascript
var givendate = '2014-05-20'; var date = new date(givendate); console.log(date.getday()); console log
2
Comments
Post a Comment