make variable local

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
filter occurrences by calendar start/end

Signed-off-by: Tomas Neme <lacrymology@gmail.com>