[wp-trac] [WordPress Trac] #38641: Support partial ISO8601 dates in queries

WordPress Trac noreply at wordpress.org
Thu Nov 30 20:20:25 UTC 2017


#38641: Support partial ISO8601 dates in queries
-------------------------+-----------------------------
 Reporter:  rmccue       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  REST API     |     Version:  4.7
 Severity:  normal       |  Resolution:
 Keywords:  4.8-early    |     Focuses:
-------------------------+-----------------------------

Comment (by LaustDeleuran):

 Reacting late to @jnylen0's request to repost my issue from #38986 here.
 Basically, the documentation implies full ISO 8601 compliance, but the API
 only works when you include a full date and time, ie. `YYYY-MM-
 DDTHH:MM:SS`. For instance, this fails, even though I'm passing a valid
 ISO 8601 date:
 http://demo.wp-api.org/wp-json/wp/v2/posts?before=2016-11-29

 The documentation should either specify the specific format that the
 `before`/`after` parameters require, or support full ISO 8601. In my
 opinion, the latter would be preferred.

 Thanks.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38641#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list