On Sun, 22 Jan 2017, Terry Olenchuk wrote:
Greetings all,This will be my first submission to CPAN. I had a name in mind,
but it was already taken. Am struggling to find an effective
replacement.
This is the idea behind the module: You need a set of dates for a regularly
scheduled report - monthly, weekly, quarterly, etc. Rather than
having to do all the calculations yourself, you'd send this code the pertinent parameters,
"type => MONTH, intervals => 1", and it would return
the start/end dates for, "one month back". In January 2017, it would return the
start/end dates for the month of December, 2016. If "intervals"
is changed to, 2, 3, 4, it would return the dates for November, October,
September, etc.
The same can be done for weeks, years, and quarters. In the case of weeks, you can
specify the day of the week that indicates "first day of
week", usually Sunday or Monday, but all seven days are supported. For yearly,
the starting month of the year can be specified, such as for
fiscal years which start in April/July/October. For monthly,
first-date-of-month can also be specified, if for example, someone has a monthly
billing cycle running from the 16th through the 15th.
My initial thought was, "Date::Range" but that is already in use. My next thought
was, "Date::Range::Endpoints.
Any helpful feedback/ideas would be greatly appreciated.
Does https://metacpan.org/release/DateTime-Event-Recurrence not do what
you need?
I think it does everything you describe.
Cheers,
Dave Rolsky
http://blog.urth.org
https://github.com/autarch