The error you have is you didn't use the module that already does this for you.
use Data::Calc qw(Days_in_Month); > -----Original Message----- > From: Charlie Farinella [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 30, 2002 5:13 PM > To: Perl Beginners > Subject: Last day of Month > > > I have an error popping up in an application that runs monthly reports > and everymonth seems to leave off the last day's entries. > > The subroutine that determines the last day of the month is here: > > sub GetLastDayOfMonth { > my( $sec, $min, $hours, $mday, $mon, $year ) = > localtime( $_[0] ); > > return timelocal( 59, 59, 23, $monthDays[$mon], $mon, $year ); > } > > This is over my head and I'm hoping someone might look at > this and point > out any errors they might see. Either an explanation of > what's going on > here, or a pointer to appropriate documentation would also be > appreciated. > > thanks. > > -- > -------------------------------------------------------------- > ---------- > Charlie Farinella, Appropriate Solutions, Inc. > [EMAIL PROTECTED] > 603-924-6079 > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]