note 85056 added to ref.math

From: Date: Wed, 13 Aug 2008 01:54:51 +0000
Subject: note 85056 added to ref.math
Groups: php.notes 
Request: Send a blank email to php-notes+get-143429@lists.php.net to get a copy of this message
If somebody needs to convert a hexal input (i'm NOT talking about hexaDEZIMAl), e.g. a time like 02:30 h to dezimal, like - in this case -: 2.5 i can recommend this simple function: <? function HexalToDezimal ($hexal) { $dezimal = floor($hexal) + round(($hexal - floor($hexal)) * (1 / 0.6), 2); return ($dezimal); } ?> This can be usefull e.g. if you want to work with unix-timestamps and hexal inputs; e.g. if you want to compute: time() + [2 houres : 30 minutes] That is: time() + (2.5 * 60 * 60) ---- Server IP: 212.124.37.9 Probable Submitter: 84.158.101.72 ---- Manual Page -- http://www.php.net/manual/en/ref.math.php Edit -- https://master.php.net/note/edit/85056 Del: integrated -- https://master.php.net/note/delete/85056/integrated Del: useless -- https://master.php.net/note/delete/85056/useless Del: bad code -- https://master.php.net/note/delete/85056/bad+code Del: spam -- https://master.php.net/note/delete/85056/spam Del: non-english -- https://master.php.net/note/delete/85056/non-english Del: in docs -- https://master.php.net/note/delete/85056/in+docs Del: other reasons-- https://master.php.net/note/delete/85056 Reject -- https://master.php.net/note/reject/85056 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#143429) next »