Commit 6ca5da1
authored
Keep
It has some quirks:
```python
zero = neo4j.time.Date(0, 0, 0)
assert zero == neo4j.time.ZeroDate
assert zero.year == 0
assert zero.month == 0
assert zero.day == 0
# str representation is not a valid date ️
assert str(zero) == "0000-00-00"
# it's smaller than the minimum date
assert neo4j.time.ZeroDate < neo4j.time.Date.min
# on the server-side, it corresponds to the date "0000-12-31",
# not "0000-00-00"
assert get_first(driver, 'RETURN date("0000-12-31")') == zero
assert get_first(driver, "RETURN toString($x)", x=zero) == "0000-12-31"
```
However, `ZeroDate` is the only way to represent a date with ordinal 0.
So removing it, means potentially breaking user code:
* The constant gets removed.
* The driver can only represent a (ever so slightly) smaller set of dates
(this includes sending and receiving those dates).
* The value (with its quirks) has been in the driver for almost 6 years now.
Chances are, some user-code is relying on it.neo4j.time.ZeroDate (#1190)1 parent af02e2f commit 6ca5da1
1 file changed
+0
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | 843 | | |
851 | 844 | | |
852 | 845 | | |
| |||
0 commit comments