From 53628154753e56996696a0faf94308220a36a717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Cauwelier?= Date: Wed, 11 Dec 2024 11:49:01 +0100 Subject: [PATCH] Document French subdivisions I had to look up in the source code what MQ, RE... meant. The README didn't help either, just listing the raw codes available. Those are not of common use in the French culture, contrary to say, AZ meaning Arizona in the US culture. Also fixed the official spelling. --- 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",