Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Weird Date::Calc behavior; Bug?

by nardo (Friar)
on Apr 19, 2001 at 08:45 UTC ( [id://73758]=note: print w/replies, xml ) Need Help??


in reply to Weird Date::Calc behavior; Bug?

You're commenting out @start = (1999,05,27); (which assigns 3 elements to @start) and replacing it with @start = $from; (which assigns 1 element to @start). You later call Delta_Days(@start,@stop); which works when both @start and @stop contain 3 elements each, but doesn't work when both @start and @stop contain only 1 element each.

The solution is to call it with 6 arguments in the form Delta_Days(year1, month1, day1, year2, month2, day2), the fact that the two arguments are scalars which happen to have commas in them doesn't change the fact that they are only two arguments.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found