(array) (Required) Array of date query clauses. -
'...$0'
(array) -
'column'
(string) Optional. The column to query against. If undefined, inherits the value of the $default_column
parameter. Accepts 'post_date', 'post_date_gmt', 'post_modified','post_modified_gmt', 'comment_date', 'comment_date_gmt'. Default 'post_date'. -
'compare'
(string) Optional. The comparison operator. Accepts '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. Default '='. -
'relation'
(string) Optional. The boolean relationship between the date queries. Accepts 'OR' or 'AND'. Default 'OR'. -
'...$0'
(array) Optional. An array of first-order clause parameters, or another fully-formed date query. -
'before'
(string|array) Optional. Date to retrieve posts before. Accepts strtotime()
-compatible string, or array of 'year', 'month', 'day' values. -
'year'
(string) The four-digit year. Default empty. Accepts any four-digit year. -
'month'
(string) Optional when passing array.The month of the year. Default (string:empty)|(array:1). Accepts numbers 1-12. -
'day'
(string) Optional when passing array.The day of the month. Default (string:empty)|(array:1). Accepts numbers 1-31.
-
'after'
(string|array) Optional. Date to retrieve posts after. Accepts strtotime()
-compatible string, or array of 'year', 'month', 'day' values. -
'year'
(string) The four-digit year. Accepts any four-digit year. Default empty. -
'month'
(string) Optional when passing array. The month of the year. Accepts numbers 1-12. Default (string:empty)|(array:12). -
'day'
(string) Optional when passing array.The day of the month. Accepts numbers 1-31. Default (string:empty)|(array:last day of month).
-
'column'
(string) Optional. Used to add a clause comparing a column other than the column specified in the top-level $column
parameter. Accepts 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt', 'comment_date', 'comment_date_gmt'. Default is the value of top-level $column
. -
'compare'
(string) Optional. The comparison operator. Accepts '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. 'IN', 'NOT IN', 'BETWEEN', and 'NOT BETWEEN'. Comparisons support arrays in some time-related parameters. Default '='. -
'inclusive'
(bool) Optional. Include results from dates specified in 'before' or 'after'. Default false. -
'year'
(int|array) Optional. The four-digit year number. Accepts any four-digit year or an array of years if $compare
supports it. Default empty. -
'month'
(int|array) Optional. The two-digit month number. Accepts numbers 1-12 or an array of valid numbers if $compare
supports it. Default empty. -
'week'
(int|array) Optional. The week number of the year. Accepts numbers 0-53 or an array of valid numbers if $compare
supports it. Default empty. -
'dayofyear'
(int|array) Optional. The day number of the year. Accepts numbers 1-366 or an array of valid numbers if $compare
supports it. -
'day'
(int|array) Optional. The day of the month. Accepts numbers 1-31 or an array of valid numbers if $compare
supports it. Default empty. -
'dayofweek'
(int|array) Optional. The day number of the week. Accepts numbers 1-7 (1 is Sunday) or an array of valid numbers if $compare
supports it. Default empty. -
'dayofweek_iso'
(int|array) Optional. The day number of the week (ISO). Accepts numbers 1-7 (1 is Monday) or an array of valid numbers if $compare
supports it. Default empty. -
'hour'
(int|array) Optional. The hour of the day. Accepts numbers 0-23 or an array of valid numbers if $compare
supports it. Default empty. -
'minute'
(int|array) Optional. The minute of the hour. Accepts numbers 0-60 or an array of valid numbers if $compare
supports it. Default empty. -
'second'
(int|array) Optional. The second of the minute. Accepts numbers 0-60 or an array of valid numbers if $compare
supports it. Default empty. }