Date and Time functions
$timestamp = time()-3600;
$ago = age($timestamp); //returns 1 hour
$timestamp = time()+3600
$in = future_age($timestamp); //returns 1 hour
$time = timestamp()-7200;
$hours = hours($time); //returns 2
- $tm Timestamp to use
- $end Timestamp to use as NOW otherwise defaults to time()
Same prototype as age() but works on a future time
- $tm The range in seconds
- $inc Increment eg: 2 = every half hour Returns the number of hours to the inc power