// Guard again accidental ommission of `analytics:` prefix
// Guard against accidental ommission of `analytics:` prefix
if(!set.startsWith('analytics:')){
set='analytics:'+set;
}
constdaysArr=[];
day=newDate(day);
day.setDate(day.getDate()+1);// set the date to tomorrow, because getHourlyStatsForSet steps *backwards* 24 hours to sum up the values
day.setDate(day.getDate()+2);// set the date to the day after tomorrow, because getHourlyStatsForSet steps *backwards* 24 hours to sum up the values, and we also want today's values