Issue with gregoriantojd
-
I was having a problem visiting the “Widgets” section in WordPress, and getting an
undefined function gregoriantojd” error. Clearly my site host has not compiled PHP (7.4.3) with--enable-calendar. I tracked the source of the error back toamr-ical-events-list-main.php, functionamr_daysDifferencewhich usesgregoriantojdto calculate the difference between two dates in days. I was able to easily eliminate the problematic calls by replacing the function body withreturn ceil(amr_secondsDifference($beginDate, $endDate)/(60*60*24));which gives a sufficiently accurate result for most purposes. It seems to me this dependency on--enable-calendaris overkill and can be trivially eliminated. See also https://wordpress.org/support/topic/query-string-error/
The topic ‘Issue with gregoriantojd’ is closed to new replies.