Skip to content

Commit

Permalink
Added day of week labels to the Dailies History. (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlakeTNC committed Nov 6, 2022
1 parent 15e91cf commit c6d84ea
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion habitrpg_user_data_display.html
Expand Up @@ -2275,6 +2275,15 @@
var id = 'dailiesHistorySection';
var title = 'Dailies History';
var orderId = 'dailiesHistory';

var weekdayArray=new Array(7);
weekdayArray[0]="Mo";
weekdayArray[1]="Tu";
weekdayArray[2]="We";
weekdayArray[3]="Th";
weekdayArray[4]="Fr";
weekdayArray[5]="Sa";
weekdayArray[6]="Su";

// preprocess the Dailies to find all the dates on which data
// exists, and to work out if each day was a success or fail
Expand Down Expand Up @@ -2334,8 +2343,10 @@
missingDate = 'missingDate';
}
}
var weekdayText = weekdayArray[date.getDay()];
headerRow += '<th class="' + missingDate + '">' +
allDatesInOrder[i] + '&nbsp;</th>';
allDatesInOrder[i] + '<br/><br/>' +
weekdayText + '&nbsp;</th>';
previousDate = date;
}
headerRow += '</tr></thead>';
Expand Down

0 comments on commit c6d84ea

Please sign in to comment.