-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: PPsyrius <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]>
- Loading branch information
1 parent
9c8b43a
commit 512ad34
Showing
10 changed files
with
2,000 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# holidays | ||
# -------- | ||
# A fast, efficient Python library for generating country, province and state | ||
# specific sets of holidays on the fly. It aims to make determining whether a | ||
# specific date is a holiday as fast and flexible as possible. | ||
# | ||
# Authors: Vacanza Team and individual contributors (see AUTHORS file) | ||
# dr-prodigy <[email protected]> (c) 2017-2023 | ||
# ryanss <[email protected]> (c) 2014-2017 | ||
# Website: https://github.com/vacanza/holidays | ||
# License: MIT (see LICENSE file) | ||
|
||
from gettext import gettext as tr | ||
|
||
from holidays.groups import InternationalHolidays, IslamicHolidays | ||
from holidays.holiday_base import HolidayBase | ||
|
||
|
||
class Afghanistan(HolidayBase, InternationalHolidays, IslamicHolidays): | ||
""" | ||
https://en.wikipedia.org/wiki/Public_holidays_in_Afghanistan | ||
https://www.timeanddate.com/holidays/afghanistan/ | ||
""" | ||
|
||
country = "AF" | ||
default_language = "fa_AF" | ||
# %s (estimated). | ||
estimated_label = tr("%s (برآورد شده)") | ||
# %s (observed). | ||
observed_label = tr("%s (مشاهده شده)") | ||
# %s (observed, estimated). | ||
observed_estimated_label = tr("%s (مشاهده شده، برآورد شده)") | ||
supported_languages = ("en_US", "fa_AF", "ps_AF") | ||
# Afghanistan's regaining of full independence from British influence. | ||
start_year = 1919 | ||
|
||
def __init__(self, *args, **kwargs): | ||
InternationalHolidays.__init__(self) | ||
IslamicHolidays.__init__(self) | ||
super().__init__(*args, **kwargs) | ||
|
||
def _populate_public_holidays(self): | ||
if self._year >= 1989: | ||
# Liberation Day. | ||
self._add_holiday_feb_15(tr("روز آزادی")) | ||
|
||
# Afghanistan Independence Day. | ||
self._add_holiday_aug_19(tr("روز استقلال افغانستان")) | ||
|
||
if self._year <= 1996 or 2001 <= self._year <= 2020: | ||
# Nowruz. | ||
self._add_holiday_mar_21(tr("نوروز")) | ||
|
||
if self._year >= 1992: | ||
# Mojahedin's Victory Day. | ||
self._add_holiday_apr_28(tr("روز پیروزی مجاهدین")) | ||
|
||
if 1974 <= self._year <= 1996 or 2002 <= self._year <= 2021: | ||
# International Workers' Day. | ||
self._add_labor_day(tr("روز جهانی کارگر")) | ||
|
||
if 1978 <= self._year <= 1988: | ||
# Soviet Victory Day. | ||
self._add_holiday_may_9(tr("روز پیروزی شوروی")) | ||
|
||
if self._year >= 2022: | ||
# American Withdrawal Day. | ||
self._add_holiday_aug_31(tr("روز خروج آمریکایی ها")) | ||
|
||
if self._year >= 2012: | ||
# Martyrs' Day. | ||
self._add_holiday_sep_9(tr("روز شهیدان")) | ||
|
||
# Eid al-Fitr. | ||
name = tr("عید فطر") | ||
self._add_eid_al_fitr_day(name) | ||
self._add_eid_al_fitr_day_two(name) | ||
self._add_eid_al_fitr_day_three(name) | ||
|
||
# Day of Arafah. | ||
self._add_arafah_day(tr("روز عرفه")) | ||
|
||
# Eid al-Adha. | ||
name = tr("عید قربانی") | ||
self._add_eid_al_adha_day(name) | ||
self._add_eid_al_adha_day_two(name) | ||
self._add_eid_al_adha_day_three(name) | ||
|
||
# Ashura. | ||
self._add_ashura_day(tr("عاشورا")) | ||
|
||
# First Day of Ramadan. | ||
self._add_ramadan_beginning_day(tr("اول رمضان")) | ||
|
||
# Prophet's Birthday. | ||
self._add_mawlid_day(tr("میلاد پیامبر")) | ||
|
||
|
||
class AF(Afghanistan): | ||
pass | ||
|
||
|
||
class AFG(Afghanistan): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# holidays | ||
# -------- | ||
# A fast, efficient Python library for generating country, province and state | ||
# specific sets of holidays on the fly. It aims to make determining whether a | ||
# specific date is a holiday as fast and flexible as possible. | ||
# | ||
# Authors: Vacanza Team and individual contributors (see AUTHORS file) | ||
# dr-prodigy <[email protected]> (c) 2017-2023 | ||
# ryanss <[email protected]> (c) 2014-2017 | ||
# Website: https://github.com/vacanza/holidays | ||
# License: MIT (see LICENSE file) | ||
# | ||
# Afghanistan holidays en_US localization. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Holidays 0.64\n" | ||
"POT-Creation-Date: 2024-12-24 13:40+0530\n" | ||
"PO-Revision-Date: 2024-12-31 15:52+0700\n" | ||
"Last-Translator: Prateekshit Jaiswal <[email protected]>\n" | ||
"Language-Team: Holidays Localization Team\n" | ||
"Language: en_US\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Lingva 5.0.4\n" | ||
"X-Generator: Poedit 3.5\n" | ||
|
||
#. Liberation Day. | ||
msgid "روز آزادی" | ||
msgstr "Liberation Day" | ||
|
||
#. Nowruz. | ||
msgid "نوروز" | ||
msgstr "Nowruz" | ||
|
||
#. International Workers' Day. | ||
msgid "روز جهانی کارگر" | ||
msgstr "International Workers' Day" | ||
|
||
#. Martyrs' Day. | ||
msgid "روز شهیدان" | ||
msgstr "Martyrs' Day" | ||
|
||
#. Day of Arafah. | ||
msgid "روز عرفه" | ||
msgstr "Day of Arafah" | ||
|
||
#. Ashura. | ||
msgid "عاشورا" | ||
msgstr "Ashura" | ||
|
||
#. Prophet's Birthday. | ||
msgid "میلاد پیامبر" | ||
msgstr "Prophet's Birthday" | ||
|
||
#. First Day of Ramadan. | ||
msgid "اول رمضان" | ||
msgstr "First Day of Ramadan" | ||
|
||
#. %s (estimated). | ||
#, c-format | ||
msgid "%s (برآورد شده)" | ||
msgstr "%s (estimated)" | ||
|
||
#. %s (observed). | ||
#, c-format | ||
msgid "%s (مشاهده شده)" | ||
msgstr "%s (observed)" | ||
|
||
#. %s (observed, estimated). | ||
#, c-format | ||
msgid "%s (مشاهده شده، برآورد شده)" | ||
msgstr "%s (observed, estimated)" | ||
|
||
#. Soviet Victory Day. | ||
msgid "روز پیروزی شوروی" | ||
msgstr "Soviet Victory Day" | ||
|
||
#. Mojahedin's Victory Day. | ||
msgid "روز پیروزی مجاهدین" | ||
msgstr "Mojahedin's Victory Day" | ||
|
||
#. Afghanistan Independence Day. | ||
msgid "روز استقلال افغانستان" | ||
msgstr "Afghanistan Independence Day" | ||
|
||
#. Eid al-Fitr. | ||
msgid "عید فطر" | ||
msgstr "Eid al-Fitr" | ||
|
||
#. Eid al-Adha. | ||
msgid "عید قربانی" | ||
msgstr "Eid al-Adha" | ||
|
||
#. American Withdrawal Day. | ||
msgid "روز خروج آمریکایی ها" | ||
msgstr "American Withdrawal Day" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# holidays | ||
# -------- | ||
# A fast, efficient Python library for generating country, province and state | ||
# specific sets of holidays on the fly. It aims to make determining whether a | ||
# specific date is a holiday as fast and flexible as possible. | ||
# | ||
# Authors: Vacanza Team and individual contributors (see AUTHORS file) | ||
# dr-prodigy <[email protected]> (c) 2017-2023 | ||
# ryanss <[email protected]> (c) 2014-2017 | ||
# Website: https://github.com/vacanza/holidays | ||
# License: MIT (see LICENSE file) | ||
# | ||
# Afghanistan holidays. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Holidays 0.64\n" | ||
"POT-Creation-Date: 2024-12-24 13:40+0530\n" | ||
"PO-Revision-Date: 2024-12-31 15:53+0700\n" | ||
"Last-Translator: Prateekshit Jaiswal <[email protected]>\n" | ||
"Language-Team: Holidays Localization Team\n" | ||
"Language: fa\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Lingva 5.0.4\n" | ||
"X-Generator: Poedit 3.5\n" | ||
|
||
#. Liberation Day. | ||
msgid "روز آزادی" | ||
msgstr "" | ||
|
||
#. Nowruz. | ||
msgid "نوروز" | ||
msgstr "" | ||
|
||
#. International Workers' Day. | ||
msgid "روز جهانی کارگر" | ||
msgstr "" | ||
|
||
#. Martyrs' Day. | ||
msgid "روز شهیدان" | ||
msgstr "" | ||
|
||
#. Day of Arafah. | ||
msgid "روز عرفه" | ||
msgstr "" | ||
|
||
#. Ashura. | ||
msgid "عاشورا" | ||
msgstr "" | ||
|
||
#. Prophet's Birthday. | ||
msgid "میلاد پیامبر" | ||
msgstr "" | ||
|
||
#. First Day of Ramadan. | ||
msgid "اول رمضان" | ||
msgstr "" | ||
|
||
#. %s (estimated). | ||
#, c-format | ||
msgid "%s (برآورد شده)" | ||
msgstr "" | ||
|
||
#. %s (observed). | ||
#, c-format | ||
msgid "%s (مشاهده شده)" | ||
msgstr "" | ||
|
||
#. %s (observed, estimated). | ||
#, c-format | ||
msgid "%s (مشاهده شده، برآورد شده)" | ||
msgstr "" | ||
|
||
#. Soviet Victory Day. | ||
msgid "روز پیروزی شوروی" | ||
msgstr "" | ||
|
||
#. Mojahedin's Victory Day. | ||
msgid "روز پیروزی مجاهدین" | ||
msgstr "" | ||
|
||
#. Afghanistan Independence Day. | ||
msgid "روز استقلال افغانستان" | ||
msgstr "" | ||
|
||
#. Eid al-Fitr. | ||
msgid "عید فطر" | ||
msgstr "" | ||
|
||
#. Eid al-Adha. | ||
msgid "عید قربانی" | ||
msgstr "" | ||
|
||
#. American Withdrawal Day. | ||
msgid "روز خروج آمریکایی ها" | ||
msgstr "" |
Oops, something went wrong.