The need for a new helper script in Perl arose recently. I called it JHschedule_courses.pl.
I wanted to create weekly events,
- given a start date,
- given the number of weeks,
- given the offset of the registration deadline,
- and given the offset of the end date of that event.
The output of JHschedule_courses.pl would be
- the start date within any such week,
- the respective registration deadline,
- and the respective end date.
This output would serve as a here document to a loop within a shell script, which in turn also uses an XML template (as another here document within that loop) and which would create an XML structure for any such event as described above, but obviously with some constant text included. The entire XML structure would (after some tweaking) get uploaded to a calendar system.
I was pretty sure, I could achieve this functionality using Steffen Beyer’s Date::Calc (esp. Add_Delta_YMD), which I have been using in variouses contextes for many years now. And now it’s done. Thanks a lot to Steffen Beyer! Do you have an Amazon wishlist?