The issue is with the order of the subtraction. Instead of subtracting now() from the given date, subtract the given date from now(). This will give you a negative value if now() is greater than the given date. Here's the updated code:
In this code, we first subtract 5 minutes from now() and then calculate the difference in minutes between the given date and the result. If the result is negative, we calculate the difference in minutes between the given date and now() minus 5 minutes.
The 2nd parameter again is optional and indicates if you want the return value to be the absolute value or a relative value that might have a - (negative) sign if the passed in date is less than the current instance. This will default to true, return the absolute value.