Add support for subtracting milliseconds from a date by danielcrisp · Pull Request #581 · mongomock/mongomock

@danielcrisp

@danielcrisp

@codecov

pcorpet

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, thanks.

Please remove the subtract line from the Missing_features file as it seems pretty much implemented now.

res = self.parse(values[0]) - self.parse(values[1])
value_0 = self.parse(values[0])
value_1 = self.parse(values[1])
if isinstance(value_0, datetime.datetime) and isinstance(value_1, (int, float)):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Done.

@danielcrisp

@danielcrisp