Source for file Norway.php
Documentation is available at Norway.php
require_once 'Christian.php';
* Driver class that calculates Norwegian holidays
* Vegard Fiksdal <fiksdal@sensorlink.no>
* 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');
* 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('easterMonday', $easterDate->getNextDay (), 'Easter Monday');
* Pentecost (determines Whit Monday, Ascension Day and Feast of Corpus Christi)
$pentecostDate = new Date ($easterDate);
$pentecostDate->addSpan (new Date_Span ('49, 0, 0, 0'));
$this->_addHoliday('pentecost', $pentecostDate, 'Pentecost');
$ascensionDayDate = new Date ($pentecostDate);
$ascensionDayDate->subtractSpan (new Date_Span ('10, 0, 0, 0'));
$this->_addHoliday('ascensionDay', $ascensionDayDate, 'Ascension Day');
'Norwegian National Day');
* Calculates the date for Easter. Actually this methods delegates the calculation to
* the {@link Date_Holidays_Driver_Christian#calcEaster()} method.
function calcEaster ($year)
* Method that returns an array containing the ISO3166 codes that may possibly
* @return array possible ISO3166 codes
return array ('no', 'nor');
Documentation generated on Mon, 11 Mar 2019 15:14:34 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|