note 57474 deleted from function.time by aidan

From: Date: Sat, 08 Oct 2005 01:01:54 +0000
Subject: note 57474 deleted from function.time by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96593@lists.php.net to get a copy of this message
Note Submitter: darkrealm dot drjj at gmail dot com ---- if you ask me this would be a lot better (and more precies) <?php else if($elapsedTime<(60*60*24*365*2)) {//if the given timestamp is less the 24 months ago, display MONTHS $years = date("Y",$elapsedTime) // (just you you get a year if its more then 12 months ago!); $months = date("m",$elapsedTime); // Get the number of months elapsed since the years been complete $elapsedString = ($years * 12) + $months . " Months"; ?> I think that should work and it would be more precies. not totally though, for instance it does not take into account when its a Leap Year

« previous php.notes (#96593) next »