如何查询本周一至周日的具体日期?
- 内容介绍
- 文章标签
- 相关推荐
本文共计113个文字,预计阅读时间需要1分钟。
phpmodify('this week');echo $date->format('Y-m-d') . \n; // 输出周一周的年月日
$date->modify('this week +6 days');echo $date->format('Y-m-d') . \n; // 输出周一周的周六?>
$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');//输出周日的年月日
本文共计113个文字,预计阅读时间需要1分钟。
phpmodify('this week');echo $date->format('Y-m-d') . \n; // 输出周一周的年月日
$date->modify('this week +6 days');echo $date->format('Y-m-d') . \n; // 输出周一周的周六?>
$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');//输出周日的年月日

