dashboards-stripe-subscriptions
Advanced tools
Comparing version 0.0.4 to 0.0.6
n.n.n / 2014-05-09 | ||
================== | ||
n.n.n / 2014-05-09 | ||
================== | ||
* reverting smoothing --- we dont want smoothing in this lib | ||
n.n.n / 2014-05-08 | ||
@@ -3,0 +13,0 @@ ================== |
30
index.js
@@ -228,3 +228,3 @@ | ||
var subscriptions; | ||
if (start && end) subscriptions = customers.subscriptions(start, end); | ||
if (start && end) subscriptions = customers.subscriptions(floor(start), ceil(end)); | ||
else subscriptions = customers.subscriptions(); | ||
@@ -234,1 +234,29 @@ subscriptions = subscriptions.active().paid(); | ||
}; | ||
/** | ||
* Floor the `date` to the nearest day, | ||
* while keeping in the same locale | ||
* (unlike UTC'ing like Dates.day.floor). | ||
*/ | ||
function floor (date) { | ||
date = new Date(date); | ||
date.setHours(0); | ||
date.setMinutes(0); | ||
date.setSeconds(0); | ||
return date; | ||
} | ||
/** | ||
* Floor the `date` to the nearest day, | ||
* while keeping in the same locale | ||
* (unlike UTC'ing like Dates.day.floor). | ||
*/ | ||
function ceil (date) { | ||
date = new Date(date); | ||
date.setHours(23); | ||
date.setMinutes(59); | ||
date.setSeconds(59); | ||
return date; | ||
} |
{ | ||
"name": "dashboards-stripe-subscriptions", | ||
"version": "0.0.4", | ||
"version": "0.0.6", | ||
"lib": "./lib", | ||
@@ -5,0 +5,0 @@ "repository": "git://github.com/segmentio/dashboards-stripe-subscriptions.git", |
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
12023
218
1