Extract time filter into a template