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

Documentation generated on Mon, 11 Mar 2019 15:03:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.