Skip to content

Commit

Permalink
Merge pull request #213 from jan-janssen/email_datestr
Browse files Browse the repository at this point in the history
Fix email_datestr()
  • Loading branch information
jan-janssen authored Feb 11, 2024
2 parents bafaa4e + 6101403 commit 7258e80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gmailsorter/base/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
def email_date_converter(email_date):
if not isinstance(email_date, str):
return None
if email_date[:1] == "\xa0":
email_date = email_date.replace("\xa0", "")
if email_date.count(",") >= 2:
email_date = ", ".join(email_date.split(", ")[-2:])
if email_date[-3:-2].isalpha():
Expand Down

0 comments on commit 7258e80

Please sign in to comment.