Start to merge entries

This commit is contained in:
2021-04-21 18:27:42 +02:00
parent 79b8b8bd3c
commit bcfdb5ffee
3 changed files with 61 additions and 14 deletions

View File

@@ -103,6 +103,15 @@ const ComunicDate = {
ComunicWeb.common.date = ComunicDate;
/**
* Add a day to a date
*
* @param {Date} date Target date
*/
function addOneDay(date) {
return new Date(date.getTime() + 1000*60*60*24);
}
/**
* Get all the days of a specified range
*
@@ -115,8 +124,8 @@ function getDaysOfRange(start, end) {
while (curr < end) {
list.push(curr);
curr = new Date(curr.getTime() + 1000*60*60*24);
curr = addOneDay(curr);
}
return list;
}
}