Ah, don't bother replying.  The field date_saisie is actually a
DateTime, so that explains it.  Sorry.

On Feb 15, 11:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I don't know if I'm just confused or if it's a bug in Django, but
> here's a little bit of code I put in a shell:
>
> >>> sunday = datetime.date(2006, 12, 3)
> >>> saturday = sunday + datetime.timedelta(days=6)
> >>> next_sunday = sunday + datetime.timedelta(days=7)
> >>> for day in (sunday, saturday, next_sunday): print day.strftime("%A, 
> >>> %d-%b-%Y")
>
> ...
> Sunday, 03-Dec-2006
> Saturday, 09-Dec-2006
> Sunday, 10-Dec-2006
>
> >>> e.get_messages().filter(date_saisie__gte=sunday, 
> >>> date_saisie__lte=saturday).count()
> 63L
> >>> e.get_messages().filter(date_saisie__gte=sunday, 
> >>> date_saisie__lt=next_sunday).count()
> 68L
>
> Why the difference in the number of messages found?  Isn't "<=
> saturday" equivalent to "< next_sunday"?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to