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

Source for file Slovenia.php

Documentation is available at Slovenia.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:   Anders Karlsson <anders.x.karlsson@tdcsong.se>            |
  17. // | Authors:   Carsten Lucke <luckec@php.net>                            |
  18. // +----------------------------------------------------------------------+
  19. //
  20. //    $Id: Slovenia.php,v 1.1 2006/12/16 09:34:20 schst Exp $
  21.  
  22. require_once 'Date/Holidays/Driver/Christian.php';
  23.  
  24. /**
  25.  * Driver class that calculates Slovenian holidays
  26.  *
  27.  * @link        http://www.uvi.si/slo/slovenija/kratka-predstavitev/prazniki/
  28.  * @category    Date
  29.  * @package     Date_Holidays
  30.  * @subpackage  Driver
  31.  * @version     $Id: Slovenia.php,v 1.1 2006/12/16 09:34:20 schst Exp $
  32.  * @author      Jakob Munih <jakob.munih@obala.si>
  33.  */
  34. {
  35.    /**
  36.     * Constructor
  37.     *
  38.     * Use the Date_Holidays::factory() method to construct an object of a certain driver
  39.     *
  40.     * @access   protected
  41.     */
  42.     function Date_Holidays_Driver_Slovenia({}
  43.  
  44.    /**
  45.     * Build the internal arrays that contain data about the calculated holidays
  46.     *
  47.     * @access   protected
  48.     * @return   boolean true on success, otherwise a PEAR_ErrorStack object
  49.     * @throws   object PEAR_ErrorStack
  50.     */
  51.     function _buildHolidays()
  52.     {
  53.        /**
  54.         * New Year's Day
  55.         */
  56.         $this->_addHoliday('novoleto1'$this->_year . '-01-01''Novo leto');
  57.         $this->_addHoliday('novoleto2'$this->_year . '-01-02''Novo leto');
  58.  
  59.        /**
  60.         * Prešernov dan
  61.         */
  62.         $this->_addHoliday('preseren'$this->_year . '-02-08''Prešernov dan, slovenski kulturni praznik');
  63.  
  64.        /**
  65.         * Dan upora proti okupatorju
  66.         */
  67.         $this->_addHoliday('okupator'$this->_year . '-04-27''Dan upora proti okupatorju');
  68.  
  69.        /**
  70.         * Praznik dela
  71.         */
  72.         $this->_addHoliday('delo1'$this->_year . '-05-01''Praznik dela');
  73.         $this->_addHoliday('delo2'$this->_year . '-05-02''Praznik dela');
  74.  
  75.        /**
  76.         * Dan državnosti
  77.         */
  78.         $this->_addHoliday('drzavnost'$this->_year . '-06-25''Dan državnosti');
  79.  
  80.        /**
  81.         * Easter Sunday
  82.         */
  83.         $easter Date_Holidays_Driver_Christian::calcEaster($this->_year);
  84.         $this->_addHoliday('vnoc'$easter'Binkoštna nedelja - binkošti');
  85.  
  86.        /**
  87.         * Easter Monday
  88.         */
  89.         $easterMon = clone $easter;
  90.         $easterMon->day++;
  91.         $this->_addHoliday('vnocpon'$easterMon'Velikonočni ponedeljek');
  92.  
  93.        /**
  94.         * Marijino vnebovzetje
  95.         */
  96.         $this->_addHoliday('marija'$this->_year . '-08-15''Marijino vnebovzetje');
  97.  
  98.        /**
  99.         * Združitev prekmurskih Slovencev
  100.         */
  101.         $this->_addHoliday('prekmurski'$this->_year . '-08-17''Združitev prekmurskih Slovencev z matičnim narodom');
  102.  
  103.        /**
  104.         * Združitev prekmurskih Slovencev
  105.         */
  106.         $this->_addHoliday('marija'$this->_year . '-09-15''Vrnitev Primorske k matični domovini');
  107.  
  108.        /**
  109.         * Dan reformacije
  110.         */
  111.         $this->_addHoliday('reformacija'$this->_year . '-10-31''Dan reformacije');
  112.  
  113.        /**
  114.         * Dan spomina na mrtve
  115.         */
  116.         $this->_addHoliday('danmrtvih'$this->_year . '-11-01''Dan spomina na mrtve');
  117.  
  118.        /**
  119.         * Dan spomina na mrtve
  120.         */
  121.         $this->_addHoliday('danmrtvih'$this->_year . '-11-23''Dan Rudolfa Maistra');
  122.  
  123.        /**
  124.         * Christmas day
  125.         */
  126.         $this->_addHoliday('xmasDay'$this->_year . '-12-25''Božič');
  127.         
  128.        /**
  129.         * Dan samostojnosti in enotnosti
  130.         */
  131.         $this->_addHoliday('samostijnosti'$this->_year . '-12-26''Dan samostojnosti in enotnosti');
  132.  
  133.         if (Date_Holidays::errorsOccurred()) {
  134.             return Date_Holidays::getErrorStack();
  135.         }
  136.         return true;
  137.     }
  138.   
  139.    /**
  140.     * Method that returns an array containing the ISO3166 codes that may possibly
  141.     * identify a driver.
  142.     * 
  143.     * @static
  144.     * @access public
  145.     * @return array possible ISO3166 codes
  146.     */
  147.     function getISO3166Codes({
  148.         return array('si');
  149.     }
  150. }
  151. ?>

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