Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: perl basic count days between two dates

by jethro (Monsignor)
on Oct 04, 2013 at 13:31 UTC ( [id://1056879]=note: print w/replies, xml ) Need Help??


in reply to Re^4: perl basic count days between two dates
in thread perl basic count days between two dates

What SuicideJunkie said. Either the logic in NumberOfDaysBetween is wrong or you have to test the subroutines in there (NumberOfDaysInMonth and cumulativeDaysInMonths) similar to NumberOfDaysBetween. If one or both of them produce wrong results then plaster them with print statements until you know what is going on.

PS: Looked at your code again and subroutines are difficult to see because there isn't even one empty line separating them. Programs are easier to read for humans when structure can be seen at a glance. I even tend to separate subs with lines like "#----------------------" additionally to a few empty lines.

  • Comment on Re^5: perl basic count days between two dates

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1056879]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-25 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found