time_since

Description

Little function to calculate how long ago a time was.

Syntax

string time_since (int $time_diff)



Parameter $time_diff

Expected type: Integer
Description: The difference between two timestamps (in seconds)



Return value

Expected type: String
Description: A formatted and converted time difference


Notes

  • Converts the specified time difference to to days, hours, minutes or seconds.
Advertisement: