简体   繁体   English

如何在 PHP 上查找当前周第一天的日期编号

[英]How to find the date number for the first day of the current week on PHP

I need to find the date number for the first day of the current week.我需要找到本周第一天的日期编号。 For example if the date is 05/06.2015 I want to get as a result 29/05/2015 where Monday is the firs day of the week.例如,如果日期是 05/06.2015,我想得到 29/05/2015 的结果,其中星期一是一周的第一天。 I'm not very familiar with PHP date functions because I'm new at it.我对 PHP 日期函数不是很熟悉,因为我是新手。 Can someone show me how to find it?有人可以告诉我如何找到它吗? Thanks!谢谢!

strtotime是一个强大的功能。

echo date("j/n/Y", strtotime('monday this week'));   

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM