I just wrote this stock for an upcoming thing I'm about to release (I love the feeling when you're so close to releasing a big project you can taste it!

).
It accepts a single parameter, a date string formatted as YYYY-MM-DD, and compare it to the current server date. If the date is in the past, it returns true. Otherwise, it returns false (also returns false if the dates are identical).
I haven't tested it yet, but it should work fine. Let me know if there's a problem with it.
PHP Code:
stock bool:IsDateInPast(const String:date[]) {
decl String:curYear[4], String:curMonth[2], String:curDay[2], String:oldDate[3][4];
FormatTime(curYear, sizeof(curYear), "Y");
FormatTime(curMonth, sizeof(curMonth), "m");
FormatTime(curDay, sizeof(curDay), "d");
ExplodeString(date, "-", oldDate, 3, 4);
new cy = StringToInt(curYear);
new cm = StringToInt(curMonth);
new cd = StringToInt(curDay);
new oy = StringToInt(oldDate[0]);
new om = StringToInt(oldDate[1]);
new od = StringToInt(oldDate[2]);
if(oy < cy) {
return true; // the year we're comparing to is less than the current, it's in the past
}
if(oy > cy) {
return false; // the year we're comparing to is greater than the current, it's in the future
}
// at this point the years must be identical
if(om < cm) {
return true; // the month we're comparing to is less than the current, it's in the past
}
if(om > cm) {
return false; // you get the drift
}
// at this point the months must be identical
if(od < cd) {
return true;
}
if(od > cd) {
return false;
}
// at this point the days are identical
// identical days is not the past, so return false
return false;
}
__________________