#3945 Orden días de la semana incorrectos
gitea/worker-time-control/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Andrés 2022-05-24 16:15:19 +02:00
parent 517a7077f1
commit b7117e1cae
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,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 ='';