Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^5: perl basic count days between two dates

by jethro (Monsignor)
on Oct 04, 2013 at 13:31 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2022-05-23 11:57 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (82 votes). Check out past polls.