" Any sufficiently complicated calendaring program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of RFC 5545
It’s well worth the read, and handles every situation that you can imagine, including the ones you can’t :). Any system I’ve ever come across that avoids using the iCalendar specification has, one way or another, regretted the choice later on."