Remove add and sub from Rdate

They were not symmetrical, better to remove them.
master
Salvo 'LtWorf' Tomaselli 2020-08-19 10:49:54 +07:00
parent 4dc7f131f3
commit 18d6f5ebfb
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
2 changed files with 1 additions and 7 deletions

@ -1,4 +1,5 @@
3.0
- Dates can no longer be added or subtracted
- Types are now inferred by column, no longer by cell
- Relations now use frozenset internally and are immutable
- Refactored parser to use better typing

@ -88,10 +88,6 @@ class Rdate:
def __str__(self):
return self.intdate.__str__()
def __add__(self, days):
res = self.intdate + datetime.timedelta(days)
return Rdate(res.__str__())
def __eq__(self, other):
if not isinstance(other, Rdate):
return False
@ -109,9 +105,6 @@ class Rdate:
def __lt__(self, other):
return self.intdate < other.intdate
def __sub__(self, other):
return (self.intdate - other.intdate).days
def is_valid_relation_name(name: str) -> bool:
'''Checks if a name is valid for a relation.