Skip to content

Commit

Permalink
fix: missing month keys (adbar#100)
Browse files Browse the repository at this point in the history
* fix: missing month key

* check consistency of months
  • Loading branch information
adbar authored Oct 4, 2023
1 parent 966488c commit 47fbb1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htmldate/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
MONTHS = [
("jan", "januar", "jänner", "january", "januari", "janvier", "ocak", "oca"),
("feb", "februar", "feber", "february", "februari", "février", "şubat", "şub"),
("mar", "märz", "march", "maret", "mart", "mars"),
("mar", "mär", "märz", "march", "maret", "mart", "mars"),
("apr", "april", "avril", "nisan", "nis"),
("may", "mai", "mei", "mayıs"),
("jun", "juni", "june", "juin", "haziran", "haz"),
Expand All @@ -150,7 +150,7 @@
("sep", "september", "septembre", "eylül", "eyl"),
("oct", "oktober", "october", "octobre", "okt", "ekim", "eki"),
("nov", "november", "kasım", "kas", "novembre"),
("dec", "dezember", "december", "desember", "décembre", "aralık", "ara"),
("dec", "dez", "dezember", "december", "desember", "décembre", "aralık", "ara"),
]

TEXT_MONTHS = {
Expand Down
2 changes: 2 additions & 0 deletions tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,8 @@ def test_regex_parse():
"""test date extraction using rules and regular expressions"""
assert regex_parse("3. Dezember 2008") is not None
assert regex_parse("33. Dezember 2008") is None
assert regex_parse("3. Dez 2008") is not None
assert regex_parse("3 dez 2008") is not None
assert regex_parse("3 Aralık 2008 Çarşamba") is not None
assert regex_parse("3 Aralık 2008") is not None
assert regex_parse("Tuesday, March 26th, 2019") is not None
Expand Down

0 comments on commit 47fbb1c

Please sign in to comment.