You are here

function date_calc_is_past_date in Date 6.2

Same name and namespace in other branches
  1. 5.2 date_php4/date_php4_calc.inc \date_calc_is_past_date()
  2. 6 date_php4/date_php4_calc.inc \date_calc_is_past_date()

Determines if given date is a past 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 1420

Code

function date_calc_is_past_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;
}