public function is_holiday($offset=0) { $time = self::$time + $offset * 24 * 60 * 60; $year = date('Y', $time); $month = date('M', $time); $day = date('d', $time); foreach(self::$holidays[$year] as $date => $name) { $time = strtotime($date); if($month == date('M', $time) && $day == date('d', $time)) { return True; } } return False; } } Holidays::init(); function getChildrenByTagName($dom, $name) { $nodes = array(); foreach($dom->childNodes as $aNode) { if($aNode->nodeName == $name) { $nodes[] = $aNode; } } return $nodes; } ?>