The easy way to find the difference between two datetime values is to convert them to a UNIX Timestamp and take the difference between them. There are examples in the Code Snippet library on this site. But all you need is to use mktime() to get the timestamp (number of seconds since Jan 1, 1970).
There are 86400 seconds in a day (246060), check if the difference between the two timestamps is more than 86400 * the number of days.
This calculation is a one liner that should become a "design pattern" you recognize and code without a second thought (pun intended).