What I'm trying to do is, given start and end dates in the format YYYY-MM-DD, write a function that will return key/value pairs of dates in that format representing the beginning and end of the intervening months with the caveat that the first pair will start with whatever the start date is, and the last pair will end with whatever the end date is. I haven't been able to find quite the solution I need, though I imagine Date::Manip or Date::Calc can do the job.
For example, if the call looked like:
&get_date_pairs('2014-08-18', '2014-10-17');
then the hash the function returned would look like:
%hash = (
2014-08-18 => 2014-08-31,
2014-09-01 => 2014-09-30,
2014-10-01 => 2014-10-17,
);