Transition to pre-v5.3.0 compatible datediff function