Check if date is later than current date

date, php

Solution

You can do this notation:

if( '20140505' > date("Ymd") ) {
    // today's date is before 20140505 (May 5, 2014)
}

Problem

How can I check if the date is later than the current date? ``` if(date("d") < "18" && date("m") < "01") { echo 'To late!'; } ``` Doesn't work for me.

Original source

Related problems