A demo program containing an example of how to use the Calendar API is in /usr/dt/examples/dtcalendar.