# Date filters

```
Frontend Search Settings -> Date filters
```

![](https://i.imgur.com/yAllpov.png)

These options will allow filtering posts, pages (or any CPT) by **publication date**.

There are two date filter options to use:

* *Display 'Posts from date' filter* -> Any objects before this date will be excluded
* *Display 'Posts to date' filter* -> Any objects after this date will be excluded

  Either of the options can be *Disabled* or set to a *Date* or to a *Relative Date*.

## Date vs Relative date

When using the Date, the exact date must be specified to the selector. With the Relative Date, you can use a more dynamic value - such as the current date by default, as it defines a date *before the current date*. Positive values are subtracted from the current date, negative values are added to the current date.

For example, let us assume today is *10th of january 2016*. Changing the relative date to:

*  **1** year, 0 months, 0 days -> will result: 10th of january **2015**
* **-1** year, 0 months, 0 days -> will result: 10th of january **2017**
* 0 year,  **1** months,  **1** days -> will result: **9th** of **december** **2015**
* 0 year, **-1** months, **-1** days -> will result: **11th** of **february** **2016**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.ajaxsearchpro.com/frontend-search-settings/date-selectors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
