use strict; use warnings; use Time::Piece; my $month = 11; my $t = Time::Piece->strptime($month, '%m'); my $last_day_month = $t->month_last_day(); print "$last_day_month\n"; __END__ 30
To account for leap years, you may need to also specify the year.
In reply to Re: Given month last day
by toolic
in thread Given month last day
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |