mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-23 05:20:03 +00:00
Merge remote-tracking branch 'MichMich/master'
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
* @note If http response header mentions that content is gzipped, then uncompress it.
|
* @note If http response header mentions that content is gzipped, then uncompress it.
|
||||||
*/
|
*/
|
||||||
foreach($http_response_header as $c => $h) {
|
foreach($http_response_header as $c => $h) {
|
||||||
if(stristr($h, "content-encoding") and stristr($h, "gzip") {
|
if(stristr($h, "content-encoding") and stristr($h, "gzip")) {
|
||||||
/*
|
/*
|
||||||
* @note Now, let's begin the actual purpose of this function:
|
* @note Now, let's begin the actual purpose of this function:
|
||||||
*/
|
*/
|
||||||
|
@@ -70,8 +70,10 @@ calendar.updateData = function (callback) {
|
|||||||
options.dtstart = e.startDate;
|
options.dtstart = e.startDate;
|
||||||
var rule = new RRule(options);
|
var rule = new RRule(options);
|
||||||
|
|
||||||
// TODO: don't use fixed end date here, use something like now() + 1 year
|
var oneYear = new Date();
|
||||||
var dates = rule.between(new Date(), new Date(2016,11,31), true, function (date, i){return i < 10});
|
oneYear.setFullYear(oneYear.getFullYear() + 1);
|
||||||
|
|
||||||
|
var dates = rule.between(new Date(), oneYear, true, function (date, i){return i < 10});
|
||||||
for (date in dates) {
|
for (date in dates) {
|
||||||
var dt = new Date(dates[date]);
|
var dt = new Date(dates[date]);
|
||||||
var days = moment(dt).diff(moment(), 'days');
|
var days = moment(dt).diff(moment(), 'days');
|
||||||
|
Reference in New Issue
Block a user