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){
|
function nextDay(startDate, dayOfWeek, hour, minutes, offset){
|
||||||
startDate = new Date(startDate);
|
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.setHours(hour);
|
||||||
startDate.setMinutes(minutes);
|
startDate.setMinutes(minutes);
|
||||||
startDate.setSeconds(0);
|
startDate.setSeconds(0);
|
||||||
startDate.setMilliseconds(0);
|
startDate.setMilliseconds(0);
|
||||||
startDate.setTime(startDate.getTime() - (offset * 60000));
|
//startDate.setTime(startDate.getTime() - (offset * 60000));
|
||||||
return startDate;
|
return startDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue