Views with variable date logic

One solution that comes to mind is to have an index that emits the end date in its key, either as ISO8601 (sortable strings) or using the built-in function dateToArray() to get an array.

Before querying you take the current date and adds e.g. 3 days to it so you get an end date.

Then you can query the index with endkey=“enddate”