Skip to content

Commit

Permalink
Document French subdivisions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Hervé Cauwelier committed Dec 12, 2024
1 parent c13eed0 commit 5362815
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 5362815

Please sign in to comment.