Skip to content

Commit

Permalink
Use dayjs, not moment.js
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Aug 28, 2020
1 parent d30c335 commit bc7e6d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/src/admin/components/StatisticsWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ export default class StatisticsWidget extends DashboardWidget {
let label;

if (period.step < 86400) {
label = moment.unix(i + offset).utc().format('h A');
label = dayjs.unix(i + offset).format('h A');
} else {
label = moment.unix(i + offset).utc().format('D MMM');
label = dayjs.unix(i + offset).format('D MMM');

if (period.step > 86400) {
label += ' - ' + moment.unix(i + offset + period.step - 1).utc().format('D MMM');
label += ' - ' + dayjs.unix(i + offset + period.step - 1).format('D MMM');
}
}

Expand Down

0 comments on commit bc7e6d3

Please sign in to comment.