Source for file EnglandWales.php
Documentation is available at EnglandWales.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
* Driver for holidays in Germany
* Copyright (c) 1997-2008 The PHP Group
* This source file is subject to version 3.0 of the PHP license,
* that is bundled with this package in the file LICENSE, and is
* available at through the world-wide-web at
* http://www.php.net/license/3_01.txt.
* If you did not receive a copy of the PHP license and are unable to
* obtain it through the world-wide-web, please send a note to
* license@php.net so we can mail you a copy immediately.
* @author Tim Dodge <timmy@invisibles.org>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @version CVS: $Id: EnglandWales.php,v 1.8 2008/03/17 11:37:49 kguest Exp $
* @link http://pear.php.net/package/Date_Holidays
require_once 'Date/Holidays/Driver/Christian.php';
require_once 'Date/Holidays/Driver/USA.php';
* Driver class that calculates Danish holidays
* @author Tim Dodge <timmy@invisibles.org>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @version CVS: $Id: EnglandWales.php,v 1.8 2008/03/17 11:37:49 kguest Exp $
* @link http://pear.php.net/package/Date_Holidays
* Use the Date_Holidays::factory() method to construct an object of a
* Build the internal arrays that contain data about the calculated holidays
* @return boolean true on success, otherwise a PEAR_ErrorStack object
* @throws object PEAR_ErrorStack
$newYearsDay = new Date ($this->_year . '-01-01');
if ($newYearsDay->getDayOfWeek () == 0 ) {
'Substitute Bank Holiday in lieu of New Year\'s Day');
} elseif ($newYearsDay->getDayOfWeek () == 6 ) {
'Substitute Bank Holiday in lieu of New Year\'s Day');
$goodFridayDate = new Date ($easterDate);
$goodFridayDate->subtractSpan (new Date_Span ('2, 0, 0, 0'));
$this->_addHoliday('goodFriday', $goodFridayDate, 'Good Friday');
$easterDate->getNextDay (),
$this->_addHoliday('mayDay', $earlyMayDate, 'May Day Bank Holiday');
$this->_addHoliday('springBank', $springBankDate, 'Spring Bank Holiday');
$this->_addHoliday('summerBank', $summerBankDate, 'Summer Bank Holiday');
* Christmas and Boxing Day
$christmasDay = new Date ($this->_year . '-12-25');
if ($christmasDay->getDayOfWeek () == 0 ) {
'Substitute Bank Holiday in lieu of Christmas Day');
} elseif ($christmasDay->getDayOfWeek () == 5 ) {
$this->_addHoliday('christmasDay', $christmasDay, 'Christmas Day');
'Substitute Bank Holiday in lieu of Boxing Day');
} elseif ($christmasDay->getDayOfWeek () == 6 ) {
'Substitute Bank Holiday in lieu of Christmas Day');
'Substitute Bank Holiday in lieu of Boxing Day');
$this->_addHoliday('christmasDay', $christmasDay, 'Christmas Day');
* Method that returns an array containing the ISO3166 codes that may possibly
* @return array possible ISO3166 codes
return array ('gb', 'gbr');
Documentation generated on Thu, 10 Apr 2008 20:00:16 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.
|