diff --git a/js/clockIn.js b/js/clockIn.js index ae7f839..909c2bf 100644 --- a/js/clockIn.js +++ b/js/clockIn.js @@ -93,7 +93,7 @@ function getInfo() { } function printTimetable(timetable) { - var listWeekName = printWeek(); + var listWeekName = weekDays(); var dated = new Date(); dated.setDate(dated.getDate() - 6); @@ -172,25 +172,21 @@ function printTotalHours(timetable) { } -function printWeek() { - var listWeekName = []; - var curr = new Date(); - for (var i = 0; i < 7; i++) { - curr.setDate(curr.getDate() - 1); - listWeekName.push(weekDays[curr.getDay()]); - } - return listWeekName; +function weekDays() { + var weekDays = [ + 'Domingo', + 'Lunes', + 'Martes', + 'Miércoles', + 'Jueves', + 'Viernes', + 'Sábado' + ]; + + return weekDays; } -var weekDays = [ - 'Domingo', - 'Sábado', - 'Viernes', - 'Jueves', - 'Miércoles', - 'Martes', - 'Lunes' -]; + function printErrores(errores) { var error ='';