Problem/Motivation
When a custom "First day of week" is chosen, DateHelper::weekDaysOrdered() rekeys the result, so the 0th day corresponds to the first day.
This breaks expectations of projects like Calendar and Station module, who still internally consider Sunday the 0th day, and work with the "first day" setting.
Proposed resolution
Do not rekey when reordering.
Remaining tasks
N/A
User interface changes
N/A
API changes
Barely.
Data model changes
N/A
Important for RC: contributed project blocker. This code was moved into core for D8, and ideally should be correct.
Comment | File | Size | Author |
---|---|---|---|
#16 | interdiff.txt | 808 bytes | tim.plunkett |
#16 | 2606934-datehelper-16.patch | 4.21 KB | tim.plunkett |
Comments
Comment #2
tim.plunkettComment #3
alexpottSetting the correct version
Comment #4
tim.plunkettWhoops, thanks. Reuploading to get the bot to run
Comment #6
dawehnerLooks great for me! In an ideal world, the helper would not be a static method, but we cannot change this anymore, I guess and its out of scope of this issue.
PS: Does someone mind to document that we need assertSame due to checking for the array order?
Comment #7
tim.plunkettFair point.
Comment #8
dawehnerThank you!
Comment #11
tim.plunkettComment #12
xjm@effulgentsia and I agreed that this is definitely a valid RC target as a contrib blocker and non-disruptive bugfix.
Comment #14
tim.plunkettUnrelated fail, the recent testrun passed.
Comment #15
alexpottWe should be documenting the expectation on the return value of
DateHelper::weekDaysOrdered()
Comment #16
tim.plunkettComment #17
alexpottCommitted 235472c and pushed to 8.0.x. Thanks!