Ronnie has asked for the wisdom of the Perl Monks concerning the following question:
According to the Date::Day the 9th of August 2005 is a THU! Have I done something mind blowingly stupid? I've looked and looked and can see nothing wrong with my code, any ideas? Cheers, Ronnie#!/usr/bin/perl -w ############################################################### # Extra Modules should be declared here. # # All these modules MUST be found on the server attempting to # # call this script. # ############################################################### use strict ; # Enforce private + variables use Date::Day ; # Returns the act +ual day of a date ############################################################### # Set up variables # ############################################################### # Date and time variables for headings in Emails/files etc. # ############################################################### my ($day, $mon, $year) = (localtime) [3,4,5] ; my $date = sprintf("%02d/%02d/%04d", $day, $mon +=1, $year += 1900); my $today = undef ; ##################### print "\n\t\t*** test_day starts ***\n" ; $day = '9' ; $mon = '8' ; $year = '2005' ; print "\n\t\tDay :: $day" ; print "\n\t\tMon :: $mon" ; print "\n\t\tYear :: $year\n" ; $today = &day($day,$mon,$year) ; print "\n\t\tToday is a $today\n" ; print "\n\t\t*** test_day ends ***\n" ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date::Day problem?!
by muntfish (Chaplain) on Aug 11, 2005 at 09:53 UTC | |
by Ronnie (Scribe) on Aug 11, 2005 at 10:13 UTC | |
|
Re: Date::Day problem?!
by gellyfish (Monsignor) on Aug 11, 2005 at 09:47 UTC | |
|
Re: Date::Day problem?!
by salva (Canon) on Aug 11, 2005 at 09:30 UTC | |
|
Re: Date::Day problem?!
by ikegami (Patriarch) on Aug 11, 2005 at 15:56 UTC |