core
core copied to clipboard
Add an "exact" parameter to DateFilter
Description
Hi,
Does adding an "exact" setting regarding the date filter seem like something realistic? Although it is possible to obtain the same result via the available settings it could be nice to be able to filter on a very specific date
Example
#[ApiResource(
'operations' => [
new GetCollection()
]
)
#[ApiFilter(DateFilter::class, properties: ['date' => 'exact'])]
class Book
{
private int $id;
private \DateTime $date;
}
Using it would be done as follows:
/api/books?date[exact]=2024-01-16T13:26:00Z
Sure, feel free to open a PR