douzhan8395 2013-09-03 18:41
浏览 59
已采纳

根据周数从星期一获取日期[关闭]

I can`t figure out the code to get the date from monday depending on the week number of this year.

could someone help me with this code?

thanks.

  • 写回答

3条回答 默认 最新

  • dsq1982 2013-09-03 18:54
    关注

    This will provide the Monday of a certain week this year:

    $thisYear = date('Y');
    $weekNum = 40;
    
    $date = date('Y-m-d', strtotime("$thisYear-W$weekNum-1"));  // Outputs 2013-09-30
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?