Core Function
View Source on Trac ↗ human_time_diff()
human_time_diff( mixed $from, mixed $to = 0 ) Determines the difference between two timestamps.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $from int | Unix timestamp from which the difference begins. Required |
| $to int | Optional. Unix timestamp to end the time difference. Default becomes time() if not set. |
Return Value
(string)
Human-readable time difference.
Function Information
Since Version
1.5.0
Source File
wp-includes/formatting.php
Advertisement