Jql and endofday function

Hi,

I am trying to adapt this jql to use a number defined in a custom field instead of a fixed variable.

From …
due < endOfDay(“+2”)
To something like …
due < endOfDay("+cycletimefield")

Is there any way to use a variable with endOfDay or is there another approach to identify issues within the user-defined time from due date?

Thanks