Skip to content

Allow full date and time when fetching events with time filters #171

@Frewacom

Description

@Frewacom

The current implementation has three different filtering options for time - before, after and date. All of these require the format YYYY-MM-DD. For some cases this works just fine. However, this also means you might not receive all events that you expect.

Consider a scenario where you have a few events that happen today (and no other events) and you want to fetch upcoming and/or past events. Using the after or before filter will both return empty arrays. This is because the actual time (hour) is not taken into consideration. The only way of doing this at the moment is to make two requests, one with before/after and one with date. And even then, you still need to filter the results on the front-end to actually get only the past and upcoming events.

Solution

  • Update the allowed format to include hour and minutes, e.g. YYYY-MM-DDTHH:MM (for the before and after filters).
  • Optionally, allow both the current format and the format above

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiImprovement or changes to the APIbugSomething isn't workingimprovementImprovements to existing code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions