hours: show only hours remaining until week goal for today's projected end time
This commit is contained in:
parent
e345fc1f7b
commit
2f6846e09e
9
hours
9
hours
@ -164,12 +164,13 @@ def main(argv):
|
|||||||
if adj != 0.0:
|
if adj != 0.0:
|
||||||
sys.stdout.write(
|
sys.stdout.write(
|
||||||
' [%s%.1f]' % ('+' if adj > 0.0 else '', adj))
|
' [%s%.1f]' % ('+' if adj > 0.0 else '', adj))
|
||||||
|
hours_to_do_today = min(goal_hours - total_hours, HOURS_PER_DAY)
|
||||||
if (iso_spec == now.strftime(ISO_DATE_FMT)
|
if (iso_spec == now.strftime(ISO_DATE_FMT)
|
||||||
and hours < HOURS_PER_DAY):
|
and hours < hours_to_do_today):
|
||||||
sched_hours += HOURS_PER_DAY
|
sched_hours += hours_to_do_today
|
||||||
sys.stdout.write(', %.1f at %s' % (HOURS_PER_DAY,
|
sys.stdout.write(', %.1f at %s' % (hours_to_do_today,
|
||||||
fmt_time_dt(time[0] + timedelta(0,
|
fmt_time_dt(time[0] + timedelta(0,
|
||||||
int((HOURS_PER_DAY - adj) * 60 * 60)))))
|
(hours_to_do_today - adj) * 60 * 60))))
|
||||||
else:
|
else:
|
||||||
sched_hours += hours
|
sched_hours += hours
|
||||||
total_hours += hours
|
total_hours += hours
|
||||||
|
Loading…
x
Reference in New Issue
Block a user