def parse_datetime_operation(operation: str) -> '<STR_LIT>':
_operation = operation.strip()<EOL>if not _operation:<EOL><INDENT>raise QueryParserException('<STR_LIT>'.format(operation))<EOL><DEDENT>if '<STR_LIT:|>' in _operation:<EOL><INDENT>raise QueryParserException('<STR_LIT>'<EOL>'<STR_LIT>'.format(operation))<EOL><DEDENT>negation, _operation = parse_negation_operation(_operation)<EOL>if '<STR_LIT:..>' in _operation:<EOL><INDENT>op = '<STR_LIT:..>'<EOL>params = _operation.split('<STR_LIT:..>')<EOL>params = [param.strip() for param in params if param]<EOL>if len(params) != <NUM_LIT:2>:<EOL><INDENT>raise QueryParserException('<STR_LIT>'<EOL>'<STR_LIT>'.format(operation))<EOL><DEDENT>return QueryOpSpec(op, negation, params)<EOL><DEDENT>op, _operation = parse_comparison_operation(_operation)<EOL>if not op:<EOL><INDENT>op = '<STR_LIT:=>'<EOL><DEDENT>if not _operation:<EOL><INDENT>raise QueryParserException('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(operation))<EOL><DEDENT>return QueryOpSpec(op, negation, _operation)<EOL>
Parse datetime operations.

    A datetime operation can one of the following:

     * single value: start_date:2014-10-10, start_date:>2014-10-10, start_date:>=2014-10-10
     * negation single value: start_date:~2014-10-10
     * interval: start_date:2010-10-10 10:10 .. 2012-10-10
     * negation interval: start_date:~2010-10-10 10:10 .. 2012-10-10

    This parser does not allow `|`