As I updated the Y2K Date Routines to convert the program that determines leap year from 370 assembler to COBOL, I also updated a program I wrote in 2018 to call the Y2K routines from a terminal. Since I had not uploaded it to my site, I thought this a good time to do that.
To install the source program, and compile it, execute the bash script: downloads/y2date.setup [md5: 6d5332fe84a739ec2edb5b75093a0906]. Right click and save the script in the location where you want the source program to reside, then execute it. It will create the file containing the source programs, then execute the GnuCOBOL compiler to compile into the run unit for the test program. The GnuCOBOL compiler must be installed prior to executing the bash script.
Output from several executions of the program:
jay@phoenix:~$ y2date ? ? ATOG - astronomic number to Gregorian. CONV - convert 2 digit year to 4 digit. DFMT - format date. DOWN - return day of week number. ESTR - display date Easter falls on. GETD - return current system date. GTOA - Gregorian to astronomic number. GTOJ - Gregorian to Julian. JTOG - Julian to Gregorian. LAGE - Large interval between dates. LEAP - determine leap year status for year. PROJ - Increment/decrement date. SAGE - Small interval between dates. TDOW - Project for specific day of week. jay@phoenix:~$ y2date ? tdow Display the next or previous date, relative to the specified Gregorian date, which falls on the specified day of week. TDOW <date> <N/P> <day of week number> If period specified for <date>, current system date will be used. Day of week number = 0:Monday ... 6:Sunday. Date may range from 01/01/1601 through 12/31/3399. Next/previous date may not fall outside of this range. jay@phoenix:~$ y2date tdow . n 3 08/29/2024 jay@phoenix:~$ y2date down 08/29/2024 3 jay@phoenix:~$ y2date lage 10/17/2017 . 6 years, 10 months, 7 days elapsed jay@phoenix:~$ y2date ? dfmt Format a Gregorian date into an output format depending upon specified major and minor format codes. DFMT <date> <major format> <minor format> If period specified for <date>, current system date will be used. Major format #1 - mmddyyyy #2 - ddmmyyyy #3 - yyyymmdd For above major formats, minor format #1 - no inserted characters #2 - insert space between month, day, year #3 - insert slash between month, day, year #4 - insert hyphen between month, day, year #5 - insert period between month, day, year Major format #4 - mmmmmmmmm dd, yyyy #5 - mmm dd,yyyy #6 - dayname, mmmmmmmmm dd,yyyy #7 - dayname, mmm dd,yyyy #8 - day, mmmmmmmmm dd,yyyy #9 - day, mmm dd,yyyy For above major formats, minor format #1 - US format, month followed by day #2 - European format, day followed by month. jay@phoenix:~$ y2date dfmt 10/26/2017 6 1 Thursday, October 26, 2017
This page was last updated on August 24, 2024.