[wp-trac] [WordPress Trac] #18694: Improved date arguments for WP_Query
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 18 07:37:40 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 Viper007Bond):
Replying to [comment:10 dd32]:
> Something like this might be usable:
But what about `2011-09` ? Should that be September 1st, 2011 (which is
what `strtotime()` will give you) or should it be any day in September (my
intent). How do you know from the `strtotime()` response that it wasn't
`2011-09-01` that was passed (a specific day rather than a specific
month)?
Perhaps if `is_string()`, then just run it through `strtotime()` and use
the result as-is. This add `6 months ago` and full MySQL date/time support
and users just have to realize that wildcards need to be passed as an
array instead of a partial date/time.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18694#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list