Page MenuHomePhabricator

Recurring events start generating at range start, but should start generating at (range start - event duration)
Closed, ResolvedPublic

Description

Repro steps:

  • Create a year-long event which recurs daily, starting about a year ago.
  • View the calendar.

Expected results:

  • Each day has about 365 events on it.

Actual results:

  • Days have about 1, 2, 3, 4, 5, 6, etc., events on them.

Discussion:

I think this is because we begin generating instances at the range start, but should actually begin generating them at (range start - event duration).

For example, if a 4-hour recurring event began at 11:30 the night before the 1st of the month on the Calendar view, it won't generate because we start generating instances at 12:00 AM on the 1st. Instead, we should start generating instances at (12:00 AM - 4 hours), i.e. 8:00 PM on the previous day.