I would like to compare the two dates ,one date is which the 02 aug 1921 , and the second date is present date.How to compare the old date and present date day and month .if
Probably the most straight forward way is strtotime and date.
$date1 = '1 Aug 2012'; $date2 = '1 Aug 1912'; if (date('m-d', strtotime($date1)) === date('m-d', strtotime($date2)) { }