eni*_*cus -8 php date
如果有人知道如何根据php中的给定日期计算日历周,例如06.06.2013(格式如此2013-06-06).是第23周的日历.我整个上午都在寻找解决方案,没有发现任何有用的东西.任何帮助或链接,任何事情都将不胜感激.谢谢
Joh*_*nde 13
使用 date("W")
date("W")
echo date("W", strtotime('2013-06-06'));
看到它在行动
Eth*_*han 8
date('W')应该给你一年中的一周.RTM
date('W')
如果您没有将时间作为unix时间戳,则可以strtotime()先使用它并将其作为第二个参数传递
strtotime()
恩. date('W',strtotime($my_time_string))
date('W',strtotime($my_time_string))
你可以在这里看到PHP手册
归档时间:
12 年,5 月 前
查看次数:
7437 次
最近记录:
8 年,6 月 前