Exemple #1
0
 /**
  * Determines if given date is a past date from now
  *
  * @param int $day
  *        	the day of the month
  * @param int $month
  *        	the month
  * @param int $year
  *        	the year. Use the complete year instead of the
  *        	abbreviated version. E.g. use 2005, not 05.
  *        	Do not add leading 0's for years prior to 1000.
  *        	
  * @return boolean
  *
  * @access public
  * @static
  *
  */
 static function isPastDate($day, $month, $year)
 {
     $this_year = Calc::dateNow('%Y');
     $this_month = Calc::dateNow('%m');
     $this_day = Calc::dateNow('%d');
     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;
 }