#16023: Range query on a datetime is NOT inclusive with dates
------------------------------------+-------------------------------
Reporter: jodym@… | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: Documentation
Version: 1.3 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
------------------------------------+-------------------------------
Changes (by aaugustin):
* needs_docs: => 0
* needs_better_patch: => 0
* component: Database layer (models, ORM) => Documentation
* needs_tests: => 0
* stage: Unreviewed => Accepted
Comment:
In Python and many other languages, `i in range(n)` means `0 <= i < n`. If
I want all transactions from April, I'd use:
{{{
start_date = datetime.date(2011, 4, 1)
end_date = datetime.date(2011, 5, 1)
}}}
In my opinion, Django's behavior is consistent, but the doc is misleading
and must be improved.
--
Ticket URL: <https://code.djangoproject.com/ticket/16023#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en.