We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cd9804 commit fbbf2c1Copy full SHA for fbbf2c1
1 file changed
convert_json.py
@@ -44,10 +44,10 @@ def rss_item(title: str | None = None,
44
item.append(ET.Element("pubDate"))
45
46
# Make sure months are processed correctly when there's some inconsistency
47
- # https://docs.python.org/3/library/datetime.html#format-codes
48
- if pubDate in calendar.month_name:
+ # https://docs.python.org/3/library/datetime.html#format-codes
+ if pubDate.split(' ')[0] in calendar.month_name:
49
fmt_date = datetime.strptime(pubDate, "%B %d, %Y").strftime("%d %b %Y")
50
- elif pubDate in calendar.month_abbr:
+ elif pubDate.split(' ')[0] in calendar.month_abbr:
51
fmt_date = datetime.strptime(pubDate, "%b %d, %Y").strftime("%d %b %Y")
52
else:
53
fmt_date = '01 January 1970' # Just default to UNIX start
0 commit comments