I made a Java enum of standard date and time formats but I want the names to be the format mask where possible or the name of the standard. Since dd-MMM-yyyy is not a valid variable name, I'd like to name it the standard. For example, I have an entry called ISO8601 for yyyy-MM-dd'T'HH:mm:ss.SSS and another called TSQL6 for dd MMM yy. Is there a standard name for the format dd-MMM-yyyy? I see that dd-MMM-yyyy and dd-MMM-yy show up a lot in PL/SQL but I haven't seen a code or name assigned to them the way T-SQL has numeric codes assigned to all of the convert options for dates for use in the convert function.
The dd-mmm-yyyy format is specified in RFC 5322 "Internet Message Format":
3.3. Date and Time Specification
Date and time values occur in several header fields. This section specifies the syntax for a full date and time specification. Though folding white space is permitted throughout the date-time specification, it is RECOMMENDED that a single space be used in each place that FWS appears (whether it is required or optional); some older implementations will not interpret longer sequences of folding white space correctly.
date-time = [ day-of-week "," ] date time [CFWS]
day-of-week = ([FWS] day-name) / obs-day-of-week
day-name = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun"
date = day month year
day = ([FWS] 1*2DIGIT FWS) / obs-day
month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"
year = (FWS 4*DIGIT FWS) / obs-year
So if you really wanted a formal name for it, e.g. for specification documents, you could call it an RFC 5322 date.
I dont think that there is any standard name given to DD-MMM-YYYY format. You may customize or name it as per your convention. For example:- You may customize it to give a name to DATE_MONTH_YEAR
I am not sure if that is very much relevant but check this DateTimeFormatInfo.RFC1123Pattern Property
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With