別の房が背伸びした。

return !(!(p1->year - p2->year))*(!(p1->month - p2->month))*(!(p1->day - p2->day))

かなり自身が無いらしい