Merge pull request '#3945 Orden días de la semana incorrectos' (#8) from test into master
gitea/worker-time-control/pipeline/head This commit looks good Details

Reviewed-on: #8
This commit is contained in:
Carlos Andrés 2022-05-24 14:19:18 +00:00
commit d86a7aa71a
1 changed files with 14 additions and 18 deletions

View File

@ -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,26 +172,22 @@ 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',
'Sábado',
'Viernes',
'Jueves',
'Miércoles',
'Lunes',
'Martes',
'Lunes'
'Miércoles',
'Jueves',
'Viernes',
'Sábado'
];
return weekDays;
}
function printErrores(errores) {
var error ='';
for (var i = 0; i < errores.length; i++) {