If the code works with year days, it should work with month days as well:
# Calculate number of full weeks this month $week = int(($mday+1-$wday)/7); # Add 1 if today isn't Saturday if ($wday < 6) {$week +=1;} print "Week $week\n";
In reply to Re: Getting the current week number
by fglock
in thread Getting the current week number
by slloyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |