in reply to Getting the current week number

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";