diff --git a/static/js/pandora/statisticsDialog.js b/static/js/pandora/statisticsDialog.js index 007bcc011..e3e26f614 100644 --- a/static/js/pandora/statisticsDialog.js +++ b/static/js/pandora/statisticsDialog.js @@ -134,11 +134,11 @@ pandora.ui.statisticsDialog = function() { var city, continent, country, countryData, name = {}, region, split; if (mode == 'all' || item.level != 'guest') { ['firstseen', 'lastseen'].forEach(function(key, i) { - var year = item[key].slice(0, 4) + '-' + key, - month = item[key].slice(0, 7) + '-' + key, - day = item[key].slice(0, 10), + var year = Ox.formatDate(item[key], '%Y') + '-' + key, + month = Ox.formatDate(item[key], '%Y-%m') + '-' + key, + day = Ox.formatDate(item[key], '%Y-%m-%d'), weekday = Ox.formatDate(item[key], '%u'), - hour = item[key].slice(11, 13); + hour = Ox.formatDate(item[key], '%H'); data[mode].year[year] = data[mode].year[year] || {}; data[mode].year[year][month] = (data[mode].year[year][month] || 0) + 1; data[mode].month[month] = (data[mode].month[month] || 0) + 1;