in reply to Re: Date calculations in Perl for Win32
in thread Date calculations in Perl for Win32
This question deserves real code, specially since I just had to deal with almost the same thing.
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdt) = localtime(ti +me); my $weekofyear=0; #first week is first sunday, 0 == lastyear; if ($yday>=$wday) { #into the first week $weekofyear=int(($yday-$wday)/7)+1; #normalize to sunday }
That should do the trick nicely. Also, look at the Time::Local module. You'd be amazed what you can do once you have it in seconds...
--
$you = new YOU;
honk() if $you->love(perl)
|
|---|