mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-13 23:55:11 +00:00
@@ -63,15 +63,17 @@ calendar.updateData = function (callback) {
|
||||
}
|
||||
e.seconds = seconds;
|
||||
}
|
||||
|
||||
|
||||
// Special handling for rrule events
|
||||
if (e.RRULE) {
|
||||
var options = new RRule.parseString(e.RRULE);
|
||||
options.dtstart = e.startDate;
|
||||
var rule = new RRule(options);
|
||||
|
||||
// TODO: don't use fixed end date here, use something like now() + 1 year
|
||||
var dates = rule.between(new Date(), new Date(2016,11,31), true, function (date, i){return i < 10});
|
||||
|
||||
var oneYear = new Date();
|
||||
oneYear.setFullYear(oneYear.getFullYear() + 1);
|
||||
|
||||
var dates = rule.between(new Date(), oneYear, true, function (date, i){return i < 10});
|
||||
for (date in dates) {
|
||||
var dt = new Date(dates[date]);
|
||||
var days = moment(dt).diff(moment(), 'days');
|
||||
@@ -84,7 +86,7 @@ calendar.updateData = function (callback) {
|
||||
var time_string = moment(dt).calendar()
|
||||
}
|
||||
this.eventList.push({'description':e.SUMMARY,'seconds':seconds,'days':time_string});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
//defaults
|
||||
$.feedToJson.defaults = {
|
||||
yqlURL : 'http://query.yahooapis.com/v1/public/yql', //yql
|
||||
yqlURL : 'https://query.yahooapis.com/v1/public/yql', //yql
|
||||
yqlQS : '?format=json&callback=?&q=select%20*%20from%20rss%20where%20url%3D', //yql query string
|
||||
feed:'http://instagr.am/tags/tacos/feed/recent.rss', //instagram recent posts tagged 'tacos'
|
||||
cachebuster: Math.floor((new Date().getTime()) / 1200 / 1000), //yql caches feeds, so we change the feed url every 20min
|
||||
@@ -29,6 +29,4 @@
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
// eo feedToJson
|
||||
|
||||
|
||||
// eo feedToJson
|
@@ -6,7 +6,7 @@ var news = {
|
||||
newsLocation: '.news',
|
||||
newsItems: [],
|
||||
seenNewsItem: [],
|
||||
_yqURL: 'http://query.yahooapis.com/v1/public/yql',
|
||||
_yqURL: 'https://query.yahooapis.com/v1/public/yql',
|
||||
_yqlQS: '?format=json&q=select%20*%20from%20rss%20where%20url%3D',
|
||||
_cacheBuster: Math.floor((new Date().getTime()) / 1200 / 1000),
|
||||
_failedAttempts: 0,
|
||||
|
Reference in New Issue
Block a user