This module provides different filters and arguments for date fields within Views.

Using this, you can include a filter on a date field for 'any day this week' without having to specify what 'this week' means in absolute terms.

You can also use it with Views Arguments to select dates by named periods, for example as a year (2021), a year-and-month (202105), a year-and-week (202144) or a year-month-day (20210315) to select any time within the day. The particular pattern to be used must be specified in advance.

The new options are exposed under the Filter Add dialog of views, which now shows additional entries for date and timestamp fields, as shown here:

Add filter options for 'changed' field, with views_dates installed

Such filters can of course be exposed, and results in a multiple-choice select list, as shown:

Screen grab showing by-day and by-month exposed filter

The module's code is implemented as Views Plugins, and the pattern makes it easy to extend.

Supporting organizations: 
Module creation, maintenance
Extension and D9 compatibility.

Project information

Releases