#!/cgi-bin/perl -w
use CGI;
# get the form data
$query = new CGI;
$textInput=$query->param('textInput');
#start the html page
print $query->header;
print $query->start_html(-title=>"Ric's");
print "\n";
print "The text entered was:
\n";
print "\n";
{
print "$textInput
\n";
}
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
$year =~ s/^\d(\d\d)$/$1/;
$mon++;
if(length($mon) < 2){$mon = "0" . $mon;}
if($year > 90) {$year = "19" . $year;}
else{$year = "20" . $year;}
if($min < 10){$min= "0$min";}
$textInput = "$mday/$mon/$year";
@month = ("-", "January", "February",
"March", "April", "May",
"June", "July", "August",
"September", "October",
"November", "December");
@monthPost = ("-", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th",
"th", "th", "th", "th", "th", "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st");
$textInput = "$mday$monthPost[$mday] $month[$mon] $year";
print "$textInput";