mjestecko/tools/rfc822.py
2024-03-31 10:38:30 +05:00

5 lines
240 B
Python

from date_descriptions import MONTHS, WEEKDAYS
def stringify_date(date) -> str:
return f"{WEEKDAYS[date.tm_wday][:3]}, {date.tm_mday} {MONTHS[date.tm_mon][:3]} {date.tm_year} {date.tm_hour:02d}:{date.tm_min:02d}:{date.tm_sec:02d} GMT"