A Logical Approach to Represent and Reason about Calendars