backwards. it's Because
Why?
posted. top hadn't you if
advice better even been
have would it but ,
advice good is This
On 4/4/06, Joshua Colson <[EMAIL PROTECTED]> wrote:
> # Sample code:
>
> use Date::Calc qw(:all);
>
> $days = Days_in_Month('2006','04');
>
> print $days;
>
> # End Sample
>
> You'll need the Date::Calc module from cpan
> (http://search.cpan.org/~stbey/Date-Calc-5.4/Calc.pod).
If you're doing a lot of this, you're still going to want a lookup
table; it's considerably faster than calulating the number of days for
each month. Just grab Date::Calc where you need it:
sub feb { return $year ? (Date::Calc::leap_year($year) ? 29 : 28) : '' }
my %months = (
jan => 31,
feb => \&feb,
...
);
HTH,
-- jay
--------------------------------------------------
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.dpguru.com http://www.engatiki.org
values of β will give rise to dom!