PHP date()对象
date对象是所有语言中必备对象,没有日期就无法统计很多按照日期排序或者作为标记的事件。PHP的date对象相比较而言简单易用。语法格式如下:
date(format[,timestamp]);
- format:为字符串格式,是date对象的必须参数,表示日期时间的输出格式;
- timestamp:时间戳,默认time(),为可选参数。
format参数对照表

示例
<?php
echo date('Y年m月d日 H:i:s W');
?>
输出结果:
2020年5月24日 17:02:02 0