PL/I MLE supports a series of date patterns as shown in the following table.
| 4-digit year | Example | 2-digit year | Example | |
|---|---|---|---|---|
| Year first |
YYYY YYYYMM YYYYMMDD YYYYMMM YYYYMMMDD YYYYMmm YYYYMmmDD YYYYDDD |
1999 199912 19991225 1999DEC 1999DEC25 1999Dec 1999Dec25 1999359 |
YY YYMM YYMMDD YYMMM YYMMMDD YYMmm YYMmmDD YYDDD |
99 9912 991225 99DEC 99DEC25 99Dec 99Dec25 99359 |
| Month first |
MMYYYY MMDDYYYY MMMYYYY MMMDDYYYY MmmYYYY MmmDDYYYY |
121999 12251999 DEC1999 DEC251999 Dec1999 Dec251999 |
MMYY MMDDYY MMMYY MMMDDYY MmmYY MmmDDYY |
1299 122599 DEC99 DEC2599 Dec99 Dec2599 |
| Day first |
DDMMYYYY DDMMMYYYY DDMmmYYYY DDDYYYY |
25121999 25DEC1999 25Dec1999 3591999 |
DDMMYY DDMMMYY DDMmmYY DDDYY |
251299 25DEC99 25Dec99 35999 |
When the day or month is omitted from one of these patterns, the compiler assumes it has a value of 1.
If the day or month are not omitted but out of range, for example 00/38/11, a message is issued if the date involves a comparison. Exceptions to the rules are cases of patterns YYMM and YYMMDD with values of all zeros that will be converted to a Julian date of 1, that, is, the smallest valid date.