I've almost got this right lol. I'm trying to create an error message if the user hasn't been registered long enough to use an application. Now, I'm HORRIBLE at math, and thankfully found part of this code from another modification, but right now, I'm using:
PHP Code:
$usml_days_registered = ((TIMENOW - $vbulletin->userinfo['joindate']) / 86400);
and obviously printing it out in the templates using
PHP Code:
$usml_days_registered
However, at the moment, it is showing WAAAY too detailed of a time lol. For example, on my test site, it is showing the time registered as:
Code:
99.951990740741 days
So.....how do I get it to just show 99? Or round the number up/down?
EDIT: There is NO plugin involved with this. This is all currently in a PHP file
--------------- Added 03 Aug 2011 at 21:55 ---------------
Heh, nevermind, solved it. haha. Just needed to use
PHP Code:
floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400)