Here is my code for cal in the PPT. I have added one extra flag in addition to the -yj? options specified in the documentation. I added a -n flag, which automatically gives you the calendar for the current month and year. This models cal in the following: 1. Produces calendars for 1 AD to 9999 AD. 2. Takes into account the Julian vs. Gregorian calendars. Up until 02 SEP 1752, the calendar is julian (in the UK and all colonies at the time). The next day, the calendar switches over to the gregorian calendar, and the 11 extra days are dropped, bringing the day to 14 SEP 1752. Thus, SEP 1752 only has 19 days, and the rest of the year is 11 days "short". This is reflected as well when using julian numbers for the days, as the last day of 1752, which was a leap year, is 355. 3. The julian calendar has leap years every 4 years, starting in 8 AD. They had to loose a leap day in 4 AD due to a clerical error, also known as the Y4 bug. :) Anyway, after the switch to gregorian, it follows the algorithm of all years evenly divisible by 4 and not 100, and all years evenly divisible by 400, are leap years. Please test it out, and send me any comments. I will comment the code/put in the pod once it is finalized. If you need comments to test it out, just let me know. I tried to make it as easy to read as possible. Thanks, Mike Schechter At 01:34 PM 3/2/99, you wrote: >Please resend me a patched version. Tom, Here you go. I took out the -n flag. Now, with no arguments, you get the current month's calendar. With just the -j argument, you get the current month's calendar using julian numbering. I left the column widths at 4. I know it doesn't match up perfectly with other cal implementations, but I thought part of this was to improve. If you use a column width of less than 4, then request julian numbering for any month that has days past day 100, they will all butt up against each other, looking like just one long number. I can modify it, if it is desired, so that the program figures out how wide to make the columns, with a min of 3 and max of 4, but I think it is rather a trivial point. If you disagree, let me know. I have added in all kinds of error checking in this program, in the anticipation that the users will potentially be people who have never used programs like this. And there are no module calls at all. It runs under strict and -w without any errors. Also, the subroutines may appear to be a little overkill in some spots, but I wanted to make this something that someone could eventually look to if they need subs that work with a calendar. Anyway, let me know what you think. I have included the pod in this. All other comments have been taken into account (4 AD is now a leap year in the cal). Mike Schechter BEGIN CODE: