Handle dates with 'Sept' instead of 'Sep' globally (#516)
There are often failures due to the use of 'Sept' instead of 'Sep' in dates (for example https://github.com/endoflife-date/release-data/actions/runs/17707933881). Manage this globally so that it's not needed do it in each script / config.
This commit is contained in:
@@ -71,6 +71,10 @@ def parse_datetime(text: str, formats: list[str] = frozenset([
|
||||
.replace(". ", " ") # November 10. 2015 -> November 10 2015
|
||||
.replace("(", "") # (November 10 2015) -> November 10 2015)
|
||||
.replace(")", "") # (November 10 2015) -> (November 10 2015
|
||||
.replace("Sept ", "Sep ") # 11 Sept 2025 -> 11 Sep 2025
|
||||
.replace("Sept-", "Sep-") # 11-Sept-2025 -> 11-Sep-2025
|
||||
.replace("sept ", "sep ") # 11 Sept 2025 -> 11 Sep 2025
|
||||
.replace("sept-", "sep-") # 11-Sept-2025 -> 11-Sep-2025
|
||||
)
|
||||
for fmt in formats:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user