strtotime

  • 直接看代码吧:

        echo date('Y-m-d',strtotime('-1 month',strtotime('2019-03-31'))),PHP_EOL;\
        //outputs: 2019-03-03\
        echo date('Y-m-d',strtotime('last day of last month',strtotime('2019-03-31'))),PHP_EOL;\
        //outputs: 2019-02-28
    
  • 鸟哥写的文章:令人疑惑的strtotime

本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!