[Chicago-talk] Date operator question.

Jim Thomason thomasoniii at gmail.com
Fri Jul 1 12:38:54 PDT 2005

sure, use Date::Calc...Days_in_Month($month)

Realistically, though, it's a fairly small set of data points. You
could just keep an array for yourself.

@days_in_month = qw(0 31 28 31 30 31 30 31 31 30 31 30 31);

my $last_day = $days_in_month[$month];

You'd need to handle leapyear yourself, though.

If you actually wanted to know the weekday upon which the last date of
the month fell, then Date::Calc has functions for that, too.


On 7/1/05, Richard Reina <richard at rushlogistics.com> wrote:
> Anyone know of a n easy way to get the last day of a
> given month?
> A people that values its privileges above its principles soon loses both.
>  -Dwight D. Eisenhower.
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk

More information about the Chicago-talk mailing list