Taka prosta klasa, którą trudno nazwać klasą

. Użycia nie trudno się domyśleć...
<?php
/**
* Klasa do obsługi dni świątecznych (wolnych od pracy)
* @author Vokiel | <a href="http://vokiel.com" target="_blank">http://vokiel.com</a>
*/
class christmassDays{
private $christmassDays = array();
/**
* Tworzenie listy świąt w danym roku
*
* @param int $year
*/
public function __construct($year){
$easter = easter_date
(intval($year)); $this->christmassDays = array( $year.'-01-01', // nowy rok
date('Y-m-d', $easter), // pierwszy dzien wielkiej nocy date('Y-m-d', strtotime('+ 1 day', $easter)), // drugi dzien wielkiej nocy $year.'-05-01', // 1 maja
$year.'-05-03', // 3 maja
date('Y-m-d', strtotime('+ 49 days', $easter)), // zielone swiatki $year.'-08-15', // 15 sierpnia
$year.'-11-01', // 1 listopada
$year.'-11-11', // 11 listopada
$year.'-12-25', // 25 grudnia
$year.'-12-26' // 26 grudnia
);
}// end of __construct
/**
* Sprawdzenie czy dana data to święto
*
* @param string $data
* @return bool
*/
public function checkChristmassDay($data){
if (in_array($data,$this->christmassDays)){ return true;
return true;
}
return false;
} // end of checkChristmassDay
}// edn of christmassDays class
?>