Getting the timestamp from last saturday (every week)?

前端 未结 1 511
无人及你
无人及你 2020-12-07 03:04

first let me show you my code:

$lastWeek = date(\'m-d-Y\', strtotime(\'-1 week\'));

That\'s how to get the timestamp from last week. Is the

相关标签:
1条回答
  • 2020-12-07 03:49

    What's wrong with

    $last_sat = strtotime("last Saturday"); 
    

    EDIT

    The time should be set to '00:00:00';

    echo date('d-M-Y H:i:s',$last_sat);
    

    gives

    29-Jan-2011 00:00:00
    
    0 讨论(0)
提交回复
热议问题