use strict; use warnings; my @d = qw/Sunday Monday Tuesday Wednesday Thursday Friday Saturday/; my @m = qw/January February March April May June July August September + October November December/; my $t = time(); $t += (1-(localtime($t))[6])*86400; for (1..5) { @_ = localtime($t); $t += 86400; print "$d[$_] ".$m[$_[4]+1]." $_[3] ".($_[5]+1900)."\n"; }
In reply to Re: Calculating the "nearest" week
by TedPride
in thread Calculating the "nearest" week
by hacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |