Skip to content
Snippets Groups Projects
Commit fb9505fb authored by Timur Safin's avatar Timur Safin Committed by Kirill Yukhin
Browse files

datetime: implement interval comparison

We used to not implement comparison operators for interval
objects, thus any compare (even of equal) objects returned false:

	```
	tarantool> dt1 = datetime.new()
	---
	...

	tarantool> dt2 = datetime.now()
	---
	...

	tarantool> dt1 - dt1 == dt2 - dt2
	---
	- false
	...
	```

Now we implemented comparison for interval objects, where we compare
field by field starting from highest attribute (e.g. `year`) to
smallest attribute (e.g. `nsec`) and if any of comparison
returned non zero value then we return this result.

NO_DOC=bugfix
NO_CHANGELOG=bugfix

(cherry picked from commit 65a3c17f)
parent b78f4734
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment