Example:
~~~
echo 'Human Friendly: ' . Enum::timeElapsed("2011-08-30 03:11:39");
echo 'Raw Conversion: ' . Enum::timeElapsed("2011-08-30 03:11:39", false);
~~~
public static timeInterval ( integer $interval, string $append = null, boolean $human = true ) : string | ||
$interval | integer | time interval in seconds |
$append | string | the string to append for the converted elapsed time. Defaults to `' ago'`. |
$human | boolean | if true returns an approximate human friendly output. If set to `false`, will attempt an exact conversion of time intervals. |
return | string |