On Apr 15, 1:14 pm, Aymeric Augustin
<aymeric.augus...@polytechnique.org> wrote:
> On 14 avr. 2012, at 21:25, Evan Carmi wrote:
>
> > >>> Poll.objects.filter(pub_date__year=1) #We should get the poll p (but we 
> > >>> don't)
> > []
>
> The docs [1] say that the __year lookup "takes a four digit year". I'm not 
> sure what this means exactly for years < 1000!
>
> It looks like it's possible to improve either the code or the docs, so it's 
> worth filing a ticket in Trac.

I guess we can't fix the code in a way that the meaning of
pub_date__year=1 changes. Would it be possible to change the code so
that '0001' is treated as year 1, and the integer 1 is treated as it
is now? Or maybe allow datetime objects as arguments to the year
lookup, then datetime(year=1) could be treated differently from
integer 1.

 - Anssi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to