1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

Clean up some variable/method names

This commit is contained in:
Toby Zerner
2017-12-19 08:57:55 +10:30
parent d827fd36fe
commit 88228df6f2
3 changed files with 18 additions and 22 deletions

View File

@@ -41,9 +41,9 @@ System.register('flarum/statistics/components/StatisticsWidget', ['flarum/compon
// reset to the first hour of the day, and then convert back into UTC time.
// We'll be working with seconds rather than milliseconds throughout too.
var today = new Date();
today.setTime(today.getTime() + app.data.statistics.utcOffset * 1000);
today.setTime(today.getTime() + app.data.statistics.timezoneOffset * 1000);
today.setUTCHours(0, 0, 0, 0);
today.setTime(today.getTime() - app.data.statistics.utcOffset * 1000);
today.setTime(today.getTime() - app.data.statistics.timezoneOffset * 1000);
today = today / 1000;
this.entities = ['users', 'discussions', 'posts'];
@@ -143,7 +143,7 @@ System.register('flarum/statistics/components/StatisticsWidget', ['flarum/compon
return;
}
var offset = app.data.statistics.utcOffset;
var offset = app.data.statistics.timezoneOffset;
var period = this.periods[this.selectedPeriod];
var periodLength = period.end - period.start;
var labels = [];

View File

@@ -24,9 +24,9 @@ export default class StatisticsWidget extends DashboardWidget {
// reset to the first hour of the day, and then convert back into UTC time.
// We'll be working with seconds rather than milliseconds throughout too.
let today = new Date();
today.setTime(today.getTime() + app.data.statistics.utcOffset * 1000);
today.setTime(today.getTime() + app.data.statistics.timezoneOffset * 1000);
today.setUTCHours(0, 0, 0, 0);
today.setTime(today.getTime() - app.data.statistics.utcOffset * 1000);
today.setTime(today.getTime() - app.data.statistics.timezoneOffset * 1000);
today = today / 1000;
this.entities = ['users', 'discussions', 'posts'];
@@ -99,7 +99,7 @@ export default class StatisticsWidget extends DashboardWidget {
return;
}
const offset = app.data.statistics.utcOffset;
const offset = app.data.statistics.timezoneOffset;
const period = this.periods[this.selectedPeriod];
const periodLength = period.end - period.start;
const labels = [];