Source for file Denmark.php
Documentation is available at Denmark.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2002 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.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/2_02.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. |
// +----------------------------------------------------------------------+
// | Authors: Henrik Hansen <hh@fsck.dk> |
// +----------------------------------------------------------------------+
// $Id: Denmark.php,v 1.1 2006/12/16 09:34:20 schst Exp $
require_once 'Date/Holidays/Driver/Christian.php';
* Driver class that calculates Danish holidays
* @version $Id: Denmark.php,v 1.1 2006/12/16 09:34:20 schst Exp $
* @author Henrik Hansen <hh@fsck.dk>
* Use the Date_Holidays::factory() method to construct an object of a certain driver
* 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
$this->_addHoliday('easter', $easterDate, 'Easter Sunday');
$this->_addHoliday('easterMonday', $easterDate->getNextDay (), 'Easter Monday');
$palmSundayDate = new Date ($easterDate);
$palmSundayDate->subtractSpan (new Date_Span ('7, 0, 0, 0'));
$this->_addHoliday('palmSunday', $palmSundayDate, 'Palm Sunday');
* Good Friday / Black Friday
$goodFridayDate = new Date ($easterDate);
$goodFridayDate->subtractSpan (new Date_Span ('2, 0, 0, 0'));
$this->_addHoliday('goodFriday', $goodFridayDate, 'Good Friday');
$this->_addHoliday('greenThursday', $goodFridayDate->getPrevDay (), 'Green Thursday');
* Whitsun (determines Whit Monday, Ascension Day and Feast of Corpus Christi)
$whitsunDate = new Date ($easterDate);
$whitsunDate->addSpan (new Date_Span ('49, 0, 0, 0'));
$this->_addHoliday('whitsun', $whitsunDate, 'Whitsun');
$this->_addHoliday('whitMonday', $whitsunDate->getNextDay (), 'Whit Monday');
$ascensionDayDate = new Date ($whitsunDate);
$ascensionDayDate->subtractSpan (new Date_Span ('10, 0, 0, 0'));
$this->_addHoliday('ascensionDay', $ascensionDayDate, 'Ascension Day');
* Heart of Jesus (General Prayer Day)
* Friday of the 3rd week past Whitsun
$heartJesusDate = new Date ($goodFridayDate);
$heartJesusDate->addSpan (new Date_Span ('28, 0, 0, 0'));
$this->_addHoliday('heartJesus', $heartJesusDate, 'Heart of Jesus celebration');
* Method that returns an array containing the ISO3166 codes that may possibly
* @return array possible ISO3166 codes
return array ('dk', 'dnk');
Documentation generated on Mon, 11 Mar 2019 15:03:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|