Skip to content

Commit

Permalink
Add French subdivision aliases (#2162)
Browse files Browse the repository at this point in the history
Co-authored-by: Hervé Cauwelier <[email protected]>
  • Loading branch information
bors-ltd and Hervé Cauwelier authored Dec 12, 2024
1 parent c13eed0 commit 79638c2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 18 additions & 3 deletions holidays/countries/france.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 79638c2

Please sign in to comment.