3 # usage: sepdate [month date year]
4 # where day month year are date of interest -- default is today
6 # Adapted and updated from a version attributed to Rich Holmes
9 use POSIX qw(strftime);
15 $todti = timelocal(0, 0, 0, $todday, $todmon, $todyr);
16 } elsif ($#ARGV == -1) { $todti = time;
20 $septime = timelocal(0, 0, 0, 31, 7, 93);
22 $tdiff = $todti - $septime;
23 $days = int ($tdiff / (60 * 60 * 24));
25 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
27 # this seems like overkill
28 $tzstr = strftime("%Z", $sec, $min, $hour, $mday, $mon, $year);
29 printf ("%3s Sep %2d %2.2d:%2.2d:%2.2d %3s 1993\n",
30 (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday],
31 $days,$hour,$min,$sec,$tzstr);