How do I calculate dates with CalendarRules?

In order to calculate dates with CalendarRules, you need to know the date of the event that triggers related events, called a trigger event, and the jurisdiction or rule set that apply to this matter.  You can either create a new trigger event or open an existing event to designate as a trigger event and calculate the related dates based on that event.