@atombender/hydrant-api
Advanced tools
Comparing version 0.0.33 to 0.0.34
@@ -19,2 +19,4 @@ 'use strict'; | ||
require('moment-timezone'); | ||
var _atombenderUtils = require('@atombender/utils'); | ||
@@ -56,23 +58,23 @@ | ||
}), new Timeframe('last_hour', 'Last hour', function (now) { | ||
return _moment2['default'].range(now.startOf('hour'), now); | ||
return _moment2['default'].range(now.clone().startOf('hour'), now); | ||
}), new Timeframe('today', 'Today', function (now) { | ||
return _moment2['default'].range(now.startOf('day'), now); | ||
return _moment2['default'].range(now.clone().startOf('day'), now); | ||
}), new Timeframe('yesterday', 'Yesterday', function (now) { | ||
return _moment2['default'].range(now.startOf('day').subtract(1, 'days'), now.startOf('day')); | ||
return _moment2['default'].range(now.clone().startOf('day').subtract(1, 'days'), now.clone().startOf('day')); | ||
}), new Timeframe('this_week', 'This week to date', function (now) { | ||
return _moment2['default'].range(now.startOf('week'), now); | ||
return _moment2['default'].range(now.clone().startOf('week'), now); | ||
}), new Timeframe('last_week', 'Last week', function (now) { | ||
return _moment2['default'].range(now.startOf('week').subtract(1, 'weeks'), now.startOf('week')); | ||
return _moment2['default'].range(now.clone().startOf('week').subtract(1, 'weeks'), now.clone().startOf('week')); | ||
}), new Timeframe('last_2_weeks', 'Last 2 weeks', function (now) { | ||
return _moment2['default'].range(now.startOf('day').subtract(2, 'weeks'), now); | ||
return _moment2['default'].range(now.clone().startOf('day').subtract(2, 'weeks'), now); | ||
}), new Timeframe('last_4_weeks', 'Last 4 weeks', function (now) { | ||
return _moment2['default'].range(now.startOf('day').subtract(4, 'weeks'), now); | ||
return _moment2['default'].range(now.clone().startOf('day').subtract(4, 'weeks'), now); | ||
}), new Timeframe('this_month', 'This month to date', function (now) { | ||
return _moment2['default'].range(now.startOf('month'), now); | ||
return _moment2['default'].range(now.clone().startOf('month'), now); | ||
}), new Timeframe('last_month', 'Last month', function (now) { | ||
return _moment2['default'].range(now.startOf('month').subtract(1, 'months'), now.startOf('month')); | ||
return _moment2['default'].range(now.clone().startOf('month').subtract(1, 'months'), now.clone().startOf('month')); | ||
}), new Timeframe('this_year', 'This year to date', function (now) { | ||
return _moment2['default'].range(now.startOf('year'), now); | ||
return _moment2['default'].range(now.clone().startOf('year'), now); | ||
}), new Timeframe('last_year', 'Last year', function (now) { | ||
return _moment2['default'].range(now.startOf('year').subtract(1, 'year'), now.startOf('year')); | ||
return _moment2['default'].range(now.clone().startOf('year').subtract(1, 'year'), now.clone().startOf('year')); | ||
})]; | ||
@@ -79,0 +81,0 @@ |
{ | ||
"name": "@atombender/hydrant-api", | ||
"version": "0.0.33", | ||
"version": "0.0.34", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123226
3233