如何查询并表达本周从周一到周日的具体日期?
- 内容介绍
- 文章标签
- 相关推荐
本文共计93个文字,预计阅读时间需要1分钟。
phpmodify('this week');echo $date->format('Y-m-d') . \n;$date->modify('this week +6 days');echo $date->format('Y-m-d');?>
$date=new DateTime();//时间对象 $date->modify('this week');//指定哪一周,默认该周的第一天 echo $date->format('Y-m-d');//输出周一的年月日 $date->modify('this week +6 days');//该周的周日 echo $date->format('Y-m-d');//输出周日的年月日
本文共计93个文字,预计阅读时间需要1分钟。
phpmodify('this week');echo $date->format('Y-m-d') . \n;$date->modify('this week +6 days');echo $date->format('Y-m-d');?>
$date=new DateTime();//时间对象 $date->modify('this week');//指定哪一周,默认该周的第一天 echo $date->format('Y-m-d');//输出周一的年月日 $date->modify('this week +6 days');//该周的周日 echo $date->format('Y-m-d');//输出周日的年月日

