Closed tavallaie closed 3 years ago
Thanks for reporting @tavallaie.
Django Jalali just supports __year
filter. Behind the scene, it converts __year
filter to __gte
and __lte
filter. Because it stores date and datetime in the gregorian format in the database. So, by filter(date__year=1400)
Django Jalali converts it to
{'date__gte': jdatetime.datetime(1400, 1, 1, 0, 0), 'date__lte': jdatetime.datetime(1400, 12, 29, 23, 59, 59)}
But, for __month
and __day
and other date-related filters, we cannot do this conversion.
We can add a note to the readme file and inform users about this.
closed due to inactivity
I have this query:
when I filter by month=5, I get:
but in the case of converting to the Gregorian, I get the result as follows:
this bug only appears on month and day, not year: