Is date 18+ years old?
What about this:

function isDate18orMoreYearsOld(day, month, year) {
    return new Date(year+18, month-1, day) &lt;= new Date();
}


The month - 1 is required because JS months start at 0.