mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
calendar: fix space vs tab into caledarfetcher.js
This commit is contained in:
parent
c4e01fa566
commit
1fa5c53b72
@ -80,7 +80,7 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
endDate = moment(startDate).add(1, "days");
|
endDate = moment(startDate).add(1, "days");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// calculate the duration f the event for use with recurring events.
|
// calculate the duration f the event for use with recurring events.
|
||||||
var duration = parseInt(endDate.format("x")) - parseInt(startDate.format("x"));
|
var duration = parseInt(endDate.format("x")) - parseInt(startDate.format("x"));
|
||||||
@ -96,10 +96,10 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
title = event.description;
|
title = event.description;
|
||||||
}
|
}
|
||||||
|
|
||||||
var location = event.location || false;
|
var location = event.location || false;
|
||||||
var geo = event.geo || false;
|
var geo = event.geo || false;
|
||||||
var description = event.description || false;
|
var description = event.description || false;
|
||||||
|
|
||||||
if (typeof event.rrule != "undefined" && !isFacebookBirthday) {
|
if (typeof event.rrule != "undefined" && !isFacebookBirthday) {
|
||||||
var rule = event.rrule;
|
var rule = event.rrule;
|
||||||
var dates = rule.between(today, future, true, limitFunction);
|
var dates = rule.between(today, future, true, limitFunction);
|
||||||
@ -114,9 +114,9 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
endDate: endDate.format("x"),
|
endDate: endDate.format("x"),
|
||||||
fullDayEvent: isFullDayEvent(event),
|
fullDayEvent: isFullDayEvent(event),
|
||||||
firstYear: event.start.getFullYear(),
|
firstYear: event.start.getFullYear(),
|
||||||
location: location,
|
location: location,
|
||||||
geo: geo,
|
geo: geo,
|
||||||
description: description
|
description: description
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -140,18 +140,18 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Every thing is good. Add it to the list.
|
// Every thing is good. Add it to the list.
|
||||||
|
|
||||||
newEvents.push({
|
newEvents.push({
|
||||||
title: title,
|
title: title,
|
||||||
startDate: startDate.format("x"),
|
startDate: startDate.format("x"),
|
||||||
endDate: endDate.format("x"),
|
endDate: endDate.format("x"),
|
||||||
fullDayEvent: fullDayEvent,
|
fullDayEvent: fullDayEvent,
|
||||||
location: location,
|
location: location,
|
||||||
geo: geo,
|
geo: geo,
|
||||||
description: description
|
description: description
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,7 +198,7 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
|
|
||||||
if (end - start === 24 * 60 * 60 * 1000 && startDate.getHours() === 0 && startDate.getMinutes() === 0) {
|
if (end - start === 24 * 60 * 60 * 1000 && startDate.getHours() === 0 && startDate.getMinutes() === 0) {
|
||||||
// Is 24 hours, and starts on the middle of the night.
|
// Is 24 hours, and starts on the middle of the night.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user