calendar to match event logic