[wp-trac] [WordPress Trac] #29908: date_query inclusive logic still not quite right

WordPress Trac noreply at wordpress.org
Fri Oct 17 02:27:47 UTC 2014


#29908: date_query inclusive logic still not quite right
-------------------------------------+---------------------------
 Reporter:  magicroundabout          |       Owner:  boonebgorges
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  4.1
Component:  Query                    |     Version:  4.0
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------------
Changes (by boonebgorges):

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


Comment:

 In [changeset:"29936"]:
 {{{
 #!CommitTicketReference repository="" revision="29936"
 Better "inclusive" support for string values in WP_Date_Query.

 The 'inclusive' parameter for WP_Date_Query determines whether non-precise
 dates for 'before' and 'after' will be rounded up or down. Previously,
 this was
 supported only when 'before' and 'after' were arrays; string-formatted
 dates
 were run through strtotime(), which rounded them all down (inclusive in
 the
 case of after, non-inclusive in the case of before). Now, we attempt to
 parse
 formats that look like MySQL-formatted date strings, and apply inclusive
 logic
 to them if we recognize them successfully.

 Fixes #29908.
 string values. Array values support the 'inclusive
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29908#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list