Compare given date with today

前端 未结 13 2026
别那么骄傲
别那么骄傲 2020-11-22 16:22

I have following

$var = \"2010-01-21 00:00:00.0\"

I\'d like to compare this date against today\'s date (i.e. I\'d like to know if this

相关标签:
13条回答
  • 2020-11-22 17:08
    $date1=date_create("2014-07-02");
    $date2=date_create("2013-12-12");
    $diff=date_diff($date1,$date2);
    

    (the w3schools example, it works perfect)

    0 讨论(0)
提交回复
热议问题