protocols - Can I use leading zero in case of day in the Date field in SMTP -
Can I use leading zeros in daytime in SMTP field?
I mean smth like
03 Apr 2014 13:10:22 +0000
Do you refer to RFC , please?
There are no dates in the SMTP protocol, but you are referring to the email header field described by RFC 2822 Internet Message Format . We have 3.3 date and time description with the following selected fields:
date-time = [day-of-week ","] date FWS time [CFWS] Days of the week = ([FWS] day name) / Obs day-day-day-day = "Mon" / "Mars" / "Mercury" / "Guru" / "Venus" / "Saturn" / "Sun" date = month of the year = 4 * DIGIT / Obs-year month = (FWS month name for FWS) / month of month of month = name "Jan" / "February" / "Mar F "/" May "/" June "/" June "/" July "/" August "/" September "/" October "/" Nov "/" Dec "day = ([FWS] 1 * 2 DIEGIT) Obs DAY ..
which states that the day part should be between 1-2 digits, and it does not specifically prohibit the use of a leading zeros. Nothing can be said about optional leading zero, therefore proper explanation should always be allowed during parsing.
Object-Optional variants describe the old obsolete format, e.g. Comment or fold in white space between 2-digit year and any part.
Comments
Post a Comment