Skip to content

Commit 3ff3c74

Browse files
Update Pakistan holidays: 2025 Ashura and Eid al-Adha dates (#2746)
Signed-off-by: Panpakorn Siripanich <[email protected]> Co-authored-by: Wasif Shahzad <[email protected]>
1 parent d61bf27 commit 3ff3c74

File tree

3 files changed

+84
-91
lines changed

3 files changed

+84
-91
lines changed

holidays/countries/pakistan.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Pakistan(HolidayBase, InternationalHolidays, IslamicHolidays):
3232
default_language = "en_PK"
3333
# %s (estimated).
3434
estimated_label = tr("%s (estimated)")
35+
# Achieved Independence on August 14th, 1947.
3536
start_year = 1948
3637
supported_languages = ("en_PK", "en_US", "ur_PK")
3738

@@ -105,8 +106,7 @@ class PAK(Pakistan):
105106

106107

107108
class PakistanIslamicHolidays(_CustomIslamicHolidays):
108-
# https://web.archive.org/web/20241123192805/https://www.timeanddate.com/holidays/pakistan/first-day-ashura
109-
109+
# https://web.archive.org/web/20250724060822/https://www.timeanddate.com/holidays/pakistan/ashura
110110
ASHURA_DATES = {
111111
2005: (FEB, 18),
112112
2006: (FEB, 8),
@@ -128,9 +128,10 @@ class PakistanIslamicHolidays(_CustomIslamicHolidays):
128128
2022: (AUG, 9),
129129
2023: (JUL, 28),
130130
2024: (JUL, 16),
131+
2025: (JUL, 6),
131132
}
132133

133-
# https://web.archive.org/web/20250424085932/https://www.timeanddate.com/holidays/pakistan/eid-ul-azha
134+
# https://web.archive.org/web/20250724060629/https://www.timeanddate.com/holidays/pakistan/eid-ul-azha
134135
EID_AL_ADHA_DATES = {
135136
2005: (JAN, 21),
136137
2006: ((JAN, 10), (DEC, 31)),
@@ -152,9 +153,10 @@ class PakistanIslamicHolidays(_CustomIslamicHolidays):
152153
2022: (JUL, 10),
153154
2023: (JUN, 29),
154155
2024: (JUN, 17),
156+
2025: (JUN, 7),
155157
}
156158

157-
# https://web.archive.org/web/20250414111814/https://www.timeanddate.com/holidays/pakistan/eid-ul-fitr-1
159+
# https://web.archive.org/web/20250724060834/https://www.timeanddate.com/holidays/pakistan/eid-ul-fitr-1
158160
EID_AL_FITR_DATES = {
159161
2005: (NOV, 4),
160162
2006: (OCT, 24),
@@ -179,7 +181,7 @@ class PakistanIslamicHolidays(_CustomIslamicHolidays):
179181
2025: (MAR, 31),
180182
}
181183

182-
# https://web.archive.org/web/20240529050144/https://www.timeanddate.com/holidays/pakistan/eid-milad-un-nabi
184+
# https://web.archive.org/web/20250724061027/https://www.timeanddate.com/holidays/pakistan/eid-milad-un-nabi
183185
MAWLID_DATES = {
184186
2005: (APR, 22),
185187
2006: (APR, 11),

snapshots/countries/PK_COMMON.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,11 +1065,11 @@
10651065
"2025-04-02": "Eid al-Fitr",
10661066
"2025-05-01": "Labor Day",
10671067
"2025-05-28": "Youm-e-Takbeer",
1068-
"2025-06-06": "Eid al-Adha (estimated)",
1069-
"2025-06-07": "Eid al-Adha (estimated)",
1070-
"2025-06-08": "Eid al-Adha (estimated)",
1071-
"2025-07-04": "Ashura (estimated)",
1072-
"2025-07-05": "Ashura (estimated)",
1068+
"2025-06-07": "Eid al-Adha",
1069+
"2025-06-08": "Eid al-Adha",
1070+
"2025-06-09": "Eid al-Adha",
1071+
"2025-07-05": "Ashura",
1072+
"2025-07-06": "Ashura",
10731073
"2025-08-14": "Independence Day",
10741074
"2025-09-04": "Prophet's Birthday (estimated)",
10751075
"2025-11-09": "Iqbal Day",

tests/countries/test_pakistan.py

Lines changed: 72 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@
1010
# Website: https://github.com/vacanza/holidays
1111
# License: MIT (see LICENSE file)
1212

13-
from datetime import date
1413
from unittest import TestCase
1514

16-
from holidays.calendars.gregorian import _timedelta
1715
from holidays.countries.pakistan import Pakistan, PK, PAK
1816
from tests.common import CommonCountryTests
1917

2018

2119
class TestPakistan(CommonCountryTests, TestCase):
2220
@classmethod
2321
def setUpClass(cls):
24-
super().setUpClass(Pakistan, years=range(1948, 2050))
25-
cls.no_estimated_holidays = Pakistan(years=range(2000, 2024), islamic_show_estimated=False)
22+
years = range(1948, 2050)
23+
super().setUpClass(Pakistan, years=years)
24+
cls.no_estimated_holidays = Pakistan(years=years, islamic_show_estimated=False)
2625

2726
def test_country_aliases(self):
2827
self.assertAliases(Pakistan, PK, PAK)
@@ -65,92 +64,84 @@ def test_quaid_e_azam_day(self):
6564

6665
def test_eid_ul_fitr(self):
6766
name = "Eid-ul-Fitr"
68-
for dt in (
69-
date(2000, 1, 8),
70-
date(2000, 12, 27),
71-
date(2001, 12, 16),
72-
date(2002, 12, 5),
73-
date(2003, 11, 25),
74-
date(2004, 11, 14),
75-
date(2005, 11, 4),
76-
date(2006, 10, 24),
77-
date(2013, 8, 8),
78-
date(2019, 6, 5),
79-
date(2020, 5, 24),
80-
date(2021, 5, 13),
81-
date(2022, 5, 3),
82-
date(2023, 4, 22),
83-
date(2024, 4, 10),
84-
date(2025, 3, 31),
85-
):
86-
self.assertHolidayName(
87-
name, self.no_estimated_holidays, dt, _timedelta(dt, +1), _timedelta(dt, +2)
88-
)
67+
self.assertHolidayName(
68+
name,
69+
"2020-05-24",
70+
"2020-05-25",
71+
"2020-05-26",
72+
"2021-05-13",
73+
"2021-05-14",
74+
"2021-05-15",
75+
"2022-05-03",
76+
"2022-05-04",
77+
"2022-05-05",
78+
"2023-04-22",
79+
"2023-04-23",
80+
"2023-04-24",
81+
"2024-04-10",
82+
"2024-04-11",
83+
"2024-04-12",
84+
"2025-03-31",
85+
"2025-04-01",
86+
"2025-04-02",
87+
)
88+
self.assertHolidayName(name, self.no_estimated_holidays, range(1948, 2050))
8989

9090
def test_eid_ul_adha(self):
9191
name = "Eid-ul-Adha"
92-
for dt in (
93-
date(2000, 3, 16),
94-
date(2001, 3, 5),
95-
date(2002, 2, 22),
96-
date(2003, 2, 11),
97-
date(2004, 2, 1),
98-
date(2005, 1, 21),
99-
date(2006, 1, 10),
100-
date(2006, 12, 31),
101-
date(2013, 10, 15),
102-
date(2019, 8, 12),
103-
date(2020, 7, 31),
104-
date(2021, 7, 21),
105-
date(2022, 7, 10),
106-
date(2023, 6, 29),
107-
date(2024, 6, 17),
108-
):
109-
self.assertHolidayName(
110-
name, self.no_estimated_holidays, dt, _timedelta(dt, +1), _timedelta(dt, +2)
111-
)
92+
self.assertHolidayName(
93+
name,
94+
"2020-07-31",
95+
"2020-08-01",
96+
"2020-08-02",
97+
"2021-07-21",
98+
"2021-07-22",
99+
"2021-07-23",
100+
"2022-07-10",
101+
"2022-07-11",
102+
"2022-07-12",
103+
"2023-06-29",
104+
"2023-06-30",
105+
"2023-07-01",
106+
"2024-06-17",
107+
"2024-06-18",
108+
"2024-06-19",
109+
"2025-06-07",
110+
"2025-06-08",
111+
"2025-06-09",
112+
)
113+
self.assertHolidayName(name, self.no_estimated_holidays, range(1948, 2050))
112114

113115
def test_eid_milad_un_nabi(self):
114116
name = "Eid Milad-un-Nabi"
115-
for dt in (
116-
date(2000, 6, 14),
117-
date(2001, 6, 4),
118-
date(2002, 5, 24),
119-
date(2003, 5, 13),
120-
date(2004, 5, 1),
121-
date(2005, 4, 22),
122-
date(2006, 4, 11),
123-
date(2013, 1, 24),
124-
date(2019, 11, 10),
125-
date(2020, 10, 30),
126-
date(2021, 10, 19),
127-
date(2022, 10, 9),
128-
date(2023, 9, 29),
129-
date(2024, 9, 17),
130-
):
131-
self.assertHolidayName(name, self.no_estimated_holidays, dt)
117+
self.assertHolidayName(
118+
name,
119+
"2020-10-30",
120+
"2021-10-19",
121+
"2022-10-09",
122+
"2023-09-29",
123+
"2024-09-17",
124+
)
125+
self.assertHolidayName(name, self.no_estimated_holidays, range(1948, 2050))
132126

133127
def test_ashura(self):
134128
name = "Ashura"
135-
for dt in (
136-
date(2000, 4, 15),
137-
date(2001, 4, 4),
138-
date(2002, 3, 24),
139-
date(2003, 3, 13),
140-
date(2004, 3, 1),
141-
date(2005, 2, 18),
142-
date(2006, 2, 8),
143-
date(2009, 1, 6),
144-
date(2009, 12, 26),
145-
date(2013, 11, 13),
146-
date(2019, 9, 9),
147-
date(2020, 8, 29),
148-
date(2021, 8, 18),
149-
date(2022, 8, 9),
150-
date(2023, 7, 28),
151-
date(2024, 7, 16),
152-
):
153-
self.assertHolidayName(name, self.no_estimated_holidays, dt, _timedelta(dt, -1))
129+
self.assertHolidayName(
130+
name,
131+
"2020-08-28",
132+
"2020-08-29",
133+
"2021-08-17",
134+
"2021-08-18",
135+
"2022-08-08",
136+
"2022-08-09",
137+
"2023-07-27",
138+
"2023-07-28",
139+
"2024-07-15",
140+
"2024-07-16",
141+
"2025-07-05",
142+
"2025-07-06",
143+
)
144+
self.assertHolidayName(name, self.no_estimated_holidays, range(1948, 2050))
154145

155146
def test_2002(self):
156147
self.assertHolidays(

0 commit comments

Comments
 (0)