File event date issue
parent
5c59dac0d5
commit
28d07d34d6
|
|
@ -131,12 +131,12 @@ function addEventsToDB(currentEvents, pageNumber, pageSize, callback){
|
|||
|
||||
function nextDay(startDate, dayOfWeek, hour, minutes, offset){
|
||||
startDate = new Date(startDate);
|
||||
startDate.setDate(startDate.getDate() + (dayOfWeek+(7-startDate.getDay())) % 7);
|
||||
startDate.setDate(startDate.getDate() + (dayOfWeek+(7-startDate.getDay())) % 7);
|
||||
startDate.setHours(hour);
|
||||
startDate.setMinutes(minutes);
|
||||
startDate.setSeconds(0);
|
||||
startDate.setMilliseconds(0);
|
||||
startDate.setTime(startDate.getTime() - (offset * 60000));
|
||||
//startDate.setTime(startDate.getTime() - (offset * 60000));
|
||||
return startDate;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue