class sachsen extends calendar { public function __construct( $year ) { parent::__construct( $year ); $this->holidays[] = '31.10.'; // Reformationstag $this->holidays[] = $this->getBussUndBettag(); // Buß- und Bettag } /** * @return false|string */ function getBussUndBettag() { $timestamp = strtotime( '26.11.' . $this->year ); do { $timestamp = strtotime( '+ 1 day', $timestamp ); } while( date( 'w', $timestamp ) != 0 ); $timestamp = strtotime( '-11 day', $timestamp ); return date( 'd.m.', $timestamp ); } }