@playlive/fundraiser-data
    Preparing search index...

    Function selectCurrentFundraisingEvents

    • Narrow a raw cause-level fundraising-event list down to the events that belong to the current Play Live season, newest first.

      Tiltify's cause endpoint returns every event it still lists — years of history — so an event picker needs a season filter. An event is kept when it is published and any of:

      • it was published in the current calendar year; or
      • its name contains the current year (catches events created early, e.g. "PLAY LIVE 2026" published in Dec 2025); or
      • it was published in Nov / Dec of the previous year (the Play Live season opens before New Year).

      Ordering is by published_at descending, with never-published events sorted last.

      Extracted from playlive-layout-builder's useTiltifyCurrentEvents so every consumer applies the same rule.

      Parameters

      Returns TiltifyFundraisingEvent[]

      A new filtered + sorted array. Input is never mutated.

      const events = await fetchTiltifyCurrentEvents();
      selectCurrentFundraisingEvents(events);
      // → [{ name: "PLAY LIVE 2026", … }, { name: "PLAY LIVE 2025", … }]