I have a few of comments:
As to a better way than your method, you might want to use integer division and modulo arithmetic:
$days = int($time/86400); $time %= 86400; # leave only the part that's less than a d +ay $hours = int($time/3600); $time %= 3600; # leave only the part that's less than an +hour; ... # and so on
In reply to Re: Determining time since
by duff
in thread Determining time since
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |