0

Date() daysOfWeek

How to display day of week like Thu or Sat instead of numbers from 0-6?

20th Aug 2020, 4:40 PM
Taib Rasheed
Taib Rasheed - avatar
3 Respostas
20th Aug 2020, 4:53 PM
Divya Mohan
Divya Mohan - avatar
0
var d = new Date(); var weekday = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; console.log(weekday[d.getDay()]);
20th Aug 2020, 4:53 PM
Vadivelan
- 1
Wow thanks guys 👌❤️
20th Aug 2020, 4:57 PM
Taib Rasheed
Taib Rasheed - avatar