PL/I PL/1 Year 2000 builtin functions
The Year 2000 builtin functions implemented in IBM's workstation
PL/I compilers  OS/2, AIX, Windows NT (some also in Windows 95) 
are outlined in the following list. Note that these functions (where
appropriate)
can also handle 2digit years with 100year windowing, if required,
as part of IBM's Millennium Language Extensions for those same
compilers.
These date functions will work on dates on or after 15th October 1582
(that is, a little after the date when Christopher Columbus is
credited with discovering America).
 DATETIME, which returns the date in one of 37 different formats.
The date comes in various flavors: year first, month first, or day first.
The month comes as a numeric value, or in threeletter form
like May or MAY.
The year comes as 4digit year or a 2digit year.
Your choice of format is determined from a template argument:
e.g. YYYYMmmDD will give 1998Nov04 for the 4th November 1998.

DAYS will give the number of days corresponding to a date
given in one of the standard formats.

DAYSTODATE converts a number of days (measured from the beginning
of time 15 October 1582)
into a date in one of the standard formats.

DAYSTOSECS converts the given number of days into seconds.

REPATTERN converts the given date (in one of the standard formats)
into one of the other standard formats.
In particular, it can be used for converting a date in a twodigit year
format into a 4digit year format and vice versa, for example.

SECS converts a date into seconds.

SECSTODATE converts a number of seconds into a date.

SECSTODAYS converts a number of seconds into days.

VALIDDATE checks whether a given date matches one of the
standard date formats.

WEEKDAY returns the day of the week corresponding
to the given date (returns an integer representing the day number).

Y4DATE converts a date having a 2digit year into a 4digit year.

Y4JULIAN converts a date having a twodigit year format (YYDDD)
into a 4digit year format (YYYYDDD).

Y4YEAR converts a twodigit year into a 4digit year.
Updated 25th December 1999.