Could you please tell me that, how can I translate/detecting the following date format 2016-04-29 and get the week name in pure JavaScript or jQuery? i.e Monday, Tuesday, Wednesday
Thanks in advance.
Could you please tell me that, how can I translate/detecting the following date format 2016-04-29 and get the week name in pure JavaScript or jQuery? i.e Monday, Tuesday, Wednesday
Thanks in advance.
The day of the week:
var
d = new Date('2016-04-29'); // April 29, 2016,
days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
days[d.getDay()]; // "Friday"