Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = localtime(ti +me); my $thishour = ('0','1','2','3','4','5','6','7','8','9','10','11','12' +,'1','2','3','4','5','6','7','8','9','10','11','12') [(localtime) [2] +]; my $thismonth = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep' +,'Oct','Nov','Dec')[(localtime)[4]]; my $thisday = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Fri +day','Saturday')[(localtime)[6]]; my $day_number = ('1','2','3','4','5','6','7')[(localtime)[6]]; $mon++; $year += 1900; #I'm having problems figuring out how to find the date five days from +today's date. print "Today is $thisday, $thismonth, $mday, $year";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Prior Date
by suaveant (Parson) on Oct 02, 2007 at 20:08 UTC | |
|
Re: Prior Date
by perlfan (Parson) on Oct 02, 2007 at 20:04 UTC | |
|
Re: Prior Date
by djp (Hermit) on Oct 03, 2007 at 05:52 UTC | |
|
Re: Prior Date
by andreas1234567 (Vicar) on Oct 03, 2007 at 06:16 UTC | |
by suaveant (Parson) on Oct 03, 2007 at 13:51 UTC | |
by Anonymous Monk on Oct 03, 2007 at 14:55 UTC | |
by suaveant (Parson) on Oct 03, 2007 at 17:26 UTC | |
by Anonymous Monk on Oct 04, 2007 at 12:23 UTC |