Well to do that you have to make both a timestamp(that will bee in EPOCH format, that way you can compare them,
mktime() accepts up to six integer arguments in the
following order:
hour
minute
second
month
day of month
year
so you want to use it like this
$time = mktime(0,0,0,01,01,2002)
that would give you the time stamp for Jan 1, 2002
then once you make them into a timestamp you can compare them