human_time_diff


human_time_diff ( $from, $to = 0 )

Parameters:
  • (int) from Unix timestamp from which the difference begins.
  • (int) to Optional. Unix timestamp to end the time difference. Default becomes time() if not set.
Returns:
  • (string) Human-readable time difference.
Defined at:
Change Log:
  • 5: .

Description

Determines the difference between two timestamps.The difference is returned in a human-readable format such as "1 hour", "5 mins", "2 days".

Related Functions

wp_text_diff, current_theme_info, has_image_size, human_readable_duration, comment_time

Top Google Results

User discussions

wpseek mobile