function date_calc_is_future_date in Date 6
Same name and namespace in other branches
- 5.2 date_php4/date_php4_calc.inc \date_calc_is_future_date()
- 6.2 date_php4/date_php4_calc.inc \date_calc_is_future_date()
Determines if given date is a future date from now
Parameters
int $day: The day of the month.
int $month: The month.
int $year: The 4 digit year. Do not add leading 0's for years prior to 1000.
Return value
boolean
File
- date_php4/date_php4_calc.inc, line 1388 
Code
function date_calc_is_future_date($day, $month, $year) {
  $this_year = date_calc_get_year();
  $this_month = date_calc_get_month();
  $this_day = date_calc_get_day();
  if ($year > $this_year) {
    return true;
  }
  elseif ($year == $this_year) {
    if ($month > $this_month) {
      return true;
    }
    elseif ($month == $this_month) {
      if ($day > $this_day) {
        return true;
      }
    }
  }
  return false;
}