Refactored event calendar rule to work on SHINY.