in reply to calculate date difference

Date::Manip will almost certainly do everything you want (and more). None of the design-by-committee, O'Woe engineered alternatives come close for its functionality.

But...If only that functionality were documented worth a damn.

You probably want the DateCalc() function, to construct a delta thingy from your two dates.

But then, you will need to examine (use; print; base decisions upon), the result of that function...and that's where good things go queer. Because, In all the (excessive verbose and tortuous) documentation I've read (and read, and re-read), no where is the return value of DateCalc() documented. Which makes it decidedly hard to...um...decide, what to do with it, once you have it.

Of course, what you will need to do with it will depend largely upon what you want to do with it, but since you don't know what "it" is, it makes the decision of how to do what you want to do with it all the harder.

If you're lucky, sbeck, the clever and dedicated author of Date::Manip will breeze by and explain exactly and succinctly (his post are, unlike his documentation), what you need. Unfortunately, he does not appear to be a regular visitor.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^2: calculate date difference
by SBECK (Chaplain) on Jul 07, 2010 at 16:57 UTC

    I'm not sure how you can say that the return value of DateCalc is not documented. The very first paragraph in the DateCalc description ends with:

    Two deltas add together to form a third delta. A date and a delta returns a 2nd date. Two dates return a delta (the difference between the two dates).

    True, the format of a delta or a date isn't explicitly described there, but that's not a bad thing. Almost all of Date::Manip functions return either a date or a delta, so it's not appropriate to describe them here.

    I am certainly open to suggestions as to how to improve the documentation for Date::Manip. It IS large, and could probably be better organized... but I've spent a lot of time trying to make it reasonably clear. If you don't, please send me specific examples of what you don't think is clear, and I'll be happy to consider them.

    However, as you said, I don't spend a lot of time on these forums (and it's outside of the scope of this question), so that should probably be done by email.

      The very first paragraph in the DateCalc description ends with:

      I acknowledge I was wrong about that.

      However, a long-time, but infrequent user of your powerful module, I always have to look up how to do things, and always find myself scrolling up and down the page trying to find the information I need.

      I do understand how difficult it is to write good documentation, and I do not have any simple suggestions for improvement. I note also that you have made considerable changes in that regard in recent builds. I will contact you by email.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.