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!
In reply to Re: Date::Manip - date differences
by Zoffix
in thread Date::Manip - date differences
by rpike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |