PHP checking if two dates differs at least tree months
- by user2301515
In php how to check if one date (given as string) differs to another date at least tree month (unable to find any examples):
$date1 = "2013-11-05";
$date2 = "2013-11-19";
//both dates is in form yyyy.mm.dd
differsTreeMonths($date1,$date2) { ???? return $differs; }
differsTreeMonths("2013-11-05","2014-05-02");//true
differsTreeMonths("2014-01-01","2014-04-01");//true
differsTreeMonths("2014-01-01","2014-03-31");//false
differsTreeMonths("2013-12-01","2014-01-15");//false
etc
Thank you