Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Time::Piece; use Time::Seconds qw(ONE_DAY ONE_WEEK ONE_MONTH ONE_YEAR); # Create Time::Piece New Object for the dates my $t = Time::Piece->new(); my $year = $t->year; # Pass November, but it can be any month my $month = "11"; my $last_day_month = $t->month_last_day($month); #?? print $last_day_month." days\n"; # 30
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Given month last day
by toolic (Bishop) on Aug 28, 2015 at 18:29 UTC | |
|
Re: Given month last day
by 1nickt (Canon) on Aug 28, 2015 at 19:17 UTC | |
|
Re: Given month last day
by poj (Abbot) on Aug 28, 2015 at 19:25 UTC | |
|
Re: Given month last day
by Anonymous Monk on Aug 28, 2015 at 22:12 UTC | |
|
Re: Given month last day
by Anonymous Monk on Aug 30, 2015 at 21:44 UTC |