~mrp/time_computer

dd70d91e0c8e6ccc97ab60aaa2ad1061274fd63e — Mark Penner 4 years ago e775b78
2019-07
2 files changed, 18 insertions(+), 3 deletions(-)

M tc
A test-file
M tc => tc +3 -3
@@ 84,15 84,15 @@ finally:
print("\nhours by job")
x=0
while minutes[x][0]:
	print(minutes[x][0], round(minutes[x][1]/60, 2))
	print(minutes[x][0]+':', round(minutes[x][1]/60, 2))
	x+=1
print("\nhours by week")
stdweek = 40
x=0
while weeks[x][0]:
	if weeks[x][1]/60 <= stdweek:
		print("week", weeks[x][0], round(weeks[x][1]/60, 2))
		print("week", str(weeks[x][0])+':', round(weeks[x][1]/60, 2))
	else:
		print("week", weeks[x][0], stdweek, "overtime", round(weeks[x][1]/60-stdweek, 2))
		print("week", str(weeks[x][0])+':', stdweek, "overtime:", round(weeks[x][1]/60-stdweek, 2))
	x+=1
print('\ntotal hours:', round(totalminutes/60, 2), '\n')

A test-file => test-file +15 -0
@@ 0,0 1,15 @@
20181126 wat 06:47 11:59 12:52 17:03
20181127 watson 06:47 11:55 12:32 17:24
20181128 wat 06:48 12:02 12:35 17:23
20181129 wat 06:47 11:51 12:48 16:44
20181130 wat 06:46 11:51 12:44 17:15
20181203 wat 07:04 12:17
20181204 watson 07:08 11:57 12:32 17:30
20181205 byler 07:03 11:58 12:35 18:25
20181206 byler 09:17 11:57 12:46 20:40
20181207 byler 07:32 11:58 11:59 12:52 17:03 20:40
20181210 byler 07:32 11:58
20181211 byler 07:32 11:58
20181212 byler 07:32 11:58
20181213 byler 07:32 11:58
20181213 watson 12:32 16:58