note 101759 added to function.time

From: Date: Mon, 10 Jan 2011 01:57:54 +0000
Subject: note 101759 added to function.time
Groups: php.notes 
Request: Send a blank email to php-notes+get-175588@lists.php.net to get a copy of this message
@nickr That is a nice script. Here is a suggested tweak case "h": $datediff = floor($difference / 60 / 60); $minutes = floor(floor($difference / 60) % 60) ; $res = ($datediff==1) ? "$datediff hour $minutes minutes ago" : "$datediff hours $minutes minutes ago"; break; Which changes a rounded "n hours ago" to a more specific "n hours x minutes ago" ---- Server IP: 69.147.83.197 Probable Submitter: 58.96.40.116 ---- Manual Page -- http://www.php.net/manual/en/function.time.php Edit -- https://master.php.net/note/edit/101759 Del: integrated -- https://master.php.net/note/delete/101759/integrated Del: useless -- https://master.php.net/note/delete/101759/useless Del: bad code -- https://master.php.net/note/delete/101759/bad+code Del: spam -- https://master.php.net/note/delete/101759/spam Del: non-english -- https://master.php.net/note/delete/101759/non-english Del: in docs -- https://master.php.net/note/delete/101759/in+docs Del: other reasons-- https://master.php.net/note/delete/101759 Reject -- https://master.php.net/note/reject/101759 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175588) next »