making last_seen to a relative date
This commit is contained in:
parent
29c8d1960b
commit
bb765a9312
1 changed files with 2 additions and 1 deletions
|
|
@ -220,7 +220,8 @@ class Listing:
|
||||||
|
|
||||||
with open(self.path_last_seen_listing(), 'r') as f:
|
with open(self.path_last_seen_listing(), 'r') as f:
|
||||||
datetime_str = json.load(f)
|
datetime_str = json.load(f)
|
||||||
return datetime.fromisoformat(datetime_str)
|
dt = datetime.datetime.fromisoformat(datetime_str)
|
||||||
|
return (datetime.datetime.now() - dt).days
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def serviceCharge(self) -> float:
|
def serviceCharge(self) -> float:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue