+#!/usr/bin/perl -w
+
+use CGI;
+$query=new CGI;
+my($period)=$query->param('period');
+$period = "today" unless defined $period;
+
+my($firstdate);
+if($period eq "days") {
+ my($days)=$query->param('days');
+ $days = 1 unless defined $days;
+ if ($days < 1) {$days = 1};
+ $heading = "i-scream CVS commits in the past $days day(s)";
+ $days--;
+ $firstdate = `date --date \"$days days ago\" \"+%Y/%m/%d\"`;
+}
+elsif($period eq "thisweek") {
+ $firstdate = "last Sunday";
+ $heading = "i-scream CVS commits this week";
+}
+else {
+ # default to "today only"
+ $firstdate = `/bin/date \"+%Y/%m/%d\"`;
+ $heading = "Today's i-scream CVS commits";
+}