01-edu / public

📚 @01-edu's Public Repository
http://public.01-edu.org/
222 stars 447 forks source link

[STALE][BUG] `sunny-sunday` subject #2597

Closed mariechantale closed 2 months ago

mariechantale commented 3 months ago

sunny-sunday

sunny-sunday.js

function sunnySunday(date) { const daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; const dayIndex = Math.floor((date.getTime() - new Date('0001-01-01').getTime()) / (24 60 60 * 1000)) % 6; return daysOfWeek[dayIndex]; }

MSilva95 commented 3 months ago

Hello @mariechantale! Did you find any problem with this exercise? Please provide some details. Thank you!