📅Date & Time

RFC 2822 (Email Date)

Date format used in email headers and HTTP responses.

Explanation

RFC 2822 is the standard format for dates in Internet messages, including HTTP "Date" headers.

Examples

Standard Format
Output
Fri, 12 Jan 2024 14:30:00 +0000

Code Examples

JavaScript
const date = new Date().toUTCString();
// "Fri, 12 Jan 2024 14:30:00 GMT"
Python
from email.utils import formatdate
print(formatdate(timeval=None, localtime=False, usegmt=True))

💡 Tips

  • Includes the day of the week
  • Months are abbreviated to 3 characters
  • Required for many HTTP headers

⚠️ Common Pitfalls

  • Day of week must match the actual date
  • Year must be 4 digits in modern implementations