在 php 中如何检查一个日期(以字符串形式给出)是否与另一个日期至少三个月不同(找不到任何示例):
$date1 = "2013-11-05";
$date2 = "2013-11-19";
//both dates is in form yyyy.mm.dd
differsThreeMonths($date1,$date2) { ???? return $differs; }
differsThreeMonths("2013-11-05","2014-05-02");//true
differsThreeMonths("2014-01-01","2014-04-01");//true
differsThreeMonths("2014-01-01","2014-03-31");//false
differsThreeMonths("2013-12-01","2014-01-15");//false
etc
谢谢