init: class of a day
This commit is contained in:
parent
f1775be271
commit
ff88aa9564
23
day.py
Normal file
23
day.py
Normal file
@ -0,0 +1,23 @@
|
||||
''' Dayclass wich represents a day at work '''
|
||||
|
||||
from calculation import hoursSpent
|
||||
from datetime import datetime
|
||||
from time import sleep
|
||||
|
||||
|
||||
class Day:
|
||||
|
||||
def __init__(self):
|
||||
self.begin = 0
|
||||
self.end = 0
|
||||
self.begin_break = 0
|
||||
self.end_break = 0
|
||||
self.duration = 0
|
||||
|
||||
def beginDay(self):
|
||||
self.begin = datetime.now()
|
||||
print(self.begin)
|
||||
|
||||
def endDay(self):
|
||||
self.end = datetime.now()
|
||||
self.duration = hoursSpent(self.begin, self.end)
|
Loading…
Reference in New Issue
Block a user