in reply to DIfference in days hours and second between dates
print timeDiff('', "2013-06-13 0:01:01", "2013-07-03 00:00:00" ), "\n"; gives me the following output:
19 J 23 H 58 M 59 Sec
Which, while I'm not sure it's 100% accurate, it's far from 734581 days. Have you tried printing the variables you're passing as parameters immediately before calling the function? Could be a case of garbage in.
....*sigh*..... This really ought to be relegated to DateTime, or one of the other CPAN offerings that is well maintained. Date calculations are not as easy as they look. What's with "local our" instead of true "my" variables? ...just curious; I don't see "local our", um, ever.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: local our
by space_monk (Chaplain) on Jun 13, 2013 at 16:08 UTC | |
by davido (Cardinal) on Jun 13, 2013 at 16:11 UTC |