Skip to content

Commit 5b9e6e6

Browse files
KJhellicoShrot101arkid15r
authored
Add Faroe Islands holidays (#2719)
Signed-off-by: Shrot101 <[email protected]> Co-authored-by: Shreyas <[email protected]> Co-authored-by: Shrot101 <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]>
1 parent f0e30ae commit 5b9e6e6

File tree

14 files changed

+2697
-3
lines changed

14 files changed

+2697
-3
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
__pycache__
12
.coverage
23
.github_token
34
.gitpod.yml
@@ -16,8 +17,6 @@ coverage.lcov
1617
coverage.xml
1718
dist/
1819
docs/auto_gen_files/
19-
docs/build
20-
docs/source/_autosummary
2120
holidays/locale/pot/*.pot
2221
MANIFEST
2322
Pipfile

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ Shalom Donga
139139
Shaurya Uppal
140140
Sho Hirose
141141
Shreyansh Pande
142+
Shreyas Smarth
142143
Simon Gurcke
143144
Sugato Ray
144145
Sylvain Pasche

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ and detailed information.
105105

106106
## Available Countries
107107

108-
We currently support 213 country codes. The standard way to refer to a country is by using its [ISO
108+
We currently support 214 country codes. The standard way to refer to a country is by using its [ISO
109109
3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes), the same used
110110
for domain names, and for a subdivision its [ISO 3166-2
111111
code](https://en.wikipedia.org/wiki/ISO_3166-2). Some countries have common or foreign names or
@@ -595,6 +595,13 @@ any) in brackets, available languages and additional holiday categories. All cou
595595
<td>GOVERNMENT, WORKDAY</td>
596596
</tr>
597597
<tr>
598+
<td>Faroe Islands</td>
599+
<td>FO</td>
600+
<td></td>
601+
<td>da, en_US, <strong>fo</strong>, is, no, sv</td>
602+
<td>HALF_DAY</td>
603+
</tr>
604+
<tr>
598605
<td>Fiji</td>
599606
<td>FJ</td>
600607
<td></td>

holidays/countries/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
from holidays.countries.eswatini import Eswatini, SZ, SZW, Swaziland
7777
from holidays.countries.ethiopia import Ethiopia, ET, ETH
7878
from holidays.countries.falkland_islands import FalklandIslands, FK, FLK
79+
from holidays.countries.faroe_islands import FaroeIslands, FO, FRO
7980
from holidays.countries.fiji import Fiji, FJ, FJI
8081
from holidays.countries.finland import Finland, FI, FIN
8182
from holidays.countries.france import France, FR, FRA

holidays/countries/faroe_islands.py

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# holidays
2+
# --------
3+
# A fast, efficient Python library for generating country, province and state
4+
# specific sets of holidays on the fly. It aims to make determining whether a
5+
# specific date is a holiday as fast and flexible as possible.
6+
#
7+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8+
# dr-prodigy <[email protected]> (c) 2017-2023
9+
# ryanss <[email protected]> (c) 2014-2017
10+
# Website: https://github.com/vacanza/holidays
11+
# License: MIT (see LICENSE file)
12+
13+
from gettext import gettext as tr
14+
15+
from holidays.constants import HALF_DAY, PUBLIC
16+
from holidays.groups import ChristianHolidays, InternationalHolidays
17+
from holidays.holiday_base import HolidayBase
18+
19+
20+
class FaroeIslands(HolidayBase, ChristianHolidays, InternationalHolidays):
21+
"""Faroe Islands holidays.
22+
23+
References:
24+
* <https://en.wikipedia.org/wiki/Public_holidays_in_the_Faroe_Islands>
25+
* [Decree no. 52 of 23 April 2003](https://web.archive.org/web/20241204233745/https://logir.fo/Kunngerd/52-fra-23-04-2003-um-flagging-fra-landsins-bygningum)
26+
* [2007](https://web.archive.org/web/20250125193236/https://www.framtak.com/info/holidays.html))
27+
* [2024](https://web.archive.org/web/20250615193008/https://visitfaroeislands.com/en/plan-your-stay/get-ready-for-your-trip/general-facts/public-holidays)
28+
* [2025](https://web.archive.org/web/20250615193215/https://guidetofaroeislands.fo/travel-information/faroe-islands-holiday/)
29+
"""
30+
31+
country = "FO"
32+
default_language = "fo"
33+
# Denmark granted home rule to the Faroe Islands on 30 March 1948.
34+
start_year = 1949
35+
supported_categories = (HALF_DAY, PUBLIC)
36+
supported_languages = ("da", "en_US", "fo", "is", "no", "sv")
37+
38+
def __init__(self, *args, **kwargs):
39+
ChristianHolidays.__init__(self)
40+
InternationalHolidays.__init__(self)
41+
super().__init__(*args, **kwargs)
42+
43+
def _populate_public_holidays(self):
44+
# New Year's Day.
45+
self._add_new_years_day(tr("Nýggjársdagur"))
46+
47+
# Maundy Thursday.
48+
self._add_holy_thursday(tr("Skírhósdagur"))
49+
50+
# Good Friday.
51+
self._add_good_friday(tr("Langifríggjadagur"))
52+
53+
# Easter Sunday.
54+
self._add_easter_sunday(tr("Páskadagur"))
55+
56+
# Easter Monday.
57+
self._add_easter_monday(tr("Annar páskadagur"))
58+
59+
# Great Prayer Day.
60+
self._add_holiday_26_days_past_easter(tr("Dýri biðidagur"))
61+
62+
# Ascension Day.
63+
self._add_ascension_thursday(tr("Kristi himmalsferðardagur"))
64+
65+
# Whit Sunday.
66+
self._add_whit_sunday(tr("Hvítusunnudagur"))
67+
68+
# Whit Monday.
69+
self._add_whit_monday(tr("Annar hvítusunnudagur"))
70+
71+
# Saint Olaf's Day.
72+
self._add_holiday_jul_29(tr("Ólavsøkudagur"))
73+
74+
# Christmas Eve.
75+
self._add_christmas_eve(tr("Jólaaftan"))
76+
77+
# Christmas Day.
78+
self._add_christmas_day(tr("Jóladagur"))
79+
80+
# Second Day of Christmas.
81+
self._add_christmas_day_two(tr("Annar jóladagur"))
82+
83+
# New Year's Eve.
84+
self._add_new_years_eve(tr("Nýggjársaftan"))
85+
86+
def _populate_half_day_holidays(self):
87+
# National Flag Day.
88+
self._add_holiday_apr_25(tr("Flaggdagur"))
89+
90+
# Constitution Day.
91+
self._add_holiday_jun_5(tr("Grundlógardagur"))
92+
93+
# Saint Olaf's Eve.
94+
self._add_holiday_jul_28(tr("Ólavsøkuaftan"))
95+
96+
97+
class FO(FaroeIslands):
98+
pass
99+
100+
101+
class FRO(FaroeIslands):
102+
pass

holidays/locale/da/LC_MESSAGES/FO.po

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# holidays
2+
# --------
3+
# A fast, efficient Python library for generating country, province and state
4+
# specific sets of holidays on the fly. It aims to make determining whether a
5+
# specific date is a holiday as fast and flexible as possible.
6+
#
7+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8+
# dr-prodigy <[email protected]> (c) 2017-2023
9+
# ryanss <[email protected]> (c) 2014-2017
10+
# Website: https://github.com/vacanza/holidays
11+
# License: MIT (see LICENSE file)
12+
#
13+
# Faroe Islands holidays da localization.
14+
#
15+
msgid ""
16+
msgstr ""
17+
"Project-Id-Version: Holidays 0.77\n"
18+
"POT-Creation-Date: 2025-06-15 18:52+0530\n"
19+
"PO-Revision-Date: 2025-07-12 23:12+0300\n"
20+
"Last-Translator: ~Jhellico <[email protected]>\n"
21+
"Language-Team: Holidays Localization Team\n"
22+
"Language: da\n"
23+
"MIME-Version: 1.0\n"
24+
"Content-Type: text/plain; charset=UTF-8\n"
25+
"Content-Transfer-Encoding: 8bit\n"
26+
"Generated-By: Lingva 5.0.6\n"
27+
"X-Source-Language: fo\n"
28+
29+
#. New Year's Day.
30+
msgid "Nýggjársdagur"
31+
msgstr "Nytårsdag"
32+
33+
#. Maundy Thursday.
34+
msgid "Skírhósdagur"
35+
msgstr "Skærtorsdag"
36+
37+
#. Good Friday.
38+
msgid "Langifríggjadagur"
39+
msgstr "Langfredag"
40+
41+
#. Easter Sunday.
42+
msgid "Páskadagur"
43+
msgstr "Påskedag"
44+
45+
#. Easter Monday.
46+
msgid "Annar páskadagur"
47+
msgstr "Anden påskedag"
48+
49+
#. Great Prayer Day.
50+
msgid "Dýri biðidagur"
51+
msgstr "Store bededag"
52+
53+
#. Ascension Day.
54+
msgid "Kristi himmalsferðardagur"
55+
msgstr "Kristi himmelfartsdag"
56+
57+
#. Whit Sunday.
58+
msgid "Hvítusunnudagur"
59+
msgstr "Pinsedag"
60+
61+
#. Whit Monday.
62+
msgid "Annar hvítusunnudagur"
63+
msgstr "Anden pinsedag"
64+
65+
#. Saint Olaf's Day.
66+
msgid "Ólavsøkudagur"
67+
msgstr "Olavsdag"
68+
69+
#. Christmas Eve.
70+
msgid "Jólaaftan"
71+
msgstr "Juleaftensdag"
72+
73+
#. Christmas Day.
74+
msgid "Jóladagur"
75+
msgstr "Juledag"
76+
77+
#. Second Day of Christmas.
78+
msgid "Annar jóladagur"
79+
msgstr "Anden juledag"
80+
81+
#. New Year's Eve.
82+
msgid "Nýggjársaftan"
83+
msgstr "Nytårsaften"
84+
85+
#. National Flag Day.
86+
msgid "Flaggdagur"
87+
msgstr "Flagdag"
88+
89+
#. Constitution Day.
90+
msgid "Grundlógardagur"
91+
msgstr "Grundlovsdag"
92+
93+
#. Saint Olaf's Eve.
94+
msgid "Ólavsøkuaftan"
95+
msgstr "Olavsaften"
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# holidays
2+
# --------
3+
# A fast, efficient Python library for generating country, province and state
4+
# specific sets of holidays on the fly. It aims to make determining whether a
5+
# specific date is a holiday as fast and flexible as possible.
6+
#
7+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8+
# dr-prodigy <[email protected]> (c) 2017-2023
9+
# ryanss <[email protected]> (c) 2014-2017
10+
# Website: https://github.com/vacanza/holidays
11+
# License: MIT (see LICENSE file)
12+
#
13+
# Faroe Islands holidays en_US localization.
14+
#
15+
msgid ""
16+
msgstr ""
17+
"Project-Id-Version: Holidays 0.77\n"
18+
"POT-Creation-Date: 2025-06-15 18:52+0530\n"
19+
"PO-Revision-Date: 2025-07-12 23:12+0300\n"
20+
"Last-Translator: ~Jhellico <[email protected]>\n"
21+
"Language-Team: Holidays Localization Team\n"
22+
"Language: en_US\n"
23+
"MIME-Version: 1.0\n"
24+
"Content-Type: text/plain; charset=UTF-8\n"
25+
"Content-Transfer-Encoding: 8bit\n"
26+
"Generated-By: Lingva 5.0.6\n"
27+
"X-Source-Language: fo\n"
28+
29+
#. New Year's Day.
30+
msgid "Nýggjársdagur"
31+
msgstr "New Year's Day"
32+
33+
#. Maundy Thursday.
34+
msgid "Skírhósdagur"
35+
msgstr "Maundy Thursday"
36+
37+
#. Good Friday.
38+
msgid "Langifríggjadagur"
39+
msgstr "Good Friday"
40+
41+
#. Easter Sunday.
42+
msgid "Páskadagur"
43+
msgstr "Easter Sunday"
44+
45+
#. Easter Monday.
46+
msgid "Annar páskadagur"
47+
msgstr "Easter Monday"
48+
49+
#. Great Prayer Day.
50+
msgid "Dýri biðidagur"
51+
msgstr "Great Prayer Day"
52+
53+
#. Ascension Day.
54+
msgid "Kristi himmalsferðardagur"
55+
msgstr "Ascension Day"
56+
57+
#. Whit Sunday.
58+
msgid "Hvítusunnudagur"
59+
msgstr "Whit Sunday"
60+
61+
#. Whit Monday.
62+
msgid "Annar hvítusunnudagur"
63+
msgstr "Whit Monday"
64+
65+
#. Saint Olaf's Day.
66+
msgid "Ólavsøkudagur"
67+
msgstr "Saint Olaf's Day"
68+
69+
#. Christmas Eve.
70+
msgid "Jólaaftan"
71+
msgstr "Christmas Eve"
72+
73+
#. Christmas Day.
74+
msgid "Jóladagur"
75+
msgstr "Christmas Day"
76+
77+
#. Second Day of Christmas.
78+
msgid "Annar jóladagur"
79+
msgstr "Second Day of Christmas"
80+
81+
#. New Year's Eve.
82+
msgid "Nýggjársaftan"
83+
msgstr "New Year's Eve"
84+
85+
#. National Flag Day.
86+
msgid "Flaggdagur"
87+
msgstr "National Flag Day"
88+
89+
#. Constitution Day.
90+
msgid "Grundlógardagur"
91+
msgstr "Constitution Day"
92+
93+
#. Saint Olaf's Eve.
94+
msgid "Ólavsøkuaftan"
95+
msgstr "Saint Olaf's Eve"

0 commit comments

Comments
 (0)