Skip to content
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 French subdivision aliases #2162

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading