note 39475 added to function.time

From: Date: Thu, 29 Jan 2004 20:06:50 +0000
Subject: note 39475 added to function.time
Groups: php.notes 
Request: Send a blank email to php-notes+get-64394@lists.php.net to get a copy of this message
In the CalcDateDiff function below, instead of using: if( $date2 > $date1 ) { die( "error: date1 has to be >= date2 in calcDateDiff($date1, $date2)" ); } $diff = $date1-$date2; Simply use this to avoid having to handle errors: $diff = abs($date1-$date2); ---- Manual Page -- http://www.php.net/manual/en/function.time.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39475 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39475&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39475&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64394) next »