时间:2021-07-01 10:21:17 帮助过:3人阅读
获取某个时间戳的周几,以及未来几天以后的周几
$time 代表时间
$i 今天开始
public static function getTimeWeek($time, $i = 0) { $weekarray = array("日", "一", "二", "三", "四", "五", "六"); $oneD = 24 * 60 * 60; return "周" . $weekarray[date("w", $time + $oneD * $i)]; }
以上就是详细介绍php根据时间戳获取周几的实例代码的详细内容,更多请关注Gxl网其它相关文章!