View Javadoc

1   /*
2    *  File: HolidayEnumerator_pl_PL.java 
3    *  Copyright (c) 2004-2007  Peter Kliem (Peter.Kliem@jaret.de)
4    *  A commercial license is available, see http://www.jaret.de.
5    *
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of the Common Public License v1.0
8    * which accompanies this distribution, and is available at
9    * http://www.eclipse.org/legal/cpl-v10.html
10   */
11  package de.jaret.util.date.holidayenumerator;
12  
13  import java.util.Locale;
14  
15  /**
16   * HolidayEnumerator for Poland. Includes public holidays according to <a
17   * href="http://en.wikipedia.org/wiki/Holidays_in_Poland">http://en.wikipedia.org/wiki/Holidays_in_Poland</a>. <b>The
18   * calculations are without any warranty!</b>
19   * 
20   * @author Peter Kliem
21   * @version $Id: HolidayEnumerator_pl_PL.java 293 2007-03-11 17:50:57Z olk $
22   */
23  public class HolidayEnumerator_pl_PL extends HolidayEnumeratorBase {
24      /**
25       * Constructs the he for poland.
26       * 
27       * @param regionId region id (currently no region support)
28       */
29      public HolidayEnumerator_pl_PL(String regionId) {
30          _regionId = regionId;
31          _locale = new Locale("pl", "PL");
32      }
33  
34      /*
35       * 7th Sunday after Easter Pentecost Sunday pierwszy dzie? Zielonych ?wi?tek (Zielone ?wi?tki) As this holiday
36       * always falls on a Sunday it is not widely known. 9th Thursday after Easter Corpus Christi dzie? Bo?ego Cia?a
37       * (Bo?e Cia?o)
38       */
39      /**
40       * {@inheritDoc}
41       */
42      protected void fillMap(int year) {
43          // general holidays
44          addNamedDate(year, 0, 1, true, "Nowy Rok");
45          addNamedDate(year, 4, 1, true, "?wi?to Pa?stwowe");
46          addNamedDate(year, 4, 3, true, "?wi?to Narodowe Trzeciego Maja");
47  
48          addNamedDate(year, 7, 15, true, "Wniebowzi?cie Naj?wi?tszej Maryi Panny");
49          addNamedDate(year, 10, 1, true, "Wszystkich ?wi?tych");
50          addNamedDate(year, 10, 11, true, "Narodowe ?wi?to Niepodleg?o?ci");
51          // addNamedDate(year, 11, 24, false, "Heiligabend");
52          addNamedDate(year, 11, 25, true, "pierwszy dzie? Bo?ego Narodzenia");
53          addNamedDate(year, 11, 26, true, "drugi dzie? Bo?ego Narodzenia");
54          // addNamedDate(year, 11, 31, false, "Sylvester");
55  
56          // easter days
57          EasyDate ed = calcEaster(year);
58          addNamedDate(year, ed.month, ed.day, true, "pierwszy dzie? Wielkiej Nocy");
59          addNamedDate(year, ed.month, ed.day, 1, true, "drugi dzie? Wielkiej Nocy");
60          addNamedDate(year, ed.month, ed.day, 7, true, "pierwszy dzie? Zielonych ?wi?tek");
61  
62          // 9th Thursday after Easter
63          addNamedDate(year, ed.month, ed.day, 4 + 9 * 7, true, "dzie? Bo?ego Cia?a");
64  
65      }
66  
67  }