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

WordPress Trac noreply at wordpress.org
Thu Nov 3 01:17:40 UTC 2016


#38641: Support partial ISO8601 dates in queries
-------------------------+-----------------------------
 Reporter:  rmccue       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Right now, we support sending `date` or `modified` with a full ISO 8601
 date (`yyyy-mm-ddThh:ii:ssZ`), and we also support `before` and `after`.
 However, there's no easy way to get posts for a certain month, without
 building the `before` and `after` yourself.

 [https://en.wikipedia.org/wiki/ISO_8601 ISO 8601] gives us a way to
 specify partial dates: `yyyy` and `yyyy-mm` are both valid, and we could
 totally support them. This avoids the need for a separate `year` or
 `month` query parameter. Internally, this can map to `before` and `after`
 values.

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


More information about the wp-trac mailing list