Pebble App Framework: Phone API
    Preparing search index...

    Function upcomingWindow

    • Keeps the events the agenda shows, soonest first.

      An event stays while it has not finished and its start is inside the window. Testing against its end means a meeting in progress still counts as current.

      Parameters

      • events: CalendarEvent[]

        The events to filter. The list is not changed.

      • nowSeconds: number

        The moment to treat as now, as epoch seconds.

      • horizon: number = ...

        The window's last second, as horizonFor gives it for now. A reader that already worked it out passes the same value, so its walk and this filter stop at the same second.

      Returns CalendarEvent[]

      A new list of the events in the window, sorted by start.