Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

days in a month

by Anonymous Monk
on Apr 06, 2001 at 01:03 UTC ( #70295=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

perl monks, Is there a way that given a certain month in a particular year that you can return the number of days in that month? I know that days are constant except for leap year, but how can I use the localtime or time functions to input two days and get the difference between them? thank you

Replies are listed 'Best First'.
Re: days in a month
by Adam (Vicar) on Apr 06, 2001 at 01:15 UTC
Re: days in a month
by lachoy (Parson) on Apr 06, 2001 at 01:15 UTC

    Check out the Days_in_Month routine from the Date::Calc module, which might already be installed on your system. If not, it's certainly available from CPAN and, I'm almost positive, from PPM as well.

    Chris
    M-x auto-bs-mode

Re: days in a month
by aardvark (Pilgrim) on Apr 06, 2001 at 01:28 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://70295]
Approved by root
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2017-11-19 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (278 votes). Check out past polls.

    Notices?