//主函数
public function getChatTimeStr($addTime)
{
$nowTime = time();
if ($addTime > $nowTime) {
return "";
}
//返回的时间
$timeStr = "";
//获取当前时间
$addTime = explode(',', date('Y,n,j,w,a,h,i,y', $addTime));//年,月,日,星期,上下午,时,分
$nowTime = explode(',', date('Y,n,j,w,a,h,i,y', $nowTime));
//print_r($addTime);exit;
$dayPerMonthAddTime = self::getDayPerMonth($addTime[0]);
$week = array(0 => "星期日", 1 => "星期一", 2 => "星期二", 3 => "星期三", 4 => "星期四", 5 => "星期五", 6 => "星期六");
if ($addTime[4] == "am") {
$am = " 上午&#
仿微信聊天界面 时间提示
最新推荐文章于 2022-01-01 23:28:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)