neosqlite.collection.expr_evaluator.python_evaluators.date_ops module

Date extract and date-arithmetic Python evaluators.

class neosqlite.collection.expr_evaluator.python_evaluators.date_ops.DatePythonMixin[source]

Bases: BasePythonMixin

Date component extraction and date arithmetic operators.

_evaluate_date_python(operator: str, operands: list[Any], document: dict[str, Any]) int | None[source]

Evaluate date operators in Python.

MongoDB compatibility: Date operators require the field to be stored as BSON Date/datetime type. String dates are NOT automatically converted, matching MongoDB’s behavior.

_evaluate_date_arithmetic_python(operator: str, operands: list[Any], document: dict[str, Any]) Any[source]

Evaluate $dateAdd, $dateSubtract, $dateDiff operators in Python.