note 77046 added to function.date

From: Date: Sun, 12 Aug 2007 23:00:37 +0000
Subject: note 77046 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-129429@lists.php.net to get a copy of this message
Find on the web. Diff between date seconds, minutes, hours, month, days and years! Very usefull and so simple :-) $d1=mktime(22,0,0,1,1,2007); $d2=mktime(0,0,0,1,2,2007); echo "Hours difference = ".floor(($d2-$d1)/3600) . "<br>"; echo "Minutes difference = ".floor(($d2-$d1)/60) . "<br>"; echo "Seconds difference = " .($d2-$d1). "<br>"; echo "Month difference = ".floor(($d2-$d1)/2628000) . "<br>"; echo "Days difference = ".floor(($d2-$d1)/86400) . "<br>"; echo "Year difference = ".floor(($d2-$d1)/31536000) . "<br>"; ---- Server IP: 194.246.101.61 Probable Submitter: 82.243.43.4 ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- https://master.php.net/note/edit/77046 Del: integrated -- https://master.php.net/note/delete/77046/integrated Del: useless -- https://master.php.net/note/delete/77046/useless Del: bad code -- https://master.php.net/note/delete/77046/bad+code Del: spam -- https://master.php.net/note/delete/77046/spam Del: non-english -- https://master.php.net/note/delete/77046/non-english Del: in docs -- https://master.php.net/note/delete/77046/in+docs Del: other reasons-- https://master.php.net/note/delete/77046 Reject -- https://master.php.net/note/reject/77046 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129429) next »