#!/usr/local/bin/perl
{
# Get number of days entered from command line.
# If the number is negative then it will give a date less
# than the current date. If positive greater than.
# This will also multiply the number of days entered times the number
# of seconds in a day (86400) to determin the number of days to add
# or subtract from the system variable time.
$myseconds=time + (-20 * 86400);
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($myseconds);
$year=$year+1900;
$mon=$mon+1;
if($mon<10)
{$mon="0$mon";}
if($mday<10)
{$mday="0$mday";}
# Format the date in YYYYMMDD.
$mydate="$year$mon$mday";
print "Your new date is $mydate \n";
}
