[Django] #30821: Add "iso_week_day" lookup type to DateField/DateTimeField

7 views
Skip to first unread message

Django

unread,
Sep 30, 2019, 5:36:47 PM9/30/19
to django-...@googlegroups.com
#30821: Add "iso_week_day" lookup type to DateField/DateTimeField
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
spookyvision |
Type: | Status: new
Uncategorized |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords: ORM Extract
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
as [https://groups.google.com/forum/#!topic/django-developers/pLS-eKhJBwE
discussed on the mailing list] and
[https://docs.djangoproject.com/en/2.2/ref/models/database-
functions/#extract mentioned by the documentation]: Django's `week_day` is
unusual in that Monday=2.
Rectify this by adding `iso_week_day` with Monday=1 through Sunday=7.

I have checked "has patch" because I have implemented this feature already
and will create a PR

--
Ticket URL: <https://code.djangoproject.com/ticket/30821>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 30, 2019, 5:37:45 PM9/30/19
to django-...@googlegroups.com
#30821: Add "iso_week_day" lookup type to DateField/DateTimeField
-------------------------------------+-------------------------------------
Reporter: spookyvision | Owner:
| spookyvision
Type: Uncategorized | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:

Keywords: ORM Extract | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by spookyvision):

* status: new => assigned
* owner: nobody => spookyvision


--
Ticket URL: <https://code.djangoproject.com/ticket/30821#comment:1>

Django

unread,
Sep 30, 2019, 6:35:01 PM9/30/19
to django-...@googlegroups.com
#30821: Add "iso_week_day" lookup type to DateField/DateTimeField
-------------------------------------+-------------------------------------
Reporter: spookyvision | Owner:
| spookyvision
Type: Uncategorized | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ORM Extract | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by spookyvision):

`tests/timezones/tests.py` tests pass under PostgreSQL, Oracle, SQLite,
and MySQL.

--
Ticket URL: <https://code.djangoproject.com/ticket/30821#comment:2>

Django

unread,
Sep 30, 2019, 6:35:19 PM9/30/19
to django-...@googlegroups.com
#30821: Add "iso_week_day" lookup type to DateField/DateTimeField
-------------------------------------+-------------------------------------
Reporter: spookyvision | Owner:
| spookyvision
Type: Uncategorized | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ORM Extract | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by spookyvision:

Old description:

> as [https://groups.google.com/forum/#!topic/django-developers/pLS-eKhJBwE
> discussed on the mailing list] and
> [https://docs.djangoproject.com/en/2.2/ref/models/database-
> functions/#extract mentioned by the documentation]: Django's `week_day`
> is unusual in that Monday=2.
> Rectify this by adding `iso_week_day` with Monday=1 through Sunday=7.
>
> I have checked "has patch" because I have implemented this feature
> already and will create a PR

New description:

as [https://groups.google.com/forum/#!topic/django-developers/pLS-eKhJBwE
discussed on the mailing list] and
[https://docs.djangoproject.com/en/2.2/ref/models/database-
functions/#extract mentioned by the documentation]: Django's `week_day` is
unusual in that Monday=2.
Rectify this by adding `iso_week_day` with Monday=1 through Sunday=7.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/30821#comment:3>

Django

unread,
Oct 1, 2019, 12:32:24 AM10/1/19
to django-...@googlegroups.com
#30821: Add "iso_week_day" lookup type to DateField/DateTimeField.

-------------------------------------+-------------------------------------
Reporter: spookyvision | Owner:
| spookyvision
Type: New feature | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ORM Extract | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* type: Uncategorized => New feature
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30821#comment:4>

Django

unread,
Oct 1, 2019, 7:49:34 AM10/1/19
to django-...@googlegroups.com
#30821: Add "iso_week_day" lookup type to DateField/DateTimeField.
-------------------------------------+-------------------------------------
Reporter: Anatol Ulrich | Owner: Anatol
| Ulrich

Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ORM Extract | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_docs: 0 => 1
* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/30821#comment:5>

Django

unread,
Oct 2, 2019, 3:15:56 AM10/2/19
to django-...@googlegroups.com
#30821: Add "iso_week_day" lookup type to DateField/DateTimeField.
-------------------------------------+-------------------------------------
Reporter: Anatol Ulrich | Owner: Anatol
| Ulrich
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: ORM Extract | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_docs: 1 => 0
* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin


Comment:

[https://github.com/django/django/pull/11856 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/30821#comment:6>

Django

unread,
Oct 2, 2019, 5:09:00 AM10/2/19
to django-...@googlegroups.com
#30821: Add "iso_week_day" lookup type to DateField/DateTimeField.
-------------------------------------+-------------------------------------
Reporter: Anatol Ulrich | Owner: Anatol
| Ulrich
Type: New feature | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: ORM Extract | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"8ed6788aa479034a44a8aa87da47de56dd728c95" 8ed6788a]:
{{{
#!CommitTicketReference repository=""
revision="8ed6788aa479034a44a8aa87da47de56dd728c95"
Fixed #30821 -- Added ExtractIsoWeekYear database function and
iso_week_day lookup.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30821#comment:7>

Reply all
Reply to author
Forward
0 new messages