#30602: ExtractYear lookups on a DurationField fails
-------------------------------------+-------------------------------------
     Reporter:  cecedille1           |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 As I mentioned on the ticket `Extract` functions don't explicitly support
 `DurationField`; it's not documented nor tested. They happen to work for
 PostgreSQL because `EXTRACT(component FROM ::interval)` happens to work
 but that's just a coincidence.

 I'm not sure if this ticket should be closed as invalid or repurposed as a
 feature request to add tested support. We'll have to come with with a way
 of defining units such as years though, do we want to consider them as
 `365.25` days?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30602#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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.417e9762cc9f2954b3dfe186656eba7c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to