in reply to Date::Manip - date differences

While I understand the whole "teach a man to fish" point of view, I can also say that saying "RTFM" is not an acceptable answer to any question.

I just wasted an hour reading Date::Manip docs to find how to use the module to find the difference in *days*, not in deltas as the documentation examples show.

If you think I've learned something now, or that I am now better off than just copying someone's pre-existing code - well, think again. In the hour I've lost, I could've been finished with my project already. I very rarely manipulate dates, so the little that I've learned about the module will be well forgotten by the time I'll need it again.

Anyway, this is the code I came up with (no idea how "efficient" it is):

perl -MDate::Manip -wle 'print Delta_Format(DateCalc("Sept 3, 2011", "Oct 5, 2011"), 2, "%dt")'

And if anyone cares to learn about the module, they can now go and read about those functions instead of couple score of pages about functions they'll never ever need to use!

Replies are listed 'Best First'.
Re^2: Date::Manip - date differences
by Anonymous Monk on Aug 05, 2017 at 00:26 UTC
    Agree and thanks for a workable solution to a rare problem