Merge remote-tracking branch 'MichMich/master'

This commit is contained in:
Paul Foster
2016-01-19 16:26:05 +00:00
2 changed files with 8 additions and 6 deletions

View File

@@ -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:
*/ */

View File

@@ -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');