[wp-trac] [WordPress Trac] #18694: Improved date arguments for WP_Query

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 31 06:33:05 UTC 2012


#18694: Improved date arguments for WP_Query
-------------------------------------------------+-------------------------
 Reporter:  Viper007Bond                         |       Owner:
     Type:  enhancement                          |  viper007bond
 Priority:  normal                               |      Status:  new
Component:  General                              |   Milestone:  Awaiting
 Severity:  normal                               |  Review
 Keywords:  has-patch needs-testing needs-unit-  |     Version:  3.3
  tests                                          |  Resolution:
-------------------------------------------------+-------------------------

Comment (by Viper007Bond):

 When passing an array to `before`, items default to the current year and
 the minimum values for everything else.

 For `after`, perhaps these values should default to the maximum, for cases
 like this:

 {{{
 'date_query' => array(
         array(
                 'after' => array(
                         'year'  => 2009,
                 ),
         ),
 ),
 }}}


 Currently that would mean after January 1st, 2009 rather than anything
 from the year 2010 or newer, which could be confusing.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18694#comment:44>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list