php strtotime 获取本周一时间戳

php strtotime 获取本周一时间戳

你以为这个是获取当前星期周一的时间戳? 实际上这个是下周一的时间戳

strtotime('monday');

下面这个是本周一的时间戳,php strtotime 本周周一

strtotime( "previous monday" );


其他常用的:

strtotime('today');  //今天
strtotime('next monday'); //下个周一
strtotime('last Friday'); //上个周五
strtotime("next Friday", strtotime("2017-05-13")); //固定日期的下一个星期五

ps:是下一个星期五,并不是下一个星期的星期五 比如今天是星期三,next friday 是本周的周五 并不是下个星期的周五

如果想要获取上个星期的星期五怎么办

strtotime('last week friday');

 

 

 

 

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据