+
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 243 country codes. The standard way to refer to a country is by using its [ISO
We currently support 244 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 @@ -1260,6 +1260,13 @@ any) in brackets, available languages and additional holiday categories. All cou
<td>GOVERNMENT, UNOFFICIAL</td>
</tr>
<tr>
<td>North Korea</td>
<td>KP</td>
<td></td>
<td>en_US, <strong>ko_KP</strong></td>
<td></td>
</tr>
<tr>
<td>North Macedonia</td>
<td>MK</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 @@ -175,6 +175,7 @@
from holidays.countries.nigeria import Nigeria, NG, NGA
from holidays.countries.niue import Niue, NU, NIU
from holidays.countries.norfolk_island import NorfolkIsland, NF, NFK
from holidays.countries.north_korea import NorthKorea, KP, PRK
from holidays.countries.north_macedonia import NorthMacedonia, MK, MKD
from holidays.countries.northern_mariana_islands import NorthernMarianaIslands, MP, MNP, HolidaysMP
from holidays.countries.norway import Norway, NO, NOR
Expand Down
161 changes: 161 additions & 0 deletions holidays/countries/north_korea.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# 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.chinese import KOREAN_CALENDAR
from holidays.groups import ChineseCalendarHolidays, InternationalHolidays
from holidays.holiday_base import HolidayBase


class NorthKorea(HolidayBase, ChineseCalendarHolidays, InternationalHolidays):
"""North Korea holidays.

References:
* <https://en.wikipedia.org/wiki/Public_holidays_in_North_Korea>
* <https://en.wikipedia.org/wiki/Day_of_Songun>
* <https://en.wikipedia.org/wiki/Dano_(festival)>
* <https://en.wikipedia.org/wiki/Cold_Food_Festival>
* <https://ko.wikipedia.org/wiki/조국해방전쟁_승리_기념일>
* [2025 Holidays](https://namu.wiki/w/공휴일/북한)
* [Korean People's Army](https://web.archive.org/web/20250824194534/https://namu.wiki/w/조선인민군)
* [Founding Day of the Korean People's Revolutionary Army](https://web.archive.org/web/20250909074255/https://www.nocutnews.co.kr/news/1091995)
* [Holidays and Anniversaries](http://archive.today/2025.09.21-064344/https://unikorea.go.kr/nkhr/current/life/living/daily/?boardId=bbs_0000000000000078&mode=view&cntId=51400)
* [Day of Songun](http://archive.today/2025.09.21-063344/https://namu.wiki/w/선군절)
* [2013 North Korea Calendar](https://web.archive.org/web/20250921062305/https://nk.chosun.com/news/articleView.html?idxno=151905)
* [Daeboreum in North Korea](https://web.archive.org/web/20230210091341/https://www.newsis.com/view/?id=NISX20200207_0000911479)
* [Day of the Shining Star](https://web.archive.org/web/20250921063234/https://www.munhwa.com/article/11412228)
* [Day of the Sun](http://archive.today/2025.09.21-063705/https://namu.wiki/w/태양절)
* [Cheongmyeong Festival](https://web.archive.org/web/20250324201145/https://namu.wiki/w/청명)
"""

country = "KP"
default_language = "ko_KP"
# %s (estimated).
estimated_label = tr("%s (추정된)")
start_year = 1948
supported_languages = ("en_US", "ko_KP")

def __init__(self, *args, **kwargs):
ChineseCalendarHolidays.__init__(self, calendar=KOREAN_CALENDAR)
InternationalHolidays.__init__(self)
super().__init__(*args, **kwargs)

def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("양력설"))

if self._year <= 1967 or self._year >= 1989:
# Korean New Year.
self._add_chinese_new_years_day(tr("설명절"))

if self._year >= 2003:
# Daeboreum.
self._add_daeboreum_day(tr("대보름"))

if self._year <= 1977 or self._year >= 2018:
# Founding Day of the Korean People's Army.
self._add_holiday_feb_8(tr("조선인민군창건일"))

if self._year >= 1975:
name = (
# Day of the Shining Star.
tr("광명성절")
if self._year >= 2012
# Kim Jong Il's Birthday.
else tr("김정일의 생일")
)
self._add_holiday_feb_16(name)
if self._year >= 1986:
self._add_holiday_feb_17(name)

# International Women's Day.
self._add_womens_day(tr("국제부녀절"))

if self._year >= 2012:
# Cheongmyeong Festival.
self._add_qingming_festival(tr("청명"))

if self._year <= 1967:
# Hanshi Festival.
self._add_hanshi_festival(tr("한식"))

if self._year == 1962 or self._year >= 1968:
name = (
# Day of the Sun.
tr("태양절")
if self._year >= 1998
# Kim Il-Sung's Birthday.
else tr("김일성의 생일")
)
self._add_holiday_apr_15(name)
if self._year >= 1998:
self._add_holiday_apr_16(name)

if self._year >= 1978:
self._add_holiday_apr_25(
# Founding Day of the Korean People's Revolutionary Army.
tr("조선인민혁명군 창건일")
if self._year >= 2018
# Armed Forces Day.
else tr("건군절")
)

# International Workers' Day.
self._add_labor_day(tr("전세계근로자들의 국제적명절"))

if self._year <= 1967:
# Dano.
self._add_dragon_boat_festival(tr("단오"))

# Foundation Day of the Korean Children's Union.
self._add_holiday_jun_6(tr("조선소년단 창립절"))

if self._year >= 1996:
# Day of Victory in the Great Fatherland Liberation War.
self._add_holiday_jul_27(tr("조국해방전쟁승리기념일"))

# Liberation Day.
self._add_holiday_aug_15(tr("조국해방절"))

if self._year <= 1966 or self._year >= 1989:
# Chuseok.
self._add_mid_autumn_festival(tr("추석"))

if self._year >= 2013:
# Day of Songun.
self._add_holiday_aug_25(tr("선군절"))

# Youth Day.
self._add_holiday_aug_28(tr("청년절"))

# Founding Day of the DPRK.
self._add_holiday_sep_9(tr("조선민주주의인민공화국창건일"))

# Foundation Day of the Workers' Party of Korea.
self._add_holiday_oct_10(tr("조선로동당창건일"))

if self._year >= 2012:
# Mother's Day.
self._add_holiday_nov_16(tr("어머니날"))

if self._year >= 1972:
# Socialist Constitution Day.
self._add_holiday_dec_27(tr("사회주의헌법절"))


class KP(NorthKorea):
pass


class PRK(NorthKorea):
pass
25 changes: 25 additions & 0 deletions holidays/groups/chinese.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,18 @@ def _add_chinese_new_years_day_five(self, name) -> Optional[date]:
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=+4
)

def _add_daeboreum_day(self, name) -> Optional[date]:
"""
Add Daeboreum Day (15th day of 1st lunar month).

Daeboreum is a Korean holiday that celebrates the first full moon
of the new year of the lunar Korean calendar.
https://en.wikipedia.org/wiki/Daeboreum
"""
return self._add_chinese_calendar_holiday(
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=+14
)

def _add_dongzhi_festival(self, name) -> Optional[date]:
"""
Add Dongzhi Festival (Chinese Winter Solstice).
Expand All @@ -194,6 +206,19 @@ def _add_dongzhi_festival(self, name) -> Optional[date]:
"""
return self._add_holiday(name, self._dongzhi_festival)

def _add_hanshi_festival(self, name) -> Optional[date]:
"""
Add Hanshi Festival (105 days after Winter Solstice).

The Cold Food or Hanshi Festival is a traditional Chinese holiday. Its name
derives from the tradition of avoiding the lighting of any kind of fire,
even for the preparation of food.
https://en.wikipedia.org/wiki/Cold_Food_Festival
"""
return self._add_chinese_calendar_holiday(
name, self._chinese_calendar.winter_solstice_date(self._year - 1), days_delta=+105
)

def _add_qingming_festival(self, name) -> date:
"""
Add Qingming Festival (15th day after the Spring Equinox).
Expand Down
132 changes: 132 additions & 0 deletions holidays/locale/en_US/LC_MESSAGES/KP.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# 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)
#
# North Korea holidays en_US localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.82\n"
"POT-Creation-Date: 2025-09-07 18:20+0500\n"
"PO-Revision-Date: 2025-09-07 18:20+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-Source-Language: ko_KP\n"

#. %s (estimated).
#, c-format
msgid "%s (추정된)"
msgstr "%s (estimated)"

#. New Year's Day.
msgid "양력설"
msgstr "New Year's Day"

#. Korean New Year.
msgid "설명절"
msgstr "Korean New Year"

#. Daeboreum.
msgid "대보름"
msgstr "Daeboreum"

#. Founding Day of the Korean People's Army.
msgid "조선인민군창건일"
msgstr "Founding Day of the Korean People's Army"

#. Day of the Shining Star.
msgid "광명성절"
msgstr "Day of the Shining Star"

#. Kim Jong Il's Birthday.
msgid "김정일의 생일"
msgstr "Kim Jong Il's Birthday"

#. International Women's Day.
msgid "국제부녀절"
msgstr "International Women's Day"

#. Cheongmyeong Festival.
msgid "청명"
msgstr "Cheongmyeong Festival"

#. Hanshi Festival.
msgid "한식"
msgstr "Hanshi Festival"

#. Day of the Sun.
msgid "태양절"
msgstr "Day of the Sun"

#. Kim Il-Sung's Birthday.
msgid "김일성의 생일"
msgstr "Kim Il-Sung's Birthday"

#. Founding Day of the Korean People's Revolutionary Army.
msgid "조선인민혁명군 창건일"
msgstr "Founding Day of the Korean People's Revolutionary Army"

#. Armed Forces Day.
msgid "건군절"
msgstr "Armed Forces Day"

#. International Workers' Day.
msgid "전세계근로자들의 국제적명절"
msgstr "International Workers' Day"

#. Dano.
msgid "단오"
msgstr "Dano"

#. Foundation Day of the Korean Children's Union.
msgid "조선소년단 창립절"
msgstr "Foundation Day of the Korean Children's Union"

#. Day of Victory in the Great Fatherland Liberation War.
msgid "조국해방전쟁승리기념일"
msgstr "Day of Victory in the Great Fatherland Liberation War"

#. Liberation Day.
msgid "조국해방절"
msgstr "Liberation Day"

#. Chuseok.
msgid "추석"
msgstr "Chuseok"

#. Day of Songun.
msgid "선군절"
msgstr "Day of Songun"

#. Youth Day.
msgid "청년절"
msgstr "Youth Day"

#. Founding Day of the DPRK.
msgid "조선민주주의인민공화국창건일"
msgstr "Founding Day of the DPRK"

#. Foundation Day of the Workers' Party of Korea.
msgid "조선로동당창건일"
msgstr "Foundation Day of the Workers' Party of Korea"

#. Mother's Day.
msgid "어머니날"
msgstr "Mother's Day"

#. Socialist Constitution Day.
msgid "사회주의헌법절"
msgstr "Socialist Constitution Day"
Loading
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载