To check whether given date is less than current date

function IslessThanCurrentYear(year)
{
var d = new Date();
currentyear = d.getFullYear();

if (year>currentyear)
{
return false;
}
else
{
return true;
}

}

Leave your comment

  • Thanks for this it saved me from having to look it up!