"月前", "day_ago"=>"天前", "hour_ago"=>"" />
牛骨文教育服务平台(让学习变的简单)

humandate()

humandate($timestamp, $lan = array())

【功能】

友好的显示日期。

【参数】

$timestamp:UNIX 时间戳
$lan:语言包

语言包默认值::

$lan = array(
		"month_ago"=>"月前",
		"day_ago"=>"天前",
		"hour_ago"=>"月前",
		"minute_ago"=>"月前",
		"second_ago"=>"月前",
);

【用例】

<?php

include "./xiunophp/xiunophp.php";

$n = time() - 86401;
echo humandate($n);

// 结果: 1 天前

?>