Date_Holidays
[ class tree: Date_Holidays ] [ index: Date_Holidays ] [ all elements ]

Source for file Discordian.php

Documentation is available at Discordian.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. /**
  4.  * Driver for Discordian holidays
  5.  *
  6.  * PHP Version 4
  7.  *
  8.  * Copyright (c) 1997-2008 The PHP Group
  9.  *
  10.  * This source file is subject to version 3.0 of the PHP license,
  11.  * that is bundled with this package in the file LICENSE, and is
  12.  * available at through the world-wide-web at
  13.  * http://www.php.net/license/3_01.txt.
  14.  * If you did not receive a copy of the PHP license and are unable to
  15.  * obtain it through the world-wide-web, please send a note to
  16.  * license@php.net so we can mail you a copy immediately.
  17.  *
  18.  * @category Date
  19.  * @package  Date_Holidays
  20.  * @author   Stephan 'Da:Sourcerer' Hohmann <webmaster@dasourcerer.net>
  21.  * @license  http://www.php.net/license/3_01.txt PHP License 3.0.1
  22.  * @version  CVS: $Id: Discordian.php,v 1.6 2008/01/26 00:08:34 kguest Exp $
  23.  * @link     http://pear.php.net/package/Date_Holidays
  24.  */
  25.  
  26. /**
  27.  * A driver-class calculating discordian Holidays. See the 'Principia Discordia'
  28.  * or http://en.wikipedia.org/wiki/Discordian_calendar for details.
  29.  *
  30.  * @category   Date
  31.  * @package    Date_Holidays
  32.  * @subpackage Driver
  33.  * @author     Stephan 'Da:Sourcerer' Hohmann <webmaster@dasourcerer.net>
  34.  * @license    http://www.php.net/license/3_01.txt PHP License 3.0.1
  35.  * @version    CVS: $Id: Discordian.php,v 1.6 2008/01/26 00:08:34 kguest Exp $
  36.  * @link       http://pear.php.net/package/Date_Holidays
  37.  */
  38. {
  39.     /**
  40.      * Constructor
  41.      *
  42.      * Use the Date_Holidays::factory() method to construct an object of a
  43.      * certain driver
  44.      *
  45.      * @access   protected
  46.      */
  47.     {
  48.     }
  49.  
  50.     /**
  51.      * Build the internal arrays that contain data about the calculated holidays
  52.      *
  53.      * @access   protected
  54.      * @return   boolean true on success, otherwise a PEAR_ErrorStack object
  55.      * @throws   object PEAR_ErrorStack
  56.      */
  57.     function _buildHolidays()
  58.     {
  59.         /**
  60.          * St. Tib's day. Occurs every leap year.
  61.          */
  62.         $this->_addHoliday('stTibsDay'$this->_year . '-02-29''St. Tib\'s Day');
  63.  
  64.         /**
  65.          * Holidays assigned to apostles. Apostles' holidays are on
  66.          * the fifth day of each season
  67.          */
  68.         $this->_addHoliday('mungday'$this->_year . '-01-05''Mungday');
  69.         $this->_addHoliday('mojoday'$this->_year . '-03-19''Mojoday');
  70.         $this->_addHoliday('syaday'$this->_year . '-05-31''Syaday');
  71.         $this->_addHoliday('zaraday'$this->_year . '-08-12''Zaraday');
  72.         $this->_addHoliday('maladay'$this->_year . '-10-24''Maladay');
  73.  
  74.         /**
  75.          * Holidays assigned to seasons. Seasonal holidays are
  76.          * assigned to the fiftieth day of the corresponding season
  77.          */
  78.         $this->_addHoliday('chaoflux'$this->_year . '-02-19''Chaoflux');
  79.         $this->_addHoliday('discoflux'$this->_year . '-05-03''Discoflux');
  80.         $this->_addHoliday('confuflux'$this->_year . '-07-15''Confuflux');
  81.         $this->_addHoliday('bureflux'$this->_year . '-09-26''Bureflux');
  82.         $this->_addHoliday('afflux'$this->_year . '-12-08''Afflux');
  83.  
  84.         if (Date_Holidays::errorsOccurred()) {
  85.             return Date_Holidays::getErrorStack();
  86.         }
  87.         return true;
  88.     }
  89. }
  90. ?>

Documentation generated on Thu, 10 Apr 2008 20:00:13 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.