Timestamps of start and end of month

后端 未结 7 1866
独厮守ぢ
独厮守ぢ 2020-12-03 17:04

How can one get the timestamps of the first and last minutes of any month using PHP?

7条回答
  •  难免孤独
    2020-12-03 17:43

    Best Way do like this..

    $first_day = date('m-01-Y h:i:s',strtotime("-1 months"));

    $last_day = date('m-t-Y h:i:s',strtotime("-1 months"));

提交回复
热议问题