Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Date Manip Delta_Format

by SBECK (Hermit)
on Nov 09, 2016 at 14:40 UTC ( #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 (Hermit) 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?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2020-10-19 15:10 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (204 votes). Check out past polls.