[wp-trac] [WordPress Trac] #28063: 'dayofweek' deviates from ISO-8601

WordPress Trac noreply at wordpress.org
Sun Oct 12 00:06:40 UTC 2014


#28063: 'dayofweek' deviates from ISO-8601
-------------------------+-----------------------------
 Reporter:  mboynes      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Query        |     Version:  3.7
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:   => needs-patch
 * version:   => 3.7
 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks for the patches, and ugh. :)

 You are correct that we can't change the behavior of the existing
 parameter. 'dayofweek' has to stay the way it is.

 I lean toward adding a new parameter, and at the same time not deprecating
 'dayofweek'. I don't think there's anything wrong with having formal
 support for both the MySQL standard and the ISO standard. So I definitely
 would not remove the documentation or unit test for 'dayofweek' as you've
 done in your patches. If anything, I would expand the relevant
 documentation to make it clearer what the param does. We should do this
 regardless of whether we add another param.

 I'm not thrilled with the choice of 'weekday' for the name of the ISO-
 compliant param. One, it's got a connotation of M-F. Two, as noted in your
 patch, MySQL's `WEEKDAY` sets Monday to index 0 and Tuesday to 1. (Like I
 said, ugh.) How about something like 'dayofweek_iso'?

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


More information about the wp-trac mailing list