PL/I PL/1 Year 2000 built-in functions
The Year 2000 built-in 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
can also handle 2-digit years with 100-year windowing, if required,
as part of IBM's Millennium Language Extensions for those same
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 three-letter form
like May or MAY.
The year comes as 4-digit year or a 2-digit 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 two-digit year
format into a 4-digit 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 2-digit year into a 4-digit year.
Y4JULIAN converts a date having a two-digit year format (YYDDD)
into a 4-digit year format (YYYYDDD).
Y4YEAR converts a two-digit year into a 4-digit year.
Updated 25th December 1999.