Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Counting number of a particular day of the month.

by cjf (Parson)
on May 31, 2002 at 20:23 UTC ( [id://170824]=note: print w/replies, xml ) Need Help??


in reply to Counting number of a particular day of the month.

Date::Calc will do the job:

use Date::Calc qw/:all/; my $days = Days_in_Month($year,$month)

Check the docs for many more useful functions.

Update: Note to self, finish reading question before answering :)

You should take a look at the Day_of_Week() function, using that and the number of days in the month you can loop over the month and calculate the number of the days you're looking for. It isn't pretty, but it should do.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://170824]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-28 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found