mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-12-08 04:15:28 +00:00
Start to merge entries
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user