Source for file Netherlands.php
Documentation is available at Netherlands.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
* Driver for determining holidays in the Netherlands.
* 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 Jos van der Woude <jos@veerkade.com>
* @author Arjen de Korte <build+date_holidays@de-korte.org>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @version CVS: $Id: Netherlands.php,v 1.9 2009/03/15 20:17:00 kguest Exp $
* @link http://pear.php.net/package/Date_Holidays
require_once 'Date/Holidays/Driver/Christian.php';
* Driver class that calculates Dutch holidays
* @author Jos van der Woude <jos@veerkade.com>
* @author Arjen de Korte <build+date_holidays@de-korte.org>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @version $Id: Netherlands.php,v 1.9 2009/03/15 20:17:00 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
* Start with all holidays that are on a fixed date each year
$this->_addHoliday ('epiphany', $this->_year . '-01-06', 'Epiphany');
$this->_addHoliday ('queenDay', $this->_year . '-04-30', 'Queen\'s Day');
$this->_addHoliday ('labourDay', $this->_year . '-05-01', 'Labour Day');
$this->_addHoliday ('halloween', $this->_year . '-10-31', 'Halloween');
* Following section is holidays that are a fixed offset from Easter (which
$easterDate = Date_Holidays_Driver_Christian ::calcEaster ($this->_year);
$this->_addDays ($easterDate, -49 ),
$this->_addDays ($easterDate, -48 ),
$this->_addDays ($easterDate, -47 ),
$this->_addDays ($easterDate, -46 ),
$this->_addDays ($easterDate, -3 ),
* Good Friday / Black Friday
$this->_addDays ($easterDate, -2 ),
$this->_addDays ($easterDate, -1 ),
$this->_addHoliday ('easter', $easterDate, 'Easter Sunday');
$this->_addDays ($easterDate, 1 ),
$this->_addDays ($easterDate, 39 ),
$this->_addHoliday ('whitsun', $this->_addDays ($easterDate, 49 ), 'Whitsun');
$this->_addDays ($easterDate, 50 ),
* Lastly a number of holidays that are the second/third/last Sunday
* or Tuesday in a specific month (offset is calculated from the first
* Summertime last sunday of march
$summerTime = new Date ($this->_year . '-03-31');
$dayOfWeek = $summerTime->getDayOfWeek ();
$summerTime = $this->_addDays ($summerTime, - $dayOfWeek);
$this->_addHoliday ('summerTime', $summerTime, 'Summertime');
* Mothers' Day second sunday of may
$mothersDay = new Date ($this->_year . '-05-08');
$dayOfWeek = $mothersDay->getDayOfWeek ();
$mothersDay = $this->_addDays ($mothersDay, 7 - $dayOfWeek);
$this->_addHoliday ('mothersDay', $mothersDay, 'Mothers\' Day');
* Fathers' Day third sunday of june
$fathersDay = new Date ($this->_year . '-06-15');
$dayOfWeek = $fathersDay->getDayOfWeek ();
$fathersDay = $this->_addDays ($fathersDay, 7 - $dayOfWeek);
$this->_addHoliday ('fathersDay', $fathersDay, 'Fathers\' Day');
* Start of Parliamentary Year third tuesday of september
$princesDay = new Date ($this->_year . '-09-15');
$dayOfWeek = $princesDay->getDayOfWeek ();
$princesDay = $this->_addDays ($princesDay, 2 - $dayOfWeek);
$princesDay = $this->_addDays ($princesDay, 9 - $dayOfWeek);
$this->_addHoliday ('princesDay', $princesDay, 'Start of Parliamentary Year');
* Wintertime last sunday of october
$winterTime = new Date ($this->_year . '-10-31');
$dayOfWeek = $winterTime->getDayOfWeek ();
$winterTime = $this->_addDays ($winterTime, - $dayOfWeek);
$this->_addHoliday ('winterTime', $winterTime, 'Wintertime');
if (Date_Holidays ::errorsOccurred ()) {
return Date_Holidays ::getErrorStack ();
* Method that returns an array containing the ISO3166 codes that may possibly
* @return array possible ISO3166 codes
return array ('nl', 'nld');
Documentation generated on Wed, 12 Dec 2012 00:30:06 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.
|