You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
581 B
19 lines
581 B
3 years ago
|
from datetime import date,datetime,timedelta
|
||
|
|
||
|
class AbstractCompany:
|
||
|
def __init__(self,name,description) -> None:
|
||
|
self.name=name
|
||
|
self.description=description
|
||
|
|
||
|
def __repr__(self) -> str:
|
||
|
return f"{self.name}\n{self.description}"
|
||
|
|
||
|
class AbstractJob:
|
||
|
def __init__(self,start:str,end:str=None) -> None:
|
||
|
self.start=datetime.strptime(start, "%m.%Y").date()
|
||
|
if end:
|
||
|
self.end=datetime.strptime(end, "%m.%Y").date()
|
||
|
else:
|
||
|
self.end=datetime.now().date()
|
||
|
self.delta=(datetime.now().date()-self.end)
|