The "remind" program has a pretty well-developed DSL to represent dates and recurring schedules, with backends to produce postscript/html/etc calendars.
https://dianne.skoll.ca/projects/remind/
It's available already-packaged in most mainstream distros I know of.