Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ and detailed information.

## Available Countries

We currently support 235 country codes. The standard way to refer to a country is by using its [ISO
We currently support 236 country codes. The standard way to refer to a country is by using its [ISO
3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes), the same used
for domain names, and for a subdivision its [ISO 3166-2
code](https://en.wikipedia.org/wiki/ISO_3166-2). Some countries have common or foreign names or
Expand Down Expand Up @@ -1596,6 +1596,13 @@ any) in brackets, available languages and additional holiday categories. All cou
<td>GOVERNMENT, OPTIONAL, SCHOOL, WORKDAY</td>
</tr>
<tr>
<td>Tajikistan</td>
<td>TJ</td>
<td></td>
<td>en_US, ru, <strong>tg</strong></td>
<td></td>
</tr>
<tr>
<td>Tanzania</td>
<td>TZ</td>
<td></td>
Expand Down
1 change: 1 addition & 0 deletions holidays/countries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
from holidays.countries.switzerland import Switzerland, CH, CHE
from holidays.countries.syrian_arab_republic import SyrianArabRepublic, SY, SYR
from holidays.countries.taiwan import Taiwan, TW, TWN
from holidays.countries.tajikistan import Tajikistan, TJ, TJK
from holidays.countries.tanzania import Tanzania, TZ, TZA
from holidays.countries.thailand import Thailand, TH, THA
from holidays.countries.timor_leste import TimorLeste, TL, TLS
Expand Down
116 changes: 116 additions & 0 deletions holidays/countries/tajikistan.py
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
Comment thread
KJhellico marked this conversation as resolved.
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("Рӯзи Модар"))
Comment thread
KJhellico marked this conversation as resolved.

# International Nowruz Day.
name = tr("Иди байналмилалии Наврӯз")
self._add_holiday_mar_21(name)
self._add_holiday_mar_22(name)
Comment thread
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:
Comment thread
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)
73 changes: 73 additions & 0 deletions holidays/locale/en_US/LC_MESSAGES/TJ.po
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"

Comment thread
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"
73 changes: 73 additions & 0 deletions holidays/locale/ru/LC_MESSAGES/TJ.po
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 "День Матери"

Comment thread
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 "День Национального единства"

Comment thread
KJhellico marked this conversation as resolved.
#. Independence Day.
msgid "Рӯзи Истиқлолияти давлатии Ҷумҳурии Тоҷикистон"
msgstr "День Государственной независимости Республики Таджикистан"

#. Constitution Day.
msgid "Рӯзи Конститутсияи Ҷумҳурии Тоҷикистон"
msgstr "День Конституции Республики Таджикистан"

#. Eid al-Fitr.
msgid "Рӯзи иди Рамазон"
msgstr "Ураза-байрам"

#. Eid al-Adha.
msgid "Рӯзи иди Қурбон"
msgstr "Курбан-байрам"
72 changes: 72 additions & 0 deletions holidays/locale/tg/LC_MESSAGES/TJ.po
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 ""

Comment thread
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 ""
1 change: 1 addition & 0 deletions holidays/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
"switzerland": ("Switzerland", "CH", "CHE"),
"syrian_arab_republic": ("SyrianArabRepublic", "SY", "SYR"),
"taiwan": ("Taiwan", "TW", "TWN"),
"tajikistan": ("Tajikistan", "TJ", "TJK"),
"tanzania": ("Tanzania", "TZ", "TZA"),
Comment thread
KJhellico marked this conversation as resolved.
"thailand": ("Thailand", "TH", "THA"),
"timor_leste": ("TimorLeste", "TL", "TLS"),
Expand Down
Loading
Loading