PHP:如果缺少则添加年份

I am pulling a date and it only has the month and day. I need to add the year before saving to database. The dates being pulled only go as far a year off. Is there a way to do this?

The way I am receiving the date is Nov 12 or "M d"

So the year can be 2010 or 2009 right?

if (strtotime($date . date('-Y')) > time()) {
    // year ago
    $date .= date('-Y', strtotime('last year'));
} else {
    $date .= date('-Y');
}

// date('-Y') will return -2010 or -2009

Since you said the dates can't be greater than a year ago, then if the date is greater than today counting only month and day, it's from last year. Else, this year.