-
-
Notifications
You must be signed in to change notification settings - Fork 557
Add Ivory Coast holidays #2388
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
Add Ivory Coast holidays #2388
Conversation
Summary by CodeRabbit
WalkthroughThis pull request introduces comprehensive support for Ivory Coast within the holiday management library. It updates the documentation to reflect the addition of Ivory Coast as a supported country, adds a new class to manage Ivory Coast holidays, and includes necessary imports and registry updates. Additionally, it introduces localization files for multiple languages and implements unit tests to ensure the accuracy of the holiday data and functionality for Ivory Coast. Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (2)holidays/groups/islamic.py (2)
holidays/countries/ivory_coast.py (5)
🧬 Code Definitions (2)holidays/groups/islamic.py (1)
holidays/countries/ivory_coast.py (1)
🔇 Additional comments (26)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/ivory_coast.py
(1 hunks)holidays/registry.py
(1 hunks)tests/countries/test_ivory_coast.py
(1 hunks)
🧰 Additional context used
🧬 Code Definitions (2)
holidays/countries/__init__.py (1)
holidays/countries/ivory_coast.py (3)
IvoryCoast
(28-95)CI
(99-100)CIV
(103-104)
tests/countries/test_ivory_coast.py (1)
holidays/countries/ivory_coast.py (3)
IvoryCoast
(28-95)CI
(99-100)CIV
(103-104)
🔇 Additional comments (10)
holidays/countries/__init__.py (1)
89-89
: Import for Ivory Coast added correctly.The import statement for the Ivory Coast class and its aliases (CI, CIV) follows the established pattern in the file. This makes the new country implementation accessible through the countries module.
holidays/registry.py (1)
98-98
: Registry entry added properly.The entry for Ivory Coast is correctly added to the COUNTRIES dictionary with appropriate class name and ISO codes (CI, CIV). This follows the same format as other country entries.
README.md (2)
102-102
: Country count updated correctly.The documentation has been updated to reflect the new total of 161 supported country codes, which is accurate after adding Ivory Coast.
662-667
: Ivory Coast entry added to the documentation table.The entry for Ivory Coast has been properly added to the countries table with the correct ISO code (CI). The empty cells for subdivisions, supported languages, and categories are appropriate as these features are not implemented yet.
holidays/countries/ivory_coast.py (3)
28-58
: Class definition looks good.The IvoryCoast class is properly structured with:
- Appropriate inheritance from required base classes
- Good documentation with references
- Correct country code and holiday labels
- A well-defined constructor with parameter documentation
The implementation follows the project's conventions.
59-71
: Secular holidays implementation is correct.The implementation of secular holidays for Ivory Coast is appropriate:
- New Year's Day with proper observation rule
- Labor Day with proper observation rule
- Independence Day on August 7
- National Peace Day starting from 1996
The method correctly uses the translation function for all holiday names.
98-104
: Country code aliases defined correctly.The alias classes CI and CIV are correctly implemented, following the project's pattern for providing ISO code aliases for country classes.
tests/countries/test_ivory_coast.py (3)
32-33
: Alias testing looks good.Correctly verifies that CI and CIV are proper aliases for the IvoryCoast class.
28-30
: Test setup is appropriate.The test setup follows the project's standard pattern of inheriting from CommonCountryTests and properly initializes with the IvoryCoast class.
21-24
: Imports are correctly structured.All necessary imports for testing Ivory Coast holidays are present and well organized.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Kriti Birda <164247895+kritibirda26@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
holidays/countries/ivory_coast.py
(1 hunks)tests/countries/test_ivory_coast.py
(1 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
tests/countries/test_ivory_coast.py (1)
holidays/countries/ivory_coast.py (3)
IvoryCoast
(19-86)CI
(90-91)CIV
(94-95)
🔇 Additional comments (4)
holidays/countries/ivory_coast.py (3)
63-75
: Implementation of Christian holidays looks good.The implementation of Christian holidays is complete and includes all relevant holidays for Ivory Coast: Easter Monday, Ascension Day, Pentecost Monday, Assumption Day, All Saints' Day, and Christmas Day.
77-84
: Implementation of Islamic holidays is correct.The Islamic holiday implementation includes the three main Islamic holidays observed in Ivory Coast: Eid al-Fitr, Eid al-Adha, and the Prophet's Birthday.
89-95
: Alias implementation looks good.The country code aliases (CI and CIV) follow the standard pattern used in the library.
tests/countries/test_ivory_coast.py (1)
23-24
: Alias testing looks good.The test correctly verifies the country aliases (CI and CIV) for Ivory Coast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kritibirda26, it's a very good start! Please look at these suggestions.
Co-authored-by: ~Jhellico <KJhellico@users.noreply.github.com> Signed-off-by: Kriti Birda <164247895+kritibirda26@users.noreply.github.com>
add more tests, localize holidays, and laylat al-qadr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
README.md
(2 hunks)holidays/countries/ivory_coast.py
(1 hunks)holidays/groups/islamic.py
(1 hunks)holidays/locale/en_US/LC_MESSAGES/CI.po
(1 hunks)holidays/locale/fr/LC_MESSAGES/CI.po
(1 hunks)tests/countries/test_ivory_coast.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
holidays/countries/ivory_coast.py (1)
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:8-8
Timestamp: 2025-03-29T14:59:41.973Z
Learning: The header with author information is standard across all files in the vacanza/holidays project. The correct email for dr-prodigy is dr.prodigy.github@gmail.com, not dr.prodigy@github.com.
🧬 Code Definitions (2)
holidays/countries/ivory_coast.py (1)
holidays/groups/islamic.py (5)
IslamicHolidays
(20-416)_add_eid_al_fitr_day
(152-163)_add_eid_al_adha_day
(109-120)_add_mawlid_day
(319-329)_add_laylat_al_qadr_day
(298-307)
tests/countries/test_ivory_coast.py (1)
holidays/countries/ivory_coast.py (3)
IvoryCoast
(18-85)CI
(89-90)CIV
(93-94)
🔇 Additional comments (14)
README.md (2)
102-102
: Accurate country count update.The count has been correctly updated from 160 to 161 to reflect the addition of Ivory Coast.
661-667
: Clear and consistent country entry addition.The Ivory Coast entry follows the established table format, correctly specifying "CI" as the ISO code and indicating supported languages (en_US, fr) with French set as the default language.
holidays/locale/en_US/LC_MESSAGES/CI.po (2)
1-27
: Well-formed localization file header.The file header contains all necessary metadata including proper project information, date formatting, and language specification.
28-84
: Complete holiday translations with appropriate categorization.All holiday translations from French to English are accurate and properly categorized as Secular, Christian, or Islamic holidays. The translations include important holidays like Independence Day, Easter Monday, and Eid al-Fitr.
holidays/locale/fr/LC_MESSAGES/CI.po (2)
1-27
: Well-structured French localization file header.The file header correctly specifies French (fr) as the language and follows the standard PO file format.
28-83
: Empty message strings are appropriate for source language.The empty msgstr fields are intentional and correct since French is the source language for Ivory Coast holidays. The msgid values already contain the proper French holiday names.
holidays/groups/islamic.py (1)
298-308
: Well-implemented Islamic holiday method.The
_add_laylat_al_qadr_day
method correctly implements the Night of Power holiday (27th day of Ramadan) using the established pattern of other Islamic holiday methods. The documentation includes a clear description and relevant Wikipedia link.holidays/countries/ivory_coast.py (6)
28-35
: LGTM: Well-defined country properties.The country code, labels, start year, and language support are correctly configured. The 1960 start year properly reflects Ivory Coast's independence date.
37-48
: LGTM: Constructor implementation is correct.The constructor properly initializes all parent classes and correctly sets up the observed rule for holidays falling on Sundays.
52-61
: LGTM: Secular holidays are implemented correctly.The implementation of New Year's Day, Labor Day, Independence Day, and National Peace Day (with proper conditional logic for its 1996 introduction) is accurate.
63-75
: LGTM: Christian holidays implementation is correct.All Christian holidays are properly implemented with appropriate French translations.
77-83
: LGTM: Islamic holidays implementation is mostly correct.The implementation of Eid al-Fitr, Eid al-Adha, and the Prophet's Birthday is correct with appropriate French translations.
88-94
: LGTM: Country code aliases are correctly defined.The aliases CI and CIV are properly implemented as subclasses of IvoryCoast.
tests/countries/test_ivory_coast.py (1)
23-25
: LGTM: Country alias tests are correct.The test correctly verifies that the IvoryCoast class has CI and CIV as aliases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
tests/countries/test_ivory_coast.py (1)
134-136
:⚠️ Potential issueUpdate test for Laylat al-Qadr.
The test for Laylat al-Qadr needs to be updated if the implementation is changed to "Day After Laylat al-Qadr".
Update the test to verify the correct holiday name and add multiple years:
def test_laylat_al_qadr(self): - self.assertHolidayName("Nuit du Destin (Lailatou-Kadr) (estimé)", "2025-03-27") + self.assertHolidayName( + "Lendemain de la Nuit du Destin (Lailatou-Kadr) (estimé)", + "2022-04-28", + "2023-04-18", + "2024-04-06", + "2025-03-28" + )
♻️ Duplicate comments (1)
tests/countries/test_ivory_coast.py (1)
26-43
:⚠️ Potential issueUpdate holiday dates test for 2025.
The test for 2025 needs to be updated if the "Day After Laylat al-Qadr" implementation is changed.
Update the date in the test to match the day after Laylat al-Qadr:
def test_2025(self): self.assertHolidayDates( IvoryCoast(years=2025), "2025-01-01", - "2025-03-27", + "2025-03-28", "2025-03-30", "2025-04-21", "2025-05-01", "2025-05-29", "2025-06-06", "2025-06-09", "2025-08-07", "2025-08-15", "2025-09-04", "2025-11-01", "2025-11-15", "2025-12-25", )
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
holidays/countries/ivory_coast.py
(1 hunks)holidays/locale/en_US/LC_MESSAGES/CI.po
(1 hunks)holidays/locale/fr/LC_MESSAGES/CI.po
(1 hunks)tests/countries/test_ivory_coast.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
holidays/countries/ivory_coast.py (1)
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:8-8
Timestamp: 2025-03-29T14:59:41.973Z
Learning: The header with author information is standard across all files in the vacanza/holidays project. The correct email for dr-prodigy is dr.prodigy.github@gmail.com, not dr.prodigy@github.com.
🧬 Code Definitions (2)
holidays/countries/ivory_coast.py (1)
holidays/groups/islamic.py (5)
IslamicHolidays
(20-416)_add_eid_al_fitr_day
(152-163)_add_eid_al_adha_day
(109-120)_add_mawlid_day
(319-329)_add_laylat_al_qadr_day
(298-307)
tests/countries/test_ivory_coast.py (1)
holidays/countries/ivory_coast.py (3)
IvoryCoast
(18-85)CI
(89-90)CIV
(93-94)
🔇 Additional comments (19)
holidays/locale/en_US/LC_MESSAGES/CI.po (6)
1-27
: Excellent project metadata and header setup.The header includes comprehensive project information, author details, and licensing information. The locale is correctly set for English (en_US) translation of Ivory Coast holidays with French as the source language.
28-39
: Appropriate translations for secular holidays.Translations for New Year's Day, Labor Day, and Independence Day are accurate and maintain proper formatting. The superscript notation in "1ˢᵗ January" preserves the style of the original French "1ᵉʳ janvier".
40-44
: Well-documented National Peace Day.Excellent historical context provided in the comments for the National Peace Day holiday, including its introduction year and a reference link. The translation is accurate.
45-64
: Appropriate translations for Christian holidays.All Christian holiday translations (Easter Monday, Pentecost Monday, Assumption Day, All Saints' Day, and Christmas Day) are correct and consistent with standard English terminology for these religious observances.
81-96
: LGTM: Proper translation of formatted labels.The translations for estimated, observed, and combined labels are accurate and maintain the placeholder formatting needed for dynamic holiday names.
65-80
:✅ Verification successful
Verify the translation for Laylat al-Qadr holiday.
The current translation for "Nuit du Destin (Lailatou-Kadr)" is "Night of Destiny", which correctly translates the concept. Based on previous review discussions, note that in the Ivory Coast, both the night itself and the day after are observed.
🌐 Web query:
Is both "Night of Destiny" (Laylat al-Qadr) and the "Day after Night of Destiny" observed as holidays in Ivory Coast?
💡 Result:
In Ivory Coast, the Day after Lailat al-Qadr (also called Day after Laila tou-Kadr) is recognized as a public holiday, while Laylat al-Qadr (Night of Destiny) itself is not a formal public holiday but holds significant religious observance.
Key Details:
Laylat al-Qadr (Night of Destiny):
This Islamic holy night, marking the revelation of the Quran, is observed during the last ten days of Ramadan. While it is a major religious event[1][10], it is not listed as an official public holiday in Ivory Coast's government schedules[2][6][12].Day after Lailat al-Qadr:
This day is a formal public holiday in Ivory Coast, with schools, businesses, and government offices closed[2][6][12][18]. In 2025, it falls on March 27, 2025[1][12]. The holiday follows the Islamic calendar and commemorates the conclusion of the Night of Power.Observance Practices:
- On Laylat al-Qadr, Muslims engage in prayers, Quran recitation, and charitable acts, though these activities are part of religious observance rather than a mandated day off[4][10].
- The public holiday the following day allows for extended reflection and community gatherings[7][16].
Summary:
While the Night of Destiny is a pivotal religious occasion, only the Day after Lailat al-Qadr is officially designated as a public holiday in Ivory Coast[2][18].
Citations:
- 1: https://hamariweb.com/islam/laylat-al-qadr-in-cote-d-ivoire.aspx
- 2: https://en.wikipedia.org/wiki/Public_holidays_in_Ivory_Coast
- 3: https://www.iexplore.com/articles/travel-guides/africa/cote-divoire/festivals-and-events
- 4: https://www.officeholidays.com/holidays/night-of-destiny
- 5: https://www.holidaysmart.com/country/cotedivoire
- 6: https://www.qppstudio.net/public-holidays/cote-d-ivoire-ivory-coast.htm
- 7: https://countingthedays.to/ci/day-after-laila-tou-kadr/
- 8: https://sufipathoflove.com/2025/03/26/laylat-al-qadr/
- 9: https://www.worldtravelguide.net/guides/africa/ivory-coast/public-holidays/
- 10: https://www.islamicreliefcanada.org/resources/islamic-calendar/laylatul-qadr
- 11: https://www.calendarlabs.com/holidays/islam/laylat-al-kadr.php
- 12: https://day-off.app/tools/country/CI/2025
- 13: https://www.calendarlabs.com/holidays/ivory-coast/2023
- 14: https://www.moroccoworldnews.com/2024/04/21275/ivory-coast-to-inaugurate-mohammed-vi-mosque-on-friday-in-abidjan/
- 15: https://www.officeholidays.com/holidays/ivory-coast/eid-al-adha
- 16: https://royaumeuni.diplomatie.gouv.ci/jours_feries.php?num=&type=&lang=en
- 17: https://www.officeholidays.com/holidays/ivory-coast/eid-al-fitr
- 18: https://www.timeanddate.com/holidays/ivory-coast/day-after-laila-tou-kadr
- 19: https://www.timeanddate.com/holidays/ivory-coast/
- 20: https://en.hibapress.com/2357.html
Translation Verification for Laylat al-Qadr
The current translation for
msgid "Nuit du Destin (Lailatou-Kadr)" msgstr "Night of Destiny"
is correct with respect to translating the religious concept of Laylat al-Qadr. However, based on the latest information:
- Laylat al-Qadr (Night of Destiny): While this is a pivotal religious observance correctly rendered, it is not designated as an official public holiday in the Ivory Coast.
- Observation in Ivory Coast: The official public holiday is observed on the day after Laylat al-Qadr. It's important to ensure that the translation is applied consistently—if the intention is to denote a public holiday, consider whether a different labeling or additional context is needed.
No modifications are required to the translation itself if it is meant to represent the religious observance. Just double-check that its usage in the application appropriately reflects whether it refers to the religious event or the public holiday.
holidays/locale/fr/LC_MESSAGES/CI.po (2)
1-27
: Correct metadata setup for French localization.The header information and metadata are properly set up for the French localization file, with French correctly designated as both the source and target language.
28-95
: Empty message strings are appropriate for the native language.All message strings (msgstr) are intentionally left empty, which is the correct approach since French is the native language of Ivory Coast. This means the original French holiday names (msgid) will be used without translation when the locale is set to French.
holidays/countries/ivory_coast.py (7)
1-12
: Standard header and license information maintained.The header follows the project's standard format with correct author information and licensing details.
14-16
: Appropriate imports for holiday implementation.The imports correctly include all necessary base classes for implementing Ivory Coast holidays, including Christian, Islamic, and International holiday groups.
18-36
: Well-documented class definition with comprehensive references.The IvoryCoast class has:
- Clear docstring with multiple official references
- Proper country code "CI"
- Translated labels for estimated and observed holidays
- Correct start year (1960, when Ivory Coast gained independence)
- Appropriate language support (French as default with English translation)
37-48
: Correct initialization with appropriate configurations.The initialization properly:
- Initializes all parent classes
- Provides option for showing estimated labels for Islamic holidays
- Sets the default observed rule to move Sunday holidays to Monday
50-62
: Comprehensive implementation of secular holidays.The secular holidays are implemented correctly:
- New Year's Day (January 1)
- Labor Day (May 1) with observed rule
- Independence Day (August 7) with observed rule
- National Peace Day (November 15) with correct conditional check for years from 1996 onward
63-76
: Complete Christian holidays implementation.All major Christian holidays observed in Ivory Coast are properly implemented with correct French names:
- Easter Monday
- Ascension Thursday
- Whit Monday (Pentecost Monday)
- Assumption Day
- All Saints' Day
- Christmas Day
88-95
: Appropriate country code aliases.The class aliases CI and CIV are correctly implemented, following the ISO 3166-1 standard for country codes (2-letter and 3-letter codes for Ivory Coast).
tests/countries/test_ivory_coast.py (4)
1-25
: Well-structured test class setup.The test class correctly:
- Inherits from CommonCountryTests and TestCase
- Sets up the IvoryCoast class for testing with years from 1960 to 2050
- Tests the country aliases CI and CIV
45-61
: Thorough tests for secular holidays.The tests for New Year's Day, Labor Day, Independence Day, and National Peace Day are comprehensive:
- Tests across multiple years
- Verifies observed dates for holidays falling on Sunday
- Correctly tests that National Peace Day only occurs from 1996 onward
62-102
: Comprehensive tests for Christian holidays.The tests for Easter Monday, Ascension Day, Whit Monday, Assumption Day, All Saints' Day, and Christmas Day are well-implemented:
- Moving holidays are tested with specific dates across multiple years
- Fixed-date holidays are tested across the full range of years
103-133
: Thorough tests for Islamic holidays.The tests for Eid al-Fitr, Eid al-Adha, and Mawlid are well-implemented with:
- Verification of correct holiday names including the "(estimé)" label
- Multiple years to account for the shifting Islamic calendar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see new contributors and new countries being implemented. some suggestions here 👍
Co-authored-by: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Signed-off-by: Kriti Birda <164247895+kritibirda26@users.noreply.github.com>
from holidays.groups import StaticHolidays In StaticHolidays.__init__(self, IvoryCoastStaticHolidays) At the end of the file: class IvoryCoastStaticHolidays:
"""Ivory Coast Special Holidays.
* [2024 AFCON](https://apanews.net/public-holiday-as-cote-divoire-wins-afcon-trophy/)
"""
special_public_holidays = {
# 2024 African Cup of Nations Victory.
2024: (FEB, 12, tr("Victoire à la Coupe d’Afrique des Nations 2024")),
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (8)
README.md
(2 hunks)holidays/countries/__init__.py
(1 hunks)holidays/countries/ivory_coast.py
(1 hunks)holidays/locale/en_CI/LC_MESSAGES/CI.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/CI.po
(1 hunks)holidays/locale/fr/LC_MESSAGES/CI.po
(1 hunks)holidays/registry.py
(1 hunks)tests/countries/test_ivory_coast.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
holidays/countries/ivory_coast.py (3)
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:84-85
Timestamp: 2025-03-30T08:08:31.656Z
Learning: Islamic holiday logic should be implemented in the holidays/groups/islamic.py file, with country-specific files only calling these methods with the appropriate translated names.
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: tests/countries/test_ivory_coast.py:26-43
Timestamp: 2025-03-30T08:19:34.517Z
Learning: In Ivory Coast, Laylat al-Qadr (Night of Destiny) is observed on the actual day (27th of Ramadan) rather than the day after, with March 27, 2025 being the official holiday date for that year.
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:8-8
Timestamp: 2025-03-29T14:59:41.973Z
Learning: The header with author information is standard across all files in the vacanza/holidays project. The correct email for dr-prodigy is dr.prodigy.github@gmail.com, not dr.prodigy@github.com.
tests/countries/test_ivory_coast.py (1)
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: tests/countries/test_ivory_coast.py:26-43
Timestamp: 2025-03-30T08:19:34.517Z
Learning: In Ivory Coast, Laylat al-Qadr (Night of Destiny) is observed on the actual day (27th of Ramadan) rather than the day after, with March 27, 2025 being the official holiday date for that year.
🧬 Code Definitions (3)
holidays/countries/__init__.py (1)
holidays/countries/ivory_coast.py (3)
IvoryCoast
(24-107)CI
(111-112)CIV
(115-116)
holidays/countries/ivory_coast.py (1)
holidays/groups/islamic.py (5)
IslamicHolidays
(20-416)_add_eid_al_fitr_day
(152-163)_add_eid_al_adha_day
(109-120)_add_mawlid_day
(319-329)_add_laylat_al_qadr_day
(298-307)
tests/countries/test_ivory_coast.py (1)
holidays/countries/ivory_coast.py (3)
IvoryCoast
(24-107)CI
(111-112)CIV
(115-116)
🔇 Additional comments (22)
holidays/countries/__init__.py (1)
90-90
: Clean integration of Ivory Coast module.The import follows the established pattern for adding a new country. Properly includes both the main class and country code aliases.
README.md (2)
102-102
: Correctly updated country count.The supported country count has been incremented from 161 to 162, accurately reflecting the addition of Ivory Coast.
669-674
: Ivory Coast entry properly formatted.The table entry follows the same pattern as other countries, with correctly formatted supported languages (default language in bold) and appropriate country code.
holidays/registry.py (1)
99-99
: Registry entry follows established pattern.The Ivory Coast entry maintains alphabetical ordering and follows the same format as other countries, with the main class name and ISO codes properly defined.
holidays/locale/en_CI/LC_MESSAGES/CI.po (1)
1-102
: Well-structured localization file with comprehensive translations.The file includes all necessary holiday translations with appropriate comments for context. I especially appreciate the inclusion of the 2024 AFCON victory holiday translation, implementing the suggestion from PPsyrius.
Note that some Islamic holiday translations use specific local naming conventions (e.g., "Aid-EI-Fitr" instead of "Eid al-Fitr"), which appropriately reflects local terminology.
holidays/locale/en_US/LC_MESSAGES/CI.po (2)
1-27
: Excellent job on the localization file setup.You've correctly set up the necessary header, metadata, and localization details. I also see you've added your name and email to the "Last-Translator" field as suggested in a previous review.
28-101
: Great comprehensive holiday translations.All holiday translations are accurate and complete. Good work including both secular, Christian, and Islamic holidays with their appropriate English translations.
holidays/locale/fr/LC_MESSAGES/CI.po (1)
1-27
: Correctly structured localization file for French.The header and metadata are properly configured for French localization.
holidays/countries/ivory_coast.py (7)
1-20
: Well-structured file header and import section.The file includes the standard header and necessary imports for holiday implementations.
24-46
: Complete class definition with proper documentation.The IvoryCoast class is well-documented with references and includes all required attributes. The supported languages list correctly includes "en_CI", "en_US", and "fr" as required.
50-64
: Proper initialization with appropriate holiday types.The constructor initializes all necessary holiday base classes and sets the correct observed rule for the country.
66-82
: Correct implementation of secular holidays.Secular holidays are properly implemented with the observed rule applied where appropriate. The conditional check for National Peace Day (introduced in 1996) is a good attention to detail.
83-96
: Christian holidays implementation is complete.All Christian holidays are properly implemented with their French names.
110-117
: Class aliases are correct.The CI and CIV aliases are properly defined.
119-128
: Excellent implementation of special holiday.The special holiday for the 2024 African Cup of Nations victory is correctly implemented using the StaticHolidays mechanism as suggested in the PR comments.
tests/countries/test_ivory_coast.py (7)
1-16
: Well-structured test file header and imports.The file includes the standard header and necessary imports for testing.
18-25
: Test class setup is correct.The test class properly inherits from CommonCountryTests and TestCase, and the setUpClass method is correctly implemented. The test for country aliases verifies both CI and CIV aliases.
26-46
: Comprehensive test for 2025 holidays.The test verifies all expected holidays for 2025, including their correct names and dates. This provides good coverage for verifying the implementation.
48-105
: Good coverage of secular and Christian holidays.The tests for New Year's Day, Labor Day, Independence Day, National Peace Day, and all Christian holidays are thorough and include appropriate date checks.
106-134
: Comprehensive tests for Islamic holidays.The tests for Eid al-Fitr, Eid al-Adha, and Mawlid cover multiple years and verify the estimated label is properly applied.
136-144
: Laylat al-Qadr test is correct but naming may cause confusion.The test correctly checks that "Lendemain de la Nuit du Destin (estimé)" is observed on specific dates (e.g., 2025-03-27), which aligns with how Ivory Coast observes this holiday on the 27th of Ramadan.
Note that despite the name suggesting it's the "day after", the holiday is actually observed on the Night of Destiny itself. This is consistent with the implementation but might confuse future contributors.
146-148
: Static holiday test is correctly implemented.The test verifies the 2024 African Cup of Nations victory holiday is present in 2024 but absent in 2025.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2388 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 205 206 +1
Lines 13054 13109 +55
Branches 1869 1875 +6
=========================================
+ Hits 13054 13109 +55 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're almost there 👍
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks for awesome contribution @kritibirda26
Proposed change
Add public holidays for Ivory Coast (
en_CI
,en_US
,fr
).Resolves #1166.
Type of change
holidays
functionality in general)Checklist
make check
, all checks and tests are green