Code I've written
Most of these are just me dinking around with date math. I started with C in the 90s, migrated to PERL in the 00s and am gradually switching to Python.
Most don't have comments since I was lazy. :)
CGI
- Run the Compound Interest Calculator or Download the code
- The ever-present environment checker: here.
- Show how many types of days; i.e. Sun, Mon, Tue; are between 2 dates: Number of Types or Download the code. The Calendar javascript came from OpenJS.
Perl
- Time Left - display a countdown clock, it requires month, day, hour and minute and takes an optional year
- Time Left - display a countdown clock but in a GUI window. Hardcoded time since I was using it to teach myself PERL TK for another project.
- XKCD Passwords - Inspired by the Password Strength XKCD comic. It should work on any Unix-like OS that has a dictionary installed.
- New Passwords - Generate a password based on a word in the dictionary and then change it to Leet Speak. It should work on any Unix-like OS that has a dictionary installed.
Python
- Time Left - display a countdown clock, it requires month, day, hour and minute and takes an optional year
- Add Days - Add days to today or another date
C
- Between tells you the number of work days, weekend days and total days between 2 dates.
- Time Left tells you how much time you have left in your day, it defaults to 4:30 pm since that was my shift at the time.
- Work Year tells you how many days of work, i.e. Monday - Friday, in the current year.
- Pay Days gives a listing of the pay day dates in a year. I used it to automate updating my calendar.
- Remember the rumor that shows up every few years that a month with 5 Fridays, 5 Saturdays and 5 Sundays or 5 Saturdays/Sundays/Mondays only happens every 800+ years? Five_Fss is code that show you months that it happens in the current year or a year that's passed in
Number formatting in the perl code came from the University of Winnipeg's CPAN repository .
The C code was written for GCC on Linux but I've compiled it using compilers on Solaris, AIX and HP-UX as well.

Stuart's Code by Stuart Jaskowiak is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.