week-header: fix calc of events' start and end positions
Another shot in this issue. Again. https://bugzilla.gnome.org/show_bug.cgi?id=780051
This commit is contained in:
@@ -1630,13 +1630,13 @@ gcal_week_header_add_event (GcalWeekHeader *self,
|
||||
|
||||
/* Start position */
|
||||
if (datetime_compare_date (start_date, week_start) >= 0)
|
||||
start = g_date_time_get_day_of_week (start_date) % 7;
|
||||
start = floor (g_date_time_difference (start_date, week_start) / G_TIME_SPAN_DAY);
|
||||
else
|
||||
start = 0;
|
||||
|
||||
/* End position */
|
||||
if (g_date_time_compare (end_date, week_end) <= 0)
|
||||
end = (g_date_time_get_day_of_week (end_date) - all_day) % 7;
|
||||
end = floor (g_date_time_difference (end_date, week_start) / G_TIME_SPAN_DAY) - all_day;
|
||||
else
|
||||
end = 6;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user