首页 WordPress函数大全 human_time_diff()

human_time_diff()

2020-05-02 / 4722阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

human_time_diff( int $from, int $to )

Determines the difference between two timestamps.

描述

The difference is returned in a human readable format such as "1 hour", "5 mins", "2 days".

参数

$from

(int)
(Required)
Unix timestamp from which the difference begins.

$to

(int)
(Optional)
Unix timestamp to end the time difference. Default becomes time() if not set.

返回

(string) Human readable time difference.

大家谈论
    我的见解