PHP `DateTime::days` returns trash?
问题 PHP Class DateInterval has a property "days". According to the manual it returns "Total number of days the interval spans. If this is unknown, days will be FALSE." In my case the code: $d = new DateInterval('P1Y'); echo $d->days; returns -99999 and a code like this $a = DateTime::createFromFormat("d.m.Y", "01.01.2010"); $b = DateTime::createFromFormat("d.m.Y", "03.01.2010"); $d = $b->diff($a); echo $d->days; returns 6015 Did I misunderstand something? 回答1: DateInterval is buggy on windows