Skip to content

Commit

Permalink
fix(graph): Use start and end of day
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco (Valandur) committed Dec 1, 2019
1 parent 55186f8 commit 36ecbd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/invites/commands/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export default class extends Command {
from = to.clone().subtract(DEFAULT_DAYS, 'days');
}

from = from.startOf('day');
to = to.endOf('day');

const days = to.diff(from, 'days');
if (days < 5) {
await this.sendReply(message, t('cmd.graph.minDays', { days: 5 }));
Expand Down

0 comments on commit 36ecbd0

Please sign in to comment.