arthurio / fastapi-filter

Filter and order your endpoints
https://fastapi-filter.netlify.app/
MIT License
208 stars 27 forks source link

Filter a date field by year or month #592

Closed raphodn closed 3 weeks ago

raphodn commented 3 months ago

Hi !

I have a date field, and I can already filter using a basic ?date=2024-06-30

I would like to be able to filter by year and month, for instance :

?date__year=2024
?date__year=2024&date__month=06

(similar to what is possible with the Django ORM)

Thanks in advance !

raphodn commented 3 months ago

Similarly to #556, I ended up patching it directly in my code with :

see this PR changes : https://github.com/openfoodfacts/open-prices/pull/350/files

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.