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

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