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

Re: Date Manip Delta_Format

by SBECK (Chaplain)
on Nov 09, 2016 at 14:40 UTC ( [id://1175600]=note: print w/replies, xml ) Need Help??


in reply to Date Manip Delta_Format

From the Date::Manip documentation:
   %Xh  : print the value of field X and all
          larger units in terms of X
so you are asking for the values of the fields of d (day) and higher in terms of days.

The values of all fields higher are 0:0:0:0, which is a total of 0 days, so what you got is expected.

It appears to me that what you are really asking for is the value of the delta in days, but ignoring the fact that a day is not strictly 24 hours (due to daylight saving time).

The following will do that:

Delta_Format($delta,'semi',0,'%dt') => 4

Replies are listed 'Best First'.
Re^2: Date Manip Delta_Format
by SBECK (Chaplain) on Nov 09, 2016 at 14:43 UTC
    By the way, the format of the delta did change (from an older 0:0:0:4:0:0:0 to a newer 0:0:0:0:96:0:0) to handle the fact that a day was not a constant length period of time. That change was quite a while ago though, so I wonder if you upgraded Date::Manip recently after a long period of using an older version. That would explain why this just started failing for you.
      Thank you. It was due to the module update.

Log In?
Username:
Password:

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

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

    No recent polls found