Check if date has passed

I’m trying to see if a specific date has passed but it’s not working.
Here’s my code so far:


var currDate:Date = new Date();
checkIfDateHasPassed = function(y, m, d){
        var myDate:Date = new Date(y, m, d); 
        if(myDate > currDate){
            trace("still to come");
        } else {
            trace("has passed");
        }
}
// since month starts in Zero, July will be 6 instead 7
// I'm trying to use yesterday, but its not working...
checkIfDateHasPassed(2011, 6, 10);