Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: Problem with DateTime subtract_datetime

by ikegami (Patriarch)
on Feb 20, 2015 at 05:47 UTC ( [id://1117300]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Problem with DateTime subtract_datetime
in thread Problem with DateTime subtract_datetime

There is a finite number of days and weeks between the two dates.

You didn't ask to the number of days and/or weeks between two dates. As I already mentioned, that would be $endDate->delta_days($dt1).

So, forget about the month(s), why are the weeks and days incorrect?

huh? They aren't. There is 1 month, 10 days, 17 hours and 1 minute between 2015-03-19 17:01 and 2015-02-30 00:00, and the output said 10 days.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-19 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found