'_wp_mysql_week' => array
( 'week', 'w'
),
'DAYOFYEAR' => array
( 'dayofyear'
),
'DAYOFMONTH' => array
( 'day'
),
'DAYOFWEEK' => array
( 'dayofweek'
),
'WEEKDAY' => array
( 'dayofweek_iso'
),
);
// Check of the possible date units and add them to the query.
foreach ( $date_units as $sql_part =>
$query_parts ) { foreach ( $query_parts as $query_part ) { if ( isset( $query[ $query_part ] ) ) { $value =
$this->
build_value( $compare,
$query[ $query_part ] );
if ( $value ) { switch ( $sql_part ) { case '_wp_mysql_week':
$where_parts[] =
_wp_mysql_week( $column ) . "
$compare $value";
break;
case 'WEEKDAY':
$where_parts[] = "
$sql_part(
$column ) + 1
$compare $value";
break;
default:
$where_parts[] = "
$sql_part(
$column )
$compare $value";
}