I think this is a bug; if not, a documentation issue. This statement:
time:difference-between logotime1 logotime2 "DAYOFYEAR"
produced a value of -29219 when logotime1 is 12/18/2315 and logotime2 is 12/18/2235
If the difference in "DAYOFYEAR" units is the difference in the julian date, then it should be between -365 and +365. Instead it seems that we are getting the difference in total days.