Also, shouldn't the comparison operator be just less than? If it's equal it's not past but present (or, to be more precise concurrent with the second date, since that could be any point in time)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just a point - your routine has a side effect of actually modifying the date you passed in... Seems unwise. Perhaps:
Also, shouldn't the comparison operator be just less than? If it's equal it's not past but present (or, to be more precise concurrent with the second date, since that could be any point in time)