The update, which may be missing or carry anything.
The moment to treat as now, as epoch seconds.
OptionaloffsetAt: PhoneOffset
Reads the phone's offset from UTC, passed only by a spec that stands the phone in another zone. The rounding and the window's last day both go by it. Left out, the rounding reads the phone's clock and the window counts its week exactly as the iCal reader does.
The events in the window, sorted by start. Empty for an update with none.
Turns one calendar plugin update into the events the agenda shows.
Every instance with a start becomes an event, and the list then goes through the window the iCal reader uses. That keeps an event until it ends and up to the end of the sixth day ahead, soonest first, whatever order the plugin sent. The window runs after the rounding, which is what drops yesterday's all-day event on a phone east of UTC, where its UTC end is still hours off.