#28103: Add "quarter" lookup to DateField/DateTimeField
-------------------------------------+-------------------------------------
     Reporter:  Matthew Pava         |                    Owner:  Mads
                                     |  Jensen
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  ORM Extract Trunc    |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mads Jensen):

 Oracle and PostgreSQL have built-in functionality for truncating a date to
 the first month of a quarter. However, in Oracle, it rounds up
 (https://docs.oracle.com/database/121/SQLRF/functions271.htm#SQLRF52058)
 and in PostgreSQL, it's always rounded down
 (https://www.postgresql.org/docs/current/static/functions-datetime.html
 #FUNCTIONS-DATETIME-TRUNC). Neither SQLite or MySQL has a convenient
 built-in functionality and it's a matter of interpretation.

 The Extract functionality is implemented, and has the same behavior on all
 backends.

--
Ticket URL: <https://code.djangoproject.com/ticket/28103#comment:6>
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/064.adce45678adc3820cc67954bbbbf0e3f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to