apostrophe-events
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -0,1 +1,5 @@ | ||
### 2.1.3 | ||
`upcoming` now takes end time into account. | ||
### 2.1.2 | ||
@@ -2,0 +6,0 @@ |
@@ -8,3 +8,3 @@ var moment = require('moment'); | ||
construct: function(self, options) { | ||
// If set to true, the upcoming flag ensures we | ||
// If set to true, the upcoming flag ensures we | ||
// only get events that haven't already happened. | ||
@@ -40,11 +40,9 @@ self.addFilter('upcoming', { | ||
var now = moment().format('YYYY-MM-DD'); | ||
if (upcoming) { | ||
self.and({ | ||
endDate: { $gte: now }, | ||
end: { $gt: new Date() }, | ||
}); | ||
} else { | ||
self.and({ | ||
endDate: { $lte: now } | ||
end: { $lte: new Date() } | ||
}); | ||
@@ -55,3 +53,3 @@ } | ||
return self.apos.launder.booleanOrNull(s); | ||
} | ||
} | ||
}); | ||
@@ -132,3 +130,3 @@ | ||
}); | ||
// Filter by day, in YYYY-MM-DD format. The event must | ||
@@ -172,3 +170,3 @@ // be taking place during that day (it might surround it). | ||
}); | ||
// Filter for events that are active after a certain date, in YYYY-MM-DD format. | ||
@@ -229,3 +227,3 @@ // The event must end on or after that day. | ||
}); | ||
// Accepted for bc, wraps the date filter | ||
@@ -232,0 +230,0 @@ self.addFilter('date', { |
{ | ||
"name": "apostrophe-events", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "Calendar of events for the Apostrophe content management system", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18005
417
1