Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: I can't subtract one DateTime objects from each other to get a DateTime::Duration in days

by Cody Fendant (Hermit)
on May 10, 2021 at 23:36 UTC ( [id://11132361]=note: print w/replies, xml ) Need Help??


in reply to Re: I can't subtract one DateTime objects from each other to get a DateTime::Duration in days
in thread I can't subtract one DateTime object from another to get a DateTime::Duration in days

I have updated the post to make it more clear what's happening.

One DateTime object, with a specific date and time, is being subtracted from another specific DateTime object.

  • Comment on Re^2: I can't subtract one DateTime objects from each other to get a DateTime::Duration in days

Replies are listed 'Best First'.
Re^3: I can't subtract one DateTime objects from each other to get a DateTime::Duration in days (updated)
by LanX (Saint) on May 11, 2021 at 06:58 UTC
    > I have updated the post to make it more clear what's happening.

    no you haven't, please see SSCCE for the next time.

    update

    FWIW: your approach is still wrong and will only sometimes produce correct results.

    See 1nickt's reply with ->delta_days for the correct solution

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-23 17:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found