in reply to Date Handling in Perl
my ($hour) = (localtime)[2]; $hour > 10 ? $_=0 : $_=60*60*24; # seconds in the day my ($mday,$mon,$year) = (localtime(time-$_))[3..5]; my $dir = sprintf('something/something/%04d/%02d/%02d',$year+1900,$mon +,$mday);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Date Handling in Perl
by joeymac (Acolyte) on Jul 11, 2012 at 15:39 UTC | |
by frozenwithjoy (Priest) on Jul 11, 2012 at 16:57 UTC | |
by Anonymous Monk on Jul 11, 2012 at 16:01 UTC | |
by aitap (Curate) on Jul 11, 2012 at 16:06 UTC | |
by Anonymous Monk on Jul 11, 2012 at 16:24 UTC | |
by aitap (Curate) on Jul 11, 2012 at 17:11 UTC |