Take change of month into account when calculating interval widths

- Fixes #135: Task at month end not getting displayed
This commit is contained in:
Thomas Lauf 2018-05-19 11:28:07 +02:00 committed by lauft
parent a0569bb5b0
commit 543848ae68

View file

@ -540,7 +540,7 @@ static void renderInterval (
auto end_mins = (clipped.range.end.hour () - first_hour) * 60 + clipped.range.end.minute ();
if (clipped.range.end.hour () == 0)
end_mins += (clipped.range.end.day() - clipped.range.start.day()) * 24 * 60;
end_mins += (clipped.range.end.day() + (clipped.range.end.month () - clipped.range.start.month () - 1) * clipped.range.start.day ()) * 24 * 60;
work = clipped.range.total ();