time-in-words

This project contains a COBOL Code which converts time in โ€˜HHMMโ€™ format to words like:

IT IS TWENTY SIX TO ONE IN THE AFTERNOON

The inspiration for this little project, came from SKMEI 2312 - a watch from SKMEI, a chinese watch manufacturer. SKMEI 2312 is an homage to the QlockTwo W watch.


Files

File Description
TimeToWords-CurrentDate.cbl A COBOL program that uses FUNCTION CURRENT-DATE to get system time and display it in words.
TimeToWords-InputFile.cbl A COBOL program that reads all 1440 possible HHMM values from INPUT.DAT and generates OUTPUT.txt.
INPUT.DAT Contains all possible time values from 0000 to 2359, one per line.
OUTPUT.txt The output file generated by TimeToWords-InputFile.cbl program. Contains the time in words for each HHMM value in the INPUT.DAT file. This file is hosted on GitHub Pages for blog display via JavaScript.

๐ŸŒ Live Blog Widget

This project powers a live retro-style clock widget on my blog:

๐Ÿ”— iamamainframer.blogspot.com

The widget fetches the appropriate time-in-words from OUTPUT.txt every minute and displays it in mainframe terminal style (green on black).


๐Ÿค– Tools Used


๐Ÿงช How to Run Locally

If youโ€™d like to run the COBOL code, there are several options:

  1. Install OpenCOBOL IDE
  2. Open TimeToWords-CurrentDate.cbl or TimeToWords-InputFile.cbl on OpenCOBOL IDE.
  3. Click on the Run button to execute the code and observe output or generated files.

๐Ÿ“œ License

Feel free to use, modify, or remix. Attribution appreciated. ๐Ÿ™Œ