From 79638c25d807746fa4b23a37bb6b279317f6bfcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Cauwelier?= Date: Thu, 12 Dec 2024 18:11:43 +0100 Subject: [PATCH] Add French subdivision aliases (#2162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hervé Cauwelier --- README.rst | 2 +- holidays/countries/france.py | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 1933fb4b2..6e1608f89 100644 --- a/README.rst +++ b/README.rst @@ -437,7 +437,7 @@ All other default values are highlighted with bold: - UNOFFICIAL * - France - FR - - DOM/TOM: BL, GES, GP, GY, MF, MQ, NC, PF, RE, WF, YT + - DOM/TOM: BL (Saint-Barthélemy), GES (Alsace, Champagne-Ardenne, Lorraine), GP (Guadeloupe), GY (Guyane), MF (Saint-Martin), MQ (Martinique), NC (Nouvelle-Calédonie), PF (Polynésie Française), RE (La Réunion), WF (Wallis-et-Futuna), YT (Mayotte) - en_US, **fr**, uk - * - Gabon diff --git a/holidays/countries/france.py b/holidays/countries/france.py index e0786b901..636c2d1c9 100644 --- a/holidays/countries/france.py +++ b/holidays/countries/france.py @@ -35,18 +35,33 @@ class France(HolidayBase, ChristianHolidays, InternationalHolidays): default_language = "fr" supported_languages = ("en_US", "fr", "uk") subdivisions = ( - "BL", # Saint Barthelemy. + "BL", # Saint-Barthélemy. "GES", # Alsace, Champagne-Ardenne, Lorraine(Moselle). "GP", # Guadeloupe. "GY", # Guyane. - "MF", # Saint Martin. + "MF", # Saint-Martin. "MQ", # Martinique. "NC", # Nouvelle-Calédonie, "PF", # Polynésie Française. - "RE", # Reunion. + "RE", # La Réunion. "WF", # Wallis-et-Futuna. "YT", # Mayotte. ) + subdivisions_aliases = { + "Saint-Barthélemy": "BL", + "Alsace": "GES", + "Champagne-Ardenne": "GES", + "Lorraine": "GES", + "Guadeloupe": "GP", + "Guyane": "GY", + "Saint-Martin": "MF", + "Martinique": "MQ", + "Nouvelle-Calédonie": "NC", + "Polynésie Française": "PF", + "La Réunion": "RE", + "Wallis-et-Futuna": "WF", + "Mayotte": "YT", + } _deprecated_subdivisions = ( "Alsace-Moselle",