- πΊπΈUnited States smustgrave
This still needs a test case
Also would be helpful to have steps to reproduce this issue.
- πΊπΈUnited States mortona2k Seattle
I added steps to create a view that triggers the error and is fixed with this patch.
- πΊπΈUnited States mortona2k Seattle
There are two very different approaches in the patches here.
#11 has:
+ if (is_string($value)) { + if (strtotime($value) !== FALSE) { + $value = date("Y", strtotime($value)); + } + }
This will convert date strings to year.
#18 has:
+ if (is_string($value)) { + $value = (float) $value; + }
This will convert a date string to to a number like 2025.0.
A patch in #3338895 has:
+ $value = round((float) $value, $precision);
Basically the same as #18, without the check for a string.
I bundled them all together and came up with this:
if (is_string($value)) { if (strtotime($value) !== FALSE) { $value = date("U", strtotime($value)); } } $value = round((float) $value, $precision);
Now a date string is converted to a timestamp. However, I'm not sure if this does anything for the max comparison, or if this just rendering the value afterwards.