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

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 18 03:44:22 UTC 2011


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

Comment (by johnbillion):

 Replying to [comment:4 Viper007Bond]:
 > {{{
 > // Is this even possible?
 > 'dayofweek' => array( 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
 'Friday' )
 > }}}
 Should be able to do this with MySQL's `DAYOFWEEK()` function, eg. to
 select all weekend posts:
 {{{
 WHERE DAYOFWEEK( post_date ) IN ( 1, 7 )
 }}}

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


More information about the wp-trac mailing list