-
-
Notifications
You must be signed in to change notification settings - Fork 688
Add Tajikistan holidays #2852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add Tajikistan holidays #2852
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a4c0369
Initial commit
Wasif-Shahzad 2f43759
Merge remote-tracking branch 'upstream/dev' into tajikistan-holidays
Wasif-Shahzad e7c8500
Update country count
Wasif-Shahzad d0c824a
Add review suggestions
Wasif-Shahzad 281cf33
Merge remote-tracking branch 'upstream/dev' into tajikistan-holidays
Wasif-Shahzad dea98ce
Update country count
Wasif-Shahzad 4a70c52
Update Nowruz en_US l10n and reformat tajikistan.py
Wasif-Shahzad a06d839
Fix tajik alphabets
Wasif-Shahzad 1c19e9d
update tests for nowruz
Wasif-Shahzad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,116 @@ | ||
| # 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 CONTRIBUTORS file) | ||
| # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023 | ||
| # ryanss <ryanssdev@icloud.com> (c) 2014-2017 | ||
| # Website: https://github.com/vacanza/holidays | ||
| # License: MIT (see LICENSE file) | ||
|
|
||
| from gettext import gettext as tr | ||
|
|
||
| from holidays.calendars import _CustomIslamicHolidays | ||
| from holidays.calendars.gregorian import APR | ||
| from holidays.groups import InternationalHolidays, IslamicHolidays | ||
| from holidays.holiday_base import HolidayBase | ||
|
|
||
|
|
||
| class Tajikistan(HolidayBase, InternationalHolidays, IslamicHolidays): | ||
| """Tajikistan holidays. | ||
|
|
||
| References: | ||
| * <https://en.wikipedia.org/wiki/Public_holidays_in_Tajikistan> | ||
| * [Law #3 from Nov 3, 1995](https://web.archive.org/web/20250823162418/http://www.portali-huquqi.tj/publicadliya/view_qonunhoview.php?showdetail=&asosi_id=155&language=tj) | ||
| * [Law #753 from Aug 2, 2011](https://web.archive.org/web/20250823162543/http://www.portali-huquqi.tj/publicadliya/view_qonunhoview.php?showdetail=&asosi_id=12997&language=tj) | ||
| * [Independence Day](https://web.archive.org/web/20250324203223/https://tnu.tj/index.php/en/9-september-independence-day-of-the-republic-of-tajikistan/) | ||
| """ | ||
|
|
||
| country = "TJ" | ||
| default_language = "tg" | ||
| # %s (estimated). | ||
| estimated_label = tr("%s (таҳминан)") | ||
| start_year = 1992 | ||
| supported_languages = ("en_US", "ru", "tg") | ||
|
|
||
| def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs): | ||
| """ | ||
| Args: | ||
| islamic_show_estimated: | ||
| Whether to add "estimated" label to Islamic holidays name | ||
| if holiday date is estimated. | ||
| """ | ||
| InternationalHolidays.__init__(self) | ||
| IslamicHolidays.__init__( | ||
| self, cls=TajikistanIslamicHolidays, show_estimated=islamic_show_estimated | ||
| ) | ||
| super().__init__(*args, **kwargs) | ||
|
|
||
| def _populate_public_holidays(self): | ||
| # New Year's Day. | ||
| self._add_new_years_day(tr("Соли Нав")) | ||
|
|
||
| # Mother's Day. | ||
| self._add_holiday_mar_8(tr("Рӯзи Модар")) | ||
|
KJhellico marked this conversation as resolved.
|
||
|
|
||
| # International Nowruz Day. | ||
| name = tr("Иди байналмилалии Наврӯз") | ||
| self._add_holiday_mar_21(name) | ||
| self._add_holiday_mar_22(name) | ||
|
arkid15r marked this conversation as resolved.
|
||
|
|
||
| # Established by Law #13 from May 3, 2002. | ||
| if self._year >= 2003: | ||
| self._add_holiday_mar_23(name) | ||
|
|
||
| # Established by Law #146 from Dec 28, 2005. | ||
| if self._year >= 2006: | ||
| self._add_holiday_mar_24(name) | ||
|
|
||
| # Abolished by Law #1390 from Feb 24, 2017. | ||
| if self._year <= 2016: | ||
| # International Workers' Solidarity Day. | ||
| self._add_labor_day(tr("Рӯзи байналхалқии якдилии меҳнаткашон")) | ||
|
|
||
| self._add_world_war_two_victory_day( | ||
| # Victory Day. | ||
| tr("Рӯзи Ғалаба дар Ҷанги Бузурги Ватанӣ"), | ||
| is_western=False, | ||
| ) | ||
|
|
||
| # Established by Law #628 from May 22, 1998. | ||
| if self._year >= 1998: | ||
|
KJhellico marked this conversation as resolved.
|
||
| # Day of National Unity. | ||
| self._add_holiday_jun_27(tr("Рӯзи Ваҳдати миллӣ")) | ||
|
|
||
| # Independence Day. | ||
| self._add_holiday_sep_9(tr("Рӯзи Истиқлолияти давлатии Ҷумҳурии Тоҷикистон")) | ||
|
|
||
| if self._year >= 1994: | ||
| # Constitution Day. | ||
| self._add_holiday_nov_6(tr("Рӯзи Конститутсияи Ҷумҳурии Тоҷикистон")) | ||
|
|
||
| # Eid al-Fitr. | ||
| self._add_eid_al_fitr_day(tr("Рӯзи иди Рамазон")) | ||
|
|
||
| # Eid al-Adha. | ||
| self._add_eid_al_adha_day(tr("Рӯзи иди Қурбон")) | ||
|
|
||
|
|
||
| class TJ(Tajikistan): | ||
| pass | ||
|
|
||
|
|
||
| class TJK(Tajikistan): | ||
| pass | ||
|
|
||
|
|
||
| class TajikistanIslamicHolidays(_CustomIslamicHolidays): | ||
| # https://www.timeanddate.com/holidays/tajikistan/eid-al-fitr | ||
| EID_AL_FITR_DATES_CONFIRMED_YEARS = (1992, 2025) | ||
| EID_AL_FITR_DATES = { | ||
| 2023: (APR, 22), | ||
| } | ||
|
|
||
| EID_AL_ADHA_DATES_CONFIRMED_YEARS = (1992, 2025) | ||
This file contains hidden or 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,73 @@ | ||
| # 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 CONTRIBUTORS file) | ||
| # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023 | ||
| # ryanss <ryanssdev@icloud.com> (c) 2014-2017 | ||
| # Website: https://github.com/vacanza/holidays | ||
| # License: MIT (see LICENSE file) | ||
| # | ||
| # Tajikistan holidays en_US localization. | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Holidays 0.80\n" | ||
| "POT-Creation-Date: 2025-08-23 06:13+0500\n" | ||
| "PO-Revision-Date: 2025-08-23 06:19+0500\n" | ||
| "Last-Translator: Wasif Shahzad <wasif_shahzad_1@outlook.com>\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.6\n" | ||
| "X-Generator: Poedit 3.7\n" | ||
| "X-Source-Language: tg\n" | ||
|
|
||
| #. %s (estimated). | ||
| #, c-format | ||
| msgid "%s (таҳминан)" | ||
| msgstr "%s (estimated)" | ||
|
|
||
| #. New Year's Day. | ||
| msgid "Соли Нав" | ||
| msgstr "New Year's Day" | ||
|
|
||
| #. Mother's Day. | ||
| msgid "Рӯзи Модар" | ||
| msgstr "Mother's Day" | ||
|
|
||
| #. International Nowruz Day. | ||
| msgid "Иди байналмилалии Наврӯз" | ||
| msgstr "International Nowruz Day" | ||
|
|
||
| #. International Workers' Solidarity Day. | ||
| msgid "Рӯзи байналхалқии якдилии меҳнаткашон" | ||
| msgstr "International Workers' Solidarity Day" | ||
|
|
||
| #. Victory Day. | ||
| msgid "Рӯзи Ғалаба дар Ҷанги Бузурги Ватанӣ" | ||
| msgstr "Victory Day" | ||
|
|
||
| #. Day of National Unity. | ||
| msgid "Рӯзи Ваҳдати миллӣ" | ||
| msgstr "National Unity Day" | ||
|
|
||
|
KJhellico marked this conversation as resolved.
|
||
| #. Independence Day. | ||
| msgid "Рӯзи Истиқлолияти давлатии Ҷумҳурии Тоҷикистон" | ||
| msgstr "Independence Day" | ||
|
|
||
| #. Constitution Day. | ||
| msgid "Рӯзи Конститутсияи Ҷумҳурии Тоҷикистон" | ||
| msgstr "Constitution Day" | ||
|
|
||
| #. Eid al-Fitr. | ||
| msgid "Рӯзи иди Рамазон" | ||
| msgstr "Eid al-Fitr" | ||
|
|
||
| #. Eid al-Adha. | ||
| msgid "Рӯзи иди Қурбон" | ||
| msgstr "Eid al-Adha" | ||
This file contains hidden or 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,73 @@ | ||
| # 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 CONTRIBUTORS file) | ||
| # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023 | ||
| # ryanss <ryanssdev@icloud.com> (c) 2014-2017 | ||
| # Website: https://github.com/vacanza/holidays | ||
| # License: MIT (see LICENSE file) | ||
| # | ||
| # Tajikistan holidays ru localization. | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Holidays 0.80\n" | ||
| "POT-Creation-Date: 2025-08-23 06:13+0500\n" | ||
| "PO-Revision-Date: 2025-08-23 06:23+0500\n" | ||
| "Last-Translator: Wasif Shahzad <wasif_shahzad_1@outlook.com>\n" | ||
| "Language-Team: Holidays Localization Team\n" | ||
| "Language: ru\n" | ||
| "MIME-Version: 1.0\n" | ||
| "Content-Type: text/plain; charset=UTF-8\n" | ||
| "Content-Transfer-Encoding: 8bit\n" | ||
| "Generated-By: Lingva 5.0.6\n" | ||
| "X-Generator: Poedit 3.7\n" | ||
| "X-Source-Language: tg\n" | ||
|
|
||
| #. %s (estimated). | ||
| #, c-format | ||
| msgid "%s (таҳминан)" | ||
| msgstr "%s (приблизительная дата)" | ||
|
|
||
| #. New Year's Day. | ||
| msgid "Соли Нав" | ||
| msgstr "Новый год" | ||
|
|
||
| #. Mother's Day. | ||
| msgid "Рӯзи Модар" | ||
| msgstr "День Матери" | ||
|
|
||
|
KJhellico marked this conversation as resolved.
|
||
| #. International Nowruz Day. | ||
| msgid "Иди байналмилалии Наврӯз" | ||
| msgstr "Международный праздник Навруз" | ||
|
|
||
| #. International Workers' Solidarity Day. | ||
| msgid "Рӯзи байналхалқии якдилии меҳнаткашон" | ||
| msgstr "Международный день солидарности трудящихся" | ||
|
|
||
| #. Victory Day. | ||
| msgid "Рӯзи Ғалаба дар Ҷанги Бузурги Ватанӣ" | ||
| msgstr "День Победы в Великой Отечественной войне" | ||
|
|
||
| #. Day of National Unity. | ||
| msgid "Рӯзи Ваҳдати миллӣ" | ||
| msgstr "День Национального единства" | ||
|
|
||
|
KJhellico marked this conversation as resolved.
|
||
| #. Independence Day. | ||
| msgid "Рӯзи Истиқлолияти давлатии Ҷумҳурии Тоҷикистон" | ||
| msgstr "День Государственной независимости Республики Таджикистан" | ||
|
|
||
| #. Constitution Day. | ||
| msgid "Рӯзи Конститутсияи Ҷумҳурии Тоҷикистон" | ||
| msgstr "День Конституции Республики Таджикистан" | ||
|
|
||
| #. Eid al-Fitr. | ||
| msgid "Рӯзи иди Рамазон" | ||
| msgstr "Ураза-байрам" | ||
|
|
||
| #. Eid al-Adha. | ||
| msgid "Рӯзи иди Қурбон" | ||
| msgstr "Курбан-байрам" | ||
This file contains hidden or 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,72 @@ | ||
| # 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 CONTRIBUTORS file) | ||
| # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023 | ||
| # ryanss <ryanssdev@icloud.com> (c) 2014-2017 | ||
| # Website: https://github.com/vacanza/holidays | ||
| # License: MIT (see LICENSE file) | ||
| # | ||
| # Tajikistan holidays. | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Holidays 0.80\n" | ||
| "POT-Creation-Date: 2025-08-23 06:13+0500\n" | ||
| "PO-Revision-Date: 2025-08-23 06:13+0500\n" | ||
| "Last-Translator: Wasif Shahzad <wasif_shahzad_1@outlook.com>\n" | ||
| "Language-Team: Holidays Localization Team\n" | ||
| "Language: tg\n" | ||
| "MIME-Version: 1.0\n" | ||
| "Content-Type: text/plain; charset=UTF-8\n" | ||
| "Content-Transfer-Encoding: 8bit\n" | ||
| "Generated-By: Lingva 5.0.6\n" | ||
| "X-Source-Language: tg\n" | ||
|
|
||
| #. %s (estimated). | ||
| #, c-format | ||
| msgid "%s (таҳминан)" | ||
| msgstr "" | ||
|
|
||
| #. New Year's Day. | ||
| msgid "Соли Нав" | ||
| msgstr "" | ||
|
|
||
| #. Mother's Day. | ||
| msgid "Рӯзи Модар" | ||
| msgstr "" | ||
|
|
||
| #. International Nowruz Day. | ||
| msgid "Иди байналмилалии Наврӯз" | ||
| msgstr "" | ||
|
|
||
|
KJhellico marked this conversation as resolved.
|
||
| #. International Workers' Solidarity Day. | ||
| msgid "Рӯзи байналхалқии якдилии меҳнаткашон" | ||
| msgstr "" | ||
|
|
||
| #. Victory Day. | ||
| msgid "Рӯзи Ғалаба дар Ҷанги Бузурги Ватанӣ" | ||
| msgstr "" | ||
|
|
||
| #. Day of National Unity. | ||
| msgid "Рӯзи Ваҳдати миллӣ" | ||
| msgstr "" | ||
|
|
||
| #. Independence Day. | ||
| msgid "Рӯзи Истиқлолияти давлатии Ҷумҳурии Тоҷикистон" | ||
| msgstr "" | ||
|
|
||
| #. Constitution Day. | ||
| msgid "Рӯзи Конститутсияи Ҷумҳурии Тоҷикистон" | ||
| msgstr "" | ||
|
|
||
| #. Eid al-Fitr. | ||
| msgid "Рӯзи иди Рамазон" | ||
| msgstr "" | ||
|
|
||
| #. Eid al-Adha. | ||
| msgid "Рӯзи иди Қурбон" | ||
| msgstr "" | ||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.