FIX: counters were showing future instead of past (#6299)

This commit is contained in:
Joffrey JAFFEUX
2018-08-22 12:37:05 +02:00
committed by GitHub
parent 599cebf8ad
commit 87d443f070
5 changed files with 139 additions and 1 deletions

View File

@ -42,6 +42,15 @@ export default Ember.Mixin.create({
.subtract(1, "week");
},
@computed()
lastMonth() {
return moment()
.locale("en")
.utc()
.startOf("day")
.subtract(1, "month");
},
@computed()
endDate() {
return moment()
@ -51,6 +60,14 @@ export default Ember.Mixin.create({
.endOf("day");
},
@computed()
today() {
return moment()
.locale("en")
.utc()
.endOf("day");
},
actions: {
changePeriod(period) {
DiscourseURL.routeTo(this._reportsForPeriodURL(period));