note 15120 deleted from function.date by jimw

From: Date: Fri, 02 Nov 2001 01:12:31 +0000
Subject: note 15120 deleted from function.date by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20101@lists.php.net to get a copy of this message
Sometimes you have to calculate the years between two dates. i.e. how many years ago ... i.e. how old is my friend ... list($Y,$M,$D)=split("-",date("Y-m-d", strtotime("now"))); list($y,$m,$d)=split("-",date("Y-m-d", strtotime("10/03/1990"))); $age=(($M<$m)||(($M==$m)&&($D<$d)))?($Y-$y-1):($Y-$y); :-) Sandor

« previous php.notes (#20101) next »